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

 
 

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

bug #45524: redoing the insertion of a file fails

Submitter:  Benno Schulenberg <bens>
Submitted:  Fri 10 Jul 2015 07:15:05 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

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

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-07 bens Open/ClosedOpen Closed
    2015-10-28 bens StatusNone Fixed
    2015-10-28 bens Severity4 - Important 3 - Normal
    2015-10-27 bens Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code