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

 
 

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

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Fri 15 Apr 2016 09:04:11 AM UTC  
 
Severity: 2 - MinorStatus: 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 05 May 2016 06:48:14 PM UTC, comment #2:

Fixed in git, 577f7fa.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
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:
   

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 20 Jun 2016 09:58:30 AM UTCbensOpen/ClosedOpen=>Closed
    Thu 05 May 2016 06:48:14 PM UTCbensStatusIn Progress=>Fixed
      Summarywhen the terminal is very narrow, the presentation is suboptimal or deficient=>when the terminal is very narrow, the presentation is suboptimal
    Sat 30 Apr 2016 04:17:19 PM UTCbensAttached 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.1-cleanup1