patchGNU nano - Patches: patch #10438, Fix cursor refresh with NetBSD...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10438: Fix cursor refresh with NetBSD curses

Submitter:  Nia Alarie <washbear>
Submitted:  Fri 15 Mar 2024 05:41:44 PM UTC
   
 
Priority:  5 - Normal Status:  Done
Privacy:  Public Assigned to:  bens
Open/Closed:  Open Release:  None

Jump to the original submission

Mon 18 Mar 2024 04:27:34 PM UTC, comment #7: 

At the bottom of that opengroup page it says: SEE ALSO doupdate().  To me that means that doupdate() is enough to "refresh" the cursor position, otherwise it would have referred to wrefresh() or wnoutrefresh() instead.

Benno Schulenberg <bens>
Group administrator
Mon 18 Mar 2024 09:45:03 AM UTC, comment #6: 

https://pubs.opengroup.org/onlinepubs/7908799/xcurses/wmove.html

"This function does not move the terminal's cursor until the next refresh operation."

If there is a check, it should be for !ncurses.

Nia Alarie <washbear>
Mon 18 Mar 2024 09:13:59 AM UTC, comment #5: 

The proposed patch has been pushed to master:
  https://git.savannah.gnu.org/cgit/nano.git/commit/?id=fdd92af3

Well, if '_CURSES_H_' is not intended to be visible, then the library should export some other symbol to identify itself, say 'NETBSD_CURSES'.

Not using an #ifdef is not an option for me: the call is not needed for ncurses, and I don't want to make redundant calls.  Better would be for NetBSD curses to become compatible with ncurses: to not need the wnoutrefresh() call for cursor movements.

Benno Schulenberg <bens>
Group administrator
Sun 17 Mar 2024 05:39:31 PM UTC, comment #4: 

comment #3:

> Anyway, it looks like the fragment can be conditionalized on `_CURSES_H_` as the Illumos symbol lacks the trailing underscore.  Updated patch is attached.  Does that work for you?


It's okay. I think I'd prefer to avoid the ifdef entirely, since I doubt CURSES_H is expected to be part of the public API.

Nia Alarie <washbear>
Sun 17 Mar 2024 11:12:23 AM UTC, comment #3: 

Hmm.  Comparing these:

It would have been nice if NetBSD curses clearly identified itself, like PDCurses does.

Anyway, it looks like the fragment can be conditionalized on `_CURSES_H_` as the Illumos symbol lacks the trailing underscore.  Updated patch is attached.  Does that work for you?


(file #55853)

Benno Schulenberg <bens>
Group administrator
Sat 16 Mar 2024 09:42:33 PM UTC, comment #2: 

comment #1:

> Thanks for reporting.
>
> Could you test attached patch (it should apply cleanly to nano-7.2, without only an offset)?
>
> And could you check whether cursor placement is correct when searching for something (when using NetBSD curses)?


The behaviour with the attached patch is correct. However, I'm not sure the macro usage is - NetBSD curses is available for non-NetBSD platforms: https://github.com/sabotage-linux/netbsd-curses

Nia Alarie <washbear>
Sat 16 Mar 2024 04:35:36 PM UTC, comment #1: 

Thanks for reporting.

Could you test attached patch (it should apply cleanly to nano-7.2, without only an offset)?

And could you check whether cursor placement is correct when searching for something (when using NetBSD curses)?  For example:

src/nano --ignore --soft --line doc/faq.html

And then type: ^W clipboard <Enter>
And then, with three second pauses, a few times: Alt+W
Is the whole word "clipboard" highlighted for a second and a half?
And is afterward the cursor placed correctly on the "c" of "clipboard"?


(file #55847)

Benno Schulenberg <bens>
Group administrator
Fri 15 Mar 2024 05:41:44 PM UTC, original submission:  

Per https://gnats.netbsd.org/57749

testing nano and cursor does not update movement on existing files

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.

Nia Alarie <washbear>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Updated the item)
  • -email is unavailable- added by washbear (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-18 bens StatusIn Progress Done
    2024-03-17 bens Attached File- Added 0001-display-add-a-wnoutrefresh-call-for-NetBSD-to-force-.patch, #55853
    2024-03-16 bens Attached File- Added 0001-display-add-a-wnoutrefresh-call-for-NetBSD-and-condi.patch, #55847
        StatusNone In Progress
        Assigned toNone bens
    2024-03-15 washbear Attached File- Added patch-src_winio.c, #55841

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code