Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helix editor should re-render after shell command is exited #4099

Closed
sanket143 opened this issue Oct 4, 2022 · 4 comments
Closed

Helix editor should re-render after shell command is exited #4099

sanket143 opened this issue Oct 4, 2022 · 4 comments
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@sanket143
Copy link

Summary

I like to use lazygit, and I can map sh lazygit command to key combination to make it easier. Issue is that, once I quit the lazygit that I opened in helix using :sh lazygit, it shows "Command succeed" in the bottom and removes what helix had rendered i.e. text files.

Issue in action: https://asciinema.org/a/II68rm1xBg9EPgNR34y5RWj1u

Reproduction Steps

I tried this:

  1. hx .
  2. :sh lazygit
  3. q to quit, should return me to helix

I expected this to happen:

When I quit lazygit, I expected to return to helix just as I left it before I ran lazygit.

Instead, this happened:

It can't see any thing rendered by helix until I highlight the characters using visual mode, causing them to re-render.

Helix log

~/.cache/helix/helix.log
I don't think this requires helix log

Platform

Tried on Linux and macOS

Terminal Emulator

Kitty

Helix Version

helix 22.08.1 (66276ce)

@sanket143 sanket143 added the C-bug Category: This is a bug label Oct 4, 2022
@David-Else
Copy link
Contributor

David-Else commented Oct 4, 2022

I am using Helix and Lazygit together with awesome results using a Kitty config of:

enabled_layouts       stack,tall

You can open Lazygit in another Kitty window and cycle between them all being split screen/full screen with ctlr-shift l/ [ /]

I open projects with a script that automatically opens Lazygit if it is a git repo:

# set layout to split vertical to see other possible windows when helix opens
kitty @ goto-layout tall

# if the dir is a git repo then open a window and run lazygit
if [[ -d ".git" ]]; then
    kitty @ launch --title "lazygit|$selected_project_name" --keep-focus --cwd="$(pwd)" lazygit
fi

hx

The above is part of my mini bash project manager, I might release it at some point.

@kirawi kirawi added the A-helix-term Area: Helix term improvements label Oct 7, 2022
@sanket143
Copy link
Author

sanket143 commented Oct 8, 2022

@David-Else yh, that sounds good but it'll be nice to have this for things that aren't lazygit.

@andradei
Copy link

Also being inconvenienced by this as helix doesn't have plugin support (yet, and it's understandable) and I rely on external tools to provide things like file tree, git management, etc. Opening lazygit already shows some rendering issues and I can't operate properly on it.
For now, I'm C-z ing helix to the background in order to run those external cli tools.

@pascalkuthe
Copy link
Member

pascalkuthe commented Jun 23, 2023

The :sh command is not intended for running interactive CLI apps. It's intended for quick scrips that print to stdout or do something. If you want to use a tui application you need to use your window manager/terminal multiplexer/c-z. On older helix versions running a couple TUIs like lazygit worked by accident but on newer versions the behaviour changed and it doesn't work anymore anyway. For running TUI applications from helix see #1976

@pascalkuthe pascalkuthe closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

5 participants