vis: Fix a crash when re-entering prompt window
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.
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.
Hmm, I wonder what to do with this patch. Even its author doesn’t like it, it seems.
This should be probably closed, shouldn’t it?
Since the author has long since disappeared I will close this. The related issue will remain open but any proposed fixes should keep the search functionality intact.