-
Notifications
You must be signed in to change notification settings - Fork 616
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
Unexpected author abbreviations when restoring from background #232
Comments
Reproduced. Thanks. |
Looking at the ncurses code, it does try to flush the input buffer after returning from the suspended state. https://github.com/gittup/ncurses/blob/gittup/ncurses/tty/lib_tstp.c#L215 |
I think a similar problem happens if you suspend $EDITOR while editing a commit message. Only tested with vim+bash:
|
I can't reproduce @stuarthicks' issue on 4b0aba8 ("erase status line at exit time") but I traced @igoralmeida's issue to 83df6c3 ("Remove unneeded calls to {def,reset}_prog_mode"). It's consistently reproducible and it's not necessary write or save anything. Reverting that commit restores editor suspension capability, however, when eventually quitting tig the terminal screen doesn't clear like it normally does (and like
|
Clear the terminal before calling out to an external command so the altscreen won't mess up any downstream subshell management. Restore terminal settings as per init_display when restoring. Reproducible with example from[0]: - Run `tig status` - Press 'e' to open Vim - Press Ctrl-Z to suspend Vim - Run `fg` - Quit Vim [0] #232 (comment)
Clear the terminal before calling out to an external command so the altscreen won't mess up any downstream subshell management. Restore terminal settings as per init_display when restoring. Reproducible with example from[0]: - Run `tig status` - Press 'e' to open Vim - Press Ctrl-Z to suspend Vim - Run `fg` - Quit Vim [0] #232 (comment) Refs: #232
@commonquail Thanks for tracking down the commits. I reproduced @igoralmeida 's issue with the latest version and managed to come up with #657 to fix that. |
Move the special case of Ctrl-Z introduced in 167d59e so no input is generated by get_input.
Helped by @rolandwalker 's work in #665 and 167d59e I believe I finally found a fix for the initial issue also. |
@jonas @rolandwalker Thanks! 😄 |
Clear the terminal before calling out to an external command so the altscreen won't mess up any downstream subshell management. Restore terminal settings as per init_display when restoring. Reproducible with example from[0]: - Run `tig status` - Press 'e' to open Vim - Press Ctrl-Z to suspend Vim - Run `fg` - Quit Vim [0] #232 (comment) Refs: #232
Clear the terminal before calling out to an external command so the altscreen won't mess up any downstream subshell management. Restore terminal settings as per init_display when restoring. Reproducible with example from[0]: - Run `tig status` - Press 'e' to open Vim - Press Ctrl-Z to suspend Vim - Run `fg` - Quit Vim [0] #232 (comment) Refs: #232
Using tig 1.2.1 (Nov 22 2013) on OSX 10.8.5, iTerm 2 and zsh.
Steps.
fg
Expected: To see message on screen again about being at the top of the list.
Actual: Author field becomes abbreviated.
This can be repeated to un-abbreviate the author field. So I presume calling a toggleAuthorAbbreviation function somehow.
Also observed, immediately after restoring from background, I have to press the down arrow twice to go down. Are key mappings offset/incorrect in this state?
The text was updated successfully, but these errors were encountered: