bugGNU nano - Bugs: bug #59802, filename can get clipped with no...

 
 

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

bug #59802: filename can get clipped with no indication of having been clipped

Submitter:  Benno Schulenberg <bens>
Submitted:  Sat 02 Jan 2021 03:40:21 PM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Sun 03 Jan 2021 10:41:09 AM UTC, comment #1: 

Fixed in git, commit 86c9b9b5, by using the same truncation mechanism that is used when advertising the presence of a lock file.

Benno Schulenberg <bens>
Group administrator
Sat 02 Jan 2021 03:40:21 PM UTC, original submission:  

To reproduce, make your terminal 35 columns wide, and run 'src/nano --ignore NEWS'.
Then type: ^O ^K IMPROVEMENTS <Enter> Y
See that now the prompt says: «File "IMPROVE" exists; OVERWRITE?».  The filename is truncated, but there is no indication that it was truncated.

In English this will not happen often, because the prompts are fairly short.  But in other languages the prompts can be quite a bit longer.  Run for example 'LANGUAGE=nl src/nano --ignore NEWS' and do the same exercise again: ^O ^K IMPROVEMENTS <Enter> Y.  See that now the prompt says: «Bestand '' bestaat al; OVERSCHRIJV».  The filename is truncated to zero characters and even the final three characters of the prompt text are clipped.

Bug exists since version 2.9.3.  The offending commit is 97cbbb0c: "prompt: show whitespace only in the filename, not in the whole line".  Before that commit, the filename would be shown in full and simply the entire prompt text would be clipped.

(The problem was found because I was checking in which other cases the error message "Span has underflowed" could occur.)

Benno Schulenberg <bens>
Group administrator

 

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

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)
  •  

    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
    2021-01-15 bens Open/ClosedOpen Closed
    2021-01-03 bens StatusIn Progress Fixed
    2021-01-02 bens Severity3 - Normal 2 - Minor
        StatusNone In Progress
        Assigned toNone bens
    2021-01-02 bens Summaryfilename can get clipped with no indication of being clipped filename can get clipped with no indication of having been clipped

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code