bugGNU Octave - Bugs: bug #39645, weird characters inserted when...

 
 

bug #39645: weird characters inserted when searching in readline

Submitted by:  CarnĂ« Draug <carandraug>
Submitted on:  Thu 01 Aug 2013 03:33:32 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 27 Feb 2014 01:44:09 PM UTC, comment #4:

FYI: this should now be fixed with readline 6.3 released 2014-02-26.

Mike Miller <mtmiller>
Project Member
Thu 12 Sep 2013 01:13:06 PM UTC, comment #3:

I've confirmed this as a bug in readline and reported it along with a patch:

https://lists.gnu.org/archive/html/bug-readline/2013-09/msg00001.html

I don't think there's anything we can do about it in Octave other than wait for patches to readline to trickle down.

As a workaround you can hit the arrow key twice very quickly.

Mike Miller <mtmiller>
Project Member
Fri 06 Sep 2013 03:51:50 AM UTC, comment #2:

I believe this is the relevant readline feature that is triggering this bug:

http://git.savannah.gnu.org/cgit/readline.git/tree/isearch.c#n387

In short, the escape key terminates the interactive search mode. If other characters are read within a certain timeout, the escape character is sent again so that they total key combination is preserved. This is not happening in Octave.

I don't think this is a timeout problem, however. I made a hack to set the readline input timeout to a full second. Now it simply pauses for a second before displaying "[D" when I press the left arrow key.

Also if I type fast enough I can get readline to accept sequences beginning with escape while in the search mode, for example Esc u, but entering the Alt-u combination fails and just prints "u".

Mike Miller <mtmiller>
Project Member
Sun 04 Aug 2013 10:03:20 PM UTC, comment #1:

This bug is triggered when any escape-prefixed keyboard key is pressed while in the readline interactive search mode (Ctrl-R). The escape character is lost somewhere and the rest of the characters are output verbatim. On my keyboard, this includes the four arrow keys, page up, page down, home, end, insert, and delete.

Both command-line Octave and the GUI terminal.

Mike Miller <mtmiller>
Project Member
Thu 01 Aug 2013 03:33:32 PM UTC, original submission:

Using the readline feature to search history (Ctr+R), pressing up and down to move between the logs work fine. However, after finding the desired line, using the left or right arrow to move in that line, inserts the [C or [D characters forcing to remove them manually. This does not happen in the shell.

Here's how to reproduce:

1. press Ctr+R to start searching the log
2. press left arrow to move on that line
3. the characters "[D" will be inserted

If the right arrow is pressed, "[C" is inserted instead.

Carnë Draug <carandraug>
Project Member

 

(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 rik5 (Updated the item)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by jordigh (Updated the item)
  • -unavailable- added by carandraug (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 project members 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
    Thu 17 Oct 2013 09:56:07 PM UTCrik5StatusConfirmed=>Invalid
      Open/ClosedOpen=>Closed
    Sun 04 Aug 2013 10:03:20 PM UTCmtmillerItem GroupNone=>Incorrect Result
    Thu 01 Aug 2013 03:54:33 PM UTCjordighStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup