nano

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

commit bbed065fa8e5462fbe0dbc929b6e0e9f99ffbdf1
parent dde74dee78e5a4e19d4dc905b673a6d6e67b7865
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 21 Nov 2021 10:37:39 +0100

tweaks: avoid redrawing the entire window when just a 'touch' will do

Diffstat:
Msrc/nano.c | 4++--
Msrc/winio.c | 5++++-
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -2559,11 +2559,11 @@ int main(int argc, char **argv) if (ISSET(ZERO) && lastmessage > HUSH) { if (openfile->current_y == editwinrows - 1 && LINES > 1) { edit_scroll(FORWARD); - edit_refresh(); + wnoutrefresh(edit); } redrawwin(bottomwin); wnoutrefresh(bottomwin); - wnoutrefresh(edit); + place_the_cursor(); } else if (ISSET(ZERO) && lastmessage > VACUUM) wredrawln(edit, editwinrows - 1, 1); #endif diff --git a/src/winio.c b/src/winio.c @@ -1704,7 +1704,10 @@ void check_statusblank(void) /* When windows overlap, make sure to show the edit window now. */ if (currmenu == MMAIN && (ISSET(ZERO) || LINES == 1)) - edit_refresh(); + { + wredrawln(edit, editwinrows - 1, 1); + wnoutrefresh(edit); + } } /* Ensure that the status bar will be wiped upon the next keystroke. */