From 5a741a0205729c6b46dbbcb4c7e260ccc7122360 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 12 Apr 2017 20:51:04 +0200
Subject: [PATCH] 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.)
---
 src/winio.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/winio.c b/src/winio.c
index d3b41ffd..fe31b9d1 100644
--- 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.
-- 
GitLab