bugGNU nano - Bugs: bug #49106, when the cursor is close to the...

 
 

bug #49106: when the cursor is close to the right edge, it is sometimes placed one-off

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Fri 16 Sep 2016 06:03:21 PM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 01 Dec 2016 07:40:16 PM UTC, comment #3:

The commit that fixed this bug... triggered bug #49742.

(I botched the reproduction recipe in comment #1, though -- it should be: 'stty cols 43 && LANGUAGE=en src/nano --ignore +75,88 doc/faq.html'. This misplaces the cursor when using versions before 2.7.1 -- well, as long as it lands on the "Funny you should ask" line, because it is an interplay between the bottom right corner of the screen having a character printed on it /and/ the line-with-the-cursor having a length that is just two or three characters shorter than the screen width.)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 12 Oct 2016 12:00:49 PM UTC, comment #2:

Fixed in git, 0a18d89.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 12 Oct 2016 11:38:54 AM UTC, comment #1:

The bug is not limited to softwrapping, and it does not occur on a Linux console. So the bug is probably related to bug #48852, and thus is most likely a VTE bug or an artifact of an ncurses optimization going wrong.

When your VTE-based terminal is 46 columns wide, a simple 'LANGUAGE=en src/nano --ignore +77,88' is enough to show the bug. The trigger is that the last item on the two help lines just exactly fits on the screen, meaning that writing it will move the cursor out of the subwindow, which then causes VTE/ncurses to misplace the cursor upon the next cursor move.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Fri 16 Sep 2016 06:03:21 PM UTC, original submission:

To reproduce, run 'stty rows 20 && stty cols 120 && src/nano --ignore --nowrap --soft +193,888 doc/faq.html' and notice that the cursor is placed one position beyond the end of the line.

Now repeat the following key sequence several times: <Left> <Left> <Right>, and notice that each character seems to be "transported" a position to the right. This happens as long as the statusbar message about the number of lines that were read is present. As soon as it disappears, behavior reverts to normal and characters are (when the cursor passes over them) put back to their actual place.

So, if you add --quick to the command-line options, on startup the cursor will still be placed wrong, but the first <Left> will move the cursor two positions left into its correct place.

This bug exists since nano-2.4.3. In 2.4.2 and before, the cursor is still placed wrongly at startup but the first <Left> will adjust that, even without --quick.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 31 Oct 2016 10:15:48 AM UTCbensOpen/ClosedOpen=>Closed
    Wed 12 Oct 2016 12:00:49 PM UTCbensStatusNone=>Fixed
      Assigned toNone=>bens
    Wed 12 Oct 2016 11:38:53 AM UTCbensSummarywith softwrap, the cursor is sometimes placed one-off=>when the cursor is close to the right edge, it is sometimes placed one-off

    Back to the top


    Powered by Savane 3.1-cleanup1