bugGNU nano - Bugs: bug #46347, when pasting text, a backward mark...

 
 

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

bug #46347: when pasting text, a backward mark is not adjusted correctly

Submitter:  Benno Schulenberg <bens>
Submitted:  Sat 31 Oct 2015 12:32:34 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Sat 31 Oct 2015 08:40:35 PM UTC, comment #1: 

Fixed in SVN, r5384.  It fixes both the described case, and the case where the pasted text does not contain a newline.

After r5385, things can still be further rearranged, to simplify the logic, but that is for some other day.

Benno Schulenberg <bens>
Group administrator
Sat 31 Oct 2015 12:32:34 PM UTC, original submission:  

When the mark is on, and the mark is set behind the cursor (either on the same line, or somewhere on a later line), then pasting text does not properly adjust the position of the mark.  The exact same piece of text should stay marked, but it changes in weird ways.

To reproduce, run 'nn +6,27 README' and then type:
M-A  <Down>  <Right>  <Right>  <Right>  M-6

A little more than one line of text has been copied to the cutbuffer.  Now type:
M-A  <Ctrl+Right>  <Ctrl+Right>  ^U

Now both "and friendly " and the pasted text are marked, as expected -- with a forward mark, it works fine.  Okay, so undo it and try it with a backward mark:

M-U  M-A  <Ctrl+Left>  <Ctrl+Left>  ^U

Oh!  Instead of "and friendly " now "lly easy-to-use " is marked.  Wrong.

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
    2015-12-07 bens Open/ClosedOpen Closed
    2015-10-31 bens StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code