browser: place the cursor properly on the selected file when -g is used

Simply redraw the browser screen upon every keystroke when --showcursor
is in effect, to be certain that the cursor will be placed again at the
correct spot.

This fixes https://savannah.gnu.org/bugs/?52078
and fixes https://savannah.gnu.org/bugs/?52079.
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>
master
Benno Schulenberg 2017-09-22 21:34:46 +02:00
parent c74d2632bb
commit b27ab4f0a1
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ char *do_browser(char *path)
/* Display (or redisplay) the file list if the list itself or
* the selected file has changed. */
if (old_selected != selected)
if (old_selected != selected || ISSET(SHOW_CURSOR))
browser_refresh();
old_selected = selected;