Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upvis: Fix a crash when re-entering prompt window #699
Conversation
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.
Fixes #628.
(A NULL check for
win->parent_modeinprompt_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 ani.Another possible behavior is to go to the last line and clear it.