tweaks: remove some superfluous placements of the cursor

The cursor needs to be placed in its proper spot in the edit window
/only/ when nano is about to accept input from the user and needs to
show where this input will go.

(This might cause a scrolling issue to appear, because reset_cursor()
does not just place the cursor, it also recomputes current_y, which
is used in several places to determine whether and how much to scroll.
If it so happens, we'll deal with that fallout later.)
This commit is contained in:
Benno Schulenberg 2017-04-12 20:51:04 +02:00
parent 6723ac6fcc
commit 5a741a0205

View File

@ -1797,8 +1797,6 @@ void check_statusblank(void)
if (statusblank == 0) {
blank_statusbar();
wnoutrefresh(bottomwin);
reset_cursor();
wnoutrefresh(edit);
}
/* If the subwindows overlap, make sure to show the edit window now. */
@ -2080,8 +2078,6 @@ void titlebar(const char *path)
wattroff(topwin, interface_color_pair[TITLE_BAR]);
wnoutrefresh(topwin);
reset_cursor();
wnoutrefresh(edit);
}
/* Display a normal message on the statusbar, quietly. */
@ -2254,9 +2250,6 @@ void bottombars(int menu)
wmove(bottomwin, 0, 0);
wnoutrefresh(bottomwin);
doupdate();
reset_cursor();
wnoutrefresh(edit);
}
/* Write a shortcut key to the help area at the bottom of the window.