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

fix: Pass stdio for interactive editing #416

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

skyfmmf
Copy link
Contributor

@skyfmmf skyfmmf commented Feb 9, 2024

gix_command by default does not pass stdin to commands. This caused editors and shells to behave weirdly. For example, vim printed a warning during opening:

Vim: Warning: Input is not from a terminal

After closing vim started this way, the terminal was messed up and needed an reset to print outputs correctly.

This is an attempt to fix #415. It fixes the issue described there, but I can not say how it will affect other editors or even scripts. It may re-introduce some errors that 048f182 ("fix: use gix-command for interactive edit") originally tried to fix.

Closes #415

gix_command by default does not pass stdin to commands. This caused
editors and shells to behave weirdly. For example, vim printed a warning
during opening:

Vim: Warning: Input is not from a terminal

After closing vim started this way, the terminal was messed up and
needed an reset to print outputs correctly (see stgit#415).

Signed-off-by: Felix Maurer <felix@felix-maurer.de>
@jpgrayson
Copy link
Collaborator

Thanks for this PR, @skyfmmf. On which platform(s) did you observe this behavior?

@skyfmmf
Copy link
Contributor Author

skyfmmf commented Feb 9, 2024

On which platform(s) did you observe this behavior?

I'm seeing this with this environment:

  • macOS 14.3
  • stgit 2.4.3
  • git 2.43.0
  • zsh 5.9
  • tmux 3.3a
  • vim 9.1

@jpgrayson
Copy link
Collaborator

Thanks. I have a similar environment, but using neovim instead of vim. I can reproduce the behavior with vim, but do not see it with neovim or emacsclient.

@jpgrayson jpgrayson merged commit f8dc0e3 into stacked-git:master Feb 10, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interactive editor (vim) broken on 2.4.3
2 participants