bugGNU nano - Bugs: bug #57832, undoing an automatic hardwrap...

 
 

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

bug #57832: undoing an automatic hardwrap causes a wrong character count

Submitter:  Benno Schulenberg <bens>
Submitted:  Sun 16 Feb 2020 07:06:00 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Mon 17 Feb 2020 10:49:38 AM UTC, comment #1: 

Fixed in git, commit 12e5c2f0.

[In fact, the bug was found by testing.  I was trying to find something that went wrong because of the difference in when the two add_undo(ADD)s were called, and then I found something else.)

Benno Schulenberg <bens>
Group administrator
Sun 16 Feb 2020 07:06:00 PM UTC, original submission:  

To reproduce, run:


src/nano --ignore --fill=12 --break


Then type: one two three

Note that on the second "e", the word "three" wraps to the second line.  Type ^C and see that there are 15 characters in total.  Now type M-U ^C.  See that the buffer is now completely empty, but the character count says: 14.  Type: M-D.  14 characters.

[Bug was found by code inspection, by noticing that there is a discrepancy between how add_undo() is called in inject() and how in do_wrap().]

Bug exists since the undo capability was added: before version 2.2.6, although undo in those old versions had many more problems.  The problem in a form comparable to the current one exists since around version 2.3.6.

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

    Date Changed by Updated Field Previous Value => Replaced by
    2020-03-25 bens Open/ClosedOpen Closed
    2020-02-17 bens StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code