bugGNU nano - Bugs: bug #56226, [Task] cutting a line should not...

 
 

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

bug #56226: [Task] cutting a line should not change the struct of the next line

Submitter:  Benno Schulenberg <bens>
Submitted:  Sat 27 Apr 2019 11:06:54 AM UTC
   
 
Severity:  1 - Wish Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Thu 14 May 2020 01:08:51 PM UTC, comment #1: 

This was fixed in git one month ago, in commit cd3db5fc: "change the implementation of cutting to not use partitioning".

Benno Schulenberg <bens>
Group administrator
Sat 27 Apr 2019 11:06:54 AM UTC, original submission:  

To see what I mean, run:

  src/nano --ignore --auto --break --fill=72  +11,21  README

Then type (literally): three more words
Then type: ^K ^P ^Space ^Space another word

See how "unclear" gets pushed to a new oveflow line, instead of getting prepended to "Pine and Pico" on the existing overflow line.

Nothing changed on the existing overflow line, so the spillage_line logic should continue prepending to this line.  But apparently, after the ^K cut, the linestruct of the overflow line has changed.

To see this, add the following line to src/nano.c:

  statusline(ALERT, "%lx", openfile->current);

somewhere in the main loop, around line 2720.  Then run the same command again, type the "three more words", then check what "number" the overflow line has, cut the preceding line, and check again.  The number has changed.  But the number of the line before the cut one has not changed.  It should not be necessary for the number of the succeeding line to change either.

It would be nice when the cutting and pasting code where changed to treat the cutting/pasting of zero characters at the start of a line specially.  That is: when cutting or pasting zero characters at start of line, skip it, no need to do anything.

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

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-30 bens Open/ClosedOpen Closed
    2020-05-14 bens StatusNone Fixed
        Assigned toNone bens
    2019-06-19 bens Assigned tobens None
        Summarycutting a line should not change the struct of the next line [Task] cutting a line should not change the struct of the next line

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code