bugGNU nano - Bugs: bug #47703, when the terminal is very narrow,...

 
 

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

bug #47703: when the terminal is very narrow, the presentation is suboptimal

Submitter:  Benno Schulenberg <bens>
Submitted:  Fri 15 Apr 2016 09:04:11 AM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Thu 05 May 2016 06:48:14 PM UTC, comment #2: 

Fixed in git, 577f7fa.

Benno Schulenberg <bens>
Group administrator
Sat 30 Apr 2016 04:17:19 PM UTC, comment #1: 

Pico handles a narrow terminal more gracefully: trying to showing the full filename as long as possible: first sacrificing the version string, then the padding spaces, then the prefix, and only then it starts to dottify the name.  Attached patch makes nano behave very similar.  The main difference is that nano reserves room for the "Modified" string, so that the filename won't move or change as soon as the buffer is being edited.  (But this reserved room is the second thing being given up, right after the version string, and before the padding spaces.)

Patch was posted to nano-devel, but... as often, no one seems to care.

(Oh, the patch does nothing about the help text assuming that there are at least 24 columns available.  That is a separate issue.)

(file #37029)

Benno Schulenberg <bens>
Group administrator
Fri 15 Apr 2016 09:04:11 AM UTC, original submission:  

To reproduce, run 'stty cols 22 && src/nano doc/syntax/python.nanorc', and see what it says in the title bar:

"  GNU  File:          "

That can hardly be called useful information.
When you then type a character, the title bar becomes:

"  GNU  File:Modified  "

When the terminal is so narrow that not the entire version string can be shown, I think it would be better not to show the version string at all and use all available space for the filename.  And in those circumstances also leave out the "File: " prefix.

To continue: when the terminal is 22 columns wide, type ^G, and see how sometimes one or two characters are bitten off the right side of the text.  Somehow nano thinks it has two more columns available than it actually has.

Third: run 'stty cols 8 && src/nano doc/syntax/python.nanorc' and see how the titlebar is now spread over two lines (when not using --morespace).  This is because for such a narrow terminal, verlen becomes negative, which has the effect of printing the entire version string instead of nothing.

Benno Schulenberg <bens>
Group administrator

 

(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 (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-20 bens Open/ClosedOpen Closed
    2016-05-05 bens StatusIn Progress Fixed
        Summarywhen the terminal is very narrow, the presentation is suboptimal or deficient when the terminal is very narrow, the presentation is suboptimal
    2016-04-30 bens Attached File- Added 0001-screen-make-better-use-of-the-available-space-in-the.patch, #37029
        StatusNone In Progress

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code