nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 5a741a0205729c6b46dbbcb4c7e260ccc7122360
parent 6723ac6fcc4e2a1e280cff6becab75c1f8ce6183
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Wed, 12 Apr 2017 20:51:04 +0200

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.)

Diffstat:
Msrc/winio.c | 7-------
1 file changed, 0 insertions(+), 7 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -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.