bugGNU nano - Bugs: bug #55571, [Request] highlight the $...

 
 

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

bug #55571: [Request] highlight the $ continuation character in some way

Submitter:  Benno Schulenberg <bens>
Submitted:  Fri 25 Jan 2019 03:50:27 PM UTC
   
 
Severity:  1 - Wish Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Jump to the original submission

Fri 15 Feb 2019 04:49:30 PM UTC, comment #8: 

Fixed in git, commit 252bb600.

Benno Schulenberg <bens>
Group administrator
Fri 08 Feb 2019 06:36:39 PM UTC, comment #7: 

Respecting --bold and using 'hilite_attribute' instead of 'A_REVERSE' is fine, to keep the appearance of nano "consistent", in case anyone still uses --bold.  But adding another configurable color for something that should occur just occassionally is too much for my taste.  The highlighted "$" (or ">" soon) is meant to draw the attention, to alert the user that something is "missing", something is not being shown.  When the whole right edge is filled with highlighted continuation characters, it is a sign that the terminal is too small for comfort, or the font too large, or that softwrap should be switched on.

Benno Schulenberg <bens>
Group administrator
Fri 08 Feb 2019 07:50:31 AM UTC, comment #6: 

After thinking about it some more, there's also the interaction with --boldtext.  If A_REVERSE is hardcoded in this case, the --boldtext option will effectively be ignored then, unlike all the other UI elements.

David Lawrence Ramsey <dolorous>
Group Member
Fri 08 Feb 2019 07:46:47 AM UTC, comment #5: 

I've been using the attached patch for almost a year now and agree with this change. I don't however agree with hard-coding it to A_REVERSE, what is the point of having UI colors if you then prevent certain elements from being changed? A column of reverse video '>' characters down the right side really stands out (pulls attention away from the text) when the rest of your UI isn't reverse video.

(file #46211)

Brand Huntsman <brand>
Wed 06 Feb 2019 06:06:31 PM UTC, comment #4: 

For now, this issue refers to just the edit window.  An answer exceeding the width of the prompt bar is far more seldom than a line from a file exceeding the width of the window.  Also, when the answer comes to exceed the width, the user sees it happening, the focus is there, it will be rather obvious what the ">" and "<" mean, no need to highlight them.  But when someone opens a file and some lines seem to end with "$", if the user doesn't know better, they might think that the "$" is an actual character.  So that is why for the edit window a highlight for this character is useful, almost needed.  Reverse video will do fine, a special color attribute would be overkill.

Benno Schulenberg <bens>
Group administrator
Wed 06 Feb 2019 05:48:23 PM UTC, comment #3: 

Okay.

However, there is another issue related to this: what color should the "$" continuation be bound to?  Displaying it in reverse video when no colors are used is fine for the edit window, but what about the prompt bar, which is already in reverse video when no colors are used?

David Lawrence Ramsey <dolorous>
Group Member
Wed 06 Feb 2019 02:52:21 PM UTC, comment #2: 

Yes, when I changed "$" to ">" and "<" when the prompt answer is too long, I had forgotten that ">" and "<" are also used for the left and right half of a split double-width character.  But this is a separate issue (when bug #55620 is fixed, the promptbar can already end with ">>", which is confusing).  Please report it as a separate bug.

Benno Schulenberg <bens>
Group administrator
Thu 31 Jan 2019 09:43:36 PM UTC, comment #1: 

Using the '<' and '>' characters instead of '$' to indicate that the line can be scrolled seems like a bad idea to me.

The '<' and '>' characters indicate characters split across lines, and words split across lines via softwrap.  On the other hand, the '$' character indicates that there are more characters before or after it; no splitting is involved.  If both of these cases use the same characters, they become much more difficult to differentiate.

For consistency. the prompt should be using '$' for scrollable lines just as the edit window does.  Pico doesn't do that, but it should.  Or, if '$' is considered too odd, nano should use something else that the user can easily tell apart from '<' and '>'.

David Lawrence Ramsey <dolorous>
Group Member
Fri 25 Jan 2019 03:50:27 PM UTC, original submission:  

When a line is longer than the screen is wide, nano places a "$" in the last column of the screen to indicate that 'there is more'.

First, the choice of character is poor, because in regexes "$" is the end-of-line anchor.  Second, it would be much clearer that this "$" is not an actual character if it were highlighted or colored in some way.  The most obvious thing to do is to print it in reverse video (like 'less' does when option -S is used and a line is too long).  And maybe (like 'less') use the ">" character instead of "$" -- as is already done at the prompt.

Benno Schulenberg <bens>
Group administrator

 

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

Attached Files
file #46211:  add-scrollcolor.patch added by brand (7KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by brand (Updated the item)
  • -email is unavailable- added by dolorous (Posted a comment)
  • -email is unavailable- added by bens (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
    2019-03-25 bens Open/ClosedOpen Closed
    2019-02-15 bens StatusIn Progress Fixed
    2019-02-08 bens Summary[Request] highlight the $ continuation character in reverse video [Request] highlight the $ continuation character in some way
    2019-02-08 brand Attached File- Added add-scrollcolor.patch, #46211
    2019-02-07 bens StatusNone In Progress
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code