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

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

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>
Project Administrator

 

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

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    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.5