bugGNU nano - Bugs: bug #45524, redoing the insertion of a file...

 
 

bug #45524: redoing the insertion of a file fails

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Fri 10 Jul 2015 07:15:05 PM UTC  
 
Severity: 3 - NormalStatus: 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.

 

Wed 28 Oct 2015 08:30:13 PM UTC, comment #4:

The error message is spurious: the redo routine tries to determine which filestruct belongs to a certain line number, but in the case of an INSERT, 'u->mark_begin_lineno' is not a line number but the length of the insertion. To 'fix' it, just use line number 1 when redoing an INSERT, because the filestruct is not being use anyway when redoing this INSERT. The filestruct pointer cannot be left as NULL because it's used in some DEBUG statements.

Fixed in SVN, r5375.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 28 Oct 2015 05:14:15 PM UTC, comment #3:

The failure only occurs when inserting a file into the first line of the current buffer, and only when that line is the only line. When a buffer contains more than one line, redoing an insertion works fine. The content of the single line is irrelevant: it can be empty, or very long.

So the severity of this bug is much reduced.

It seems that something goes wrong during the undo on the first line, because edittop gets set to -1280068685 instead of 1.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 27 Oct 2015 08:13:01 PM UTC, comment #2:

Revision 4892 is okay, revision 4893 fails.

So it's Mark's patch from May 15 last year (which solved many things) that broke this.

Bah... Enormous patch. It changed too many things. Where the heck do I have to look?

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 27 Oct 2015 07:44:33 PM UTC, comment #1:

In nano-2.3.2 it works okay; in nano-2.3.3 it fails.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Fri 10 Jul 2015 07:15:05 PM UTC, original submission:

When having undone the reading in of some file into another, then trying to redo this results in an "Internal error" warning.

To reproduce, do 'echo echo >echo', then run nano and type:

^R echo <Enter> M-U M-E

[ Internal error: can't match line 2. Please save your work. ]

This happens in current SVN, but also in 2.3.4 (which I've still
lying around), but not in 2.2.6 which works fine in this case.

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:
   

No files currently attached

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 07 Dec 2015 03:14:09 PM UTCbensOpen/ClosedOpen=>Closed
    Wed 28 Oct 2015 08:30:13 PM UTCbensStatusNone=>Fixed
    Wed 28 Oct 2015 05:14:15 PM UTCbensSeverity4 - Important=>3 - Normal
    Tue 27 Oct 2015 07:44:33 PM UTCbensAssigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1