bugGNU nano - Bugs: bug #55896, using --guide together with...


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

bug #55896: using --guide together with stripecolor can give an intermittent bar

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Tue 12 Mar 2019 07:07:00 PM UTC  
Severity:  3 - Normal Status:  Fixed
Assigned to:  Benno Schulenberg <bens> Open/Closed:  Closed

Fri 15 Mar 2019 02:02:54 PM UTC, comment #2: 

Fixed in a better way by commit 47f3dc75.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Fri 15 Mar 2019 01:28:06 PM UTC, comment #1: 

Worked around by commit d9faac61, by dotting the stripe when it's in the last column.  Not a nice workaround, but...

Ehm... the hard space didn't work, but: it didn't work before David fixed the multibyte issue.  Maybe it works now.  Let me check...

Yeah, it would work with a non-breaking space.  But that is only available when UTF-8 is being used.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 12 Mar 2019 07:07:00 PM UTC, original submission:  

To reproduce, make a VTE-based terminal exactly 80 columns wide, put 'set stripecolor ,yellow' at the end of your .nanorc file, and then run:

  src/nano --linenumbers --guide=75 +1 NEWS

See how the vertical bar is absent on lines 7 and 8 and 13, and on lines 20 to 29 (if your terminal is that high).  Weird!  Note that the vertical bar is absent only when the text ends more than six characters before the window's edge.  Hmmm...  This feels line an ncurses optimization bug, but it isn't.

I've tried five different terminal emulators.  Unaffected are xterm and Pantheon.  Affected are Gnome Terminal, Xfce Terminal, and roxterm.  The latter three are all VTE-based, so this appears to be a VTE bug.

The bug can be worked around by adding

    if (stripe_column == editwincols)
        wredrawln(edit, row, 1);

after drawing each stripe character, but that forces each line to be really redrawn, defeating ncurses' optimization, and is thus a bit wasteful.  Also, it doesn't defeat the bug when scrolling line-by-line.  Paging up and down works fine, but using Alt+Down, for example, can leave holes in the bar.  It can even result in the bar becoming thirty characters wide on some line.  :|

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


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

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

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-15 bens Open/ClosedOpen => Closed
    2019-03-15 bens StatusIn Progress => Fixed

    Back to the top

    Powered by Savane 3.5