pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/57749: nano cursor movement problem on NetBSD 10 pkgsrc



The following reply was made to PR pkg/57749; it has been noted by GNATS.

From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/57749: nano cursor movement problem on NetBSD 10 pkgsrc
Date: Mon, 18 Mar 2024 16:23:49 +0300

 On Tue, Mar 05, 2024 at 22:45:01 +0000, RVP wrote:
 
 > If only the cursor is moved, then a wnoutrefresh() is needed by
 > BSD-curses for doupdate() to reflect the new cursor location.
 > Ncurses doesn't seem to need that.
 
 Thanks!  I think this analysis is correct.  X/Open Curses, Issue 7
 says for wmove (sorry, PDF only it seems, so no direct link):
 
   DESCRIPTION
     These functions move the cursor associated with the current or
     specified window to (y, x) relative to the windowâ??s origin. This
     function does not move the terminalâ??s cursor until the next refresh
     operation.
 
 wmove by itself doesn't mark the window in need of refresh.  From a
 quick glance through the nano sources, most calls for wmove are
 followed by adding text at the new location and eventually calling
 wrefresh().
 
 But see e.g. draw_the_promptbar() in src/prompt.c that ends with
 
     /* Place the cursor at the right spot. */
     wmove(footwin, 0, column - the_page);
     wnoutrefresh(footwin);
 
 So I think this is a bug in nano that is just masked by the ncurses
 being a bit more eager to track if the update is needed.
 
 -uwe
 


Home | Main Index | Thread Index | Old Index