mainThe GNU Readline library - Support: sr #109478, Readline does not maintain mark...

 
 

sr #109478: Readline does not maintain mark correctly when inserting text

Submitter:  None
Submitted:  Wed 21 Mar 2018 08:04:12 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Wont Do
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 26 Dec 2018 07:47:44 PM UTC, comment #1: 

This is how the mark works in readline. It is a saved value of point, which is an offset in characters from the beginning of the line. It is not a saved offset from point, does not move when point does, and does not track the character it's on when set.

This is how it works in vi mode, too.

Chet Ramey <chet>
Group administrator
Wed 21 Mar 2018 08:04:12 PM UTC, original submission:  

The behavior, described in detail below, is observed on multiple systems:

GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu) with libreadline.so.6.3

GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu) with /lib64/libreadline.so.6.0

GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu) with
/usr/lib/libreadline.so.5.1




1. Type text into a bash interactive shell, e.g., "0123456789"
2. Cursor left, e.g., move left two spaces so point is between 7 and 8.
3. Exchange point and mark with "C-x C-x".  Mark is now between 7 and 8 and point is at beginning of line (initial mark)
4. Type new characters, e.g., "abc"
5. Exchange point and mark.
 
=> The cursor (point) is improperly placed in the same absolute position where the mark was, not the logical location in the text.  In the example of (4), point is placed length("abc") to the left of where is should be.

Note: In the CHANGES from readline-5.2 to readline-6.0, a similar bug was fixed specific to vi mode.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

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 chet (Posted a comment)
  • -email is unavailable- added by None (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.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-12-26 chet StatusNone Wont Do

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code