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

vis: Fix a crash when re-entering prompt window #699

Open
wants to merge 1 commit into
base: master
from

Conversation

@ghost
Copy link

@ghost ghost commented May 14, 2018

Fixes #628.
(A NULL check for win->parent_mode in prompt_restore() is probably a good idea, although not necessary after this change.)

While in the command window, going to Normal mode and pressing : (or /, or ?) again would create "nested" command windows. This change makes pressing any of these keys just act like an i.
Another possible behavior is to go to the last line and clear it.

TwoFinger TwoFinger
vis->mode was incorrectly "restored" to a NULL prompt->parent_mode in
prompt_restore() because vis_prompt_show() was assuming that the
currently active window is always a regular one.
But if the active window is the command window, a new command window(s) would
be created with the old command window as its parent.
realwhz added a commit to realwhz/vis that referenced this pull request Dec 12, 2018
@ghost
Copy link
Author

@ghost ghost commented Jan 31, 2020

Just want to mention that this patch, while solving the crash from #628 indeed, also makes it impossible to search within the command window.
Back when I wrote this I didn't realize it was even an option.
Unfortunately I can't think of a less crippling fix.
@martanne, feel free to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

0 participants
You can’t perform that action at this time.