bugGNU Octave - Bugs: bug #65646, editor deletes selected text when...

 
 

bug #65646: editor deletes selected text when function key or control key used

Submitter:  None
Submitted:  Fri 26 Apr 2024 08:23:37 AM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Tim van Zon Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 8.4.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 06 May 2024 03:27:06 PM UTC, comment #6: 

comment #4:

> Maybe if I upgrade to octave-9.1 to bug will be gone in Ubuntu-22.04, as it did for Pantxo Diribarne (Mint 22), but I had a lot of work fixing scripts and custom functions from octave 4.2.2 to 8.4, so I am hesitant...
>


The changes from version 4.2.2 to 8.4 are much, much larger than those from 8.4 to 9.1.  I would expect much less trouble.  Also, as 9.1 is available for download, it wouldn't be too much of an effort to check whether 1) the problem with the editor is fixed, and 2) any of your scripts are disrupted.  If there are still disruptions then you could make the decision about which problem is more onerous: text selection or updating your m-files.

Rik <rik5>
Group administrator
Mon 06 May 2024 08:03:30 AM UTC, comment #5: 

I now understand that for this bug you had to have a textbox active in another window BEFORE selecting text in the octave GUI. So then the cursor did not have to leave the GUI after selecting the text and pressing F9. I now better understand that this bug is affecting my work-flow.

So maybe just typing something in the octave GUI after visiting a textbox will prevent the bug showing up...

Anonymous
Mon 06 May 2024 07:13:37 AM UTC, comment #4: 

Thank you for looking into this.
I am using qt5-15.11 and libqscintilla2_qt5.so.15.0.0 from a fresh Ubuntu 22.04 install.

I am sure that I do not have to 'leave' the octave GUI to get this; I just select text to execute and press F9 and then sometimes the text is gone, without the mouse pointer leaving the octave GUI. (I do have focus-follows-mouse enabled)

I also have it when selecting text (for use as a filename) and press the 'save-as' button in the GUI, or the crtl-F to search for the selected string. In both cases I am not leaving the octave GUI, but I am switching to another (octave) window with a text-field...

I understand this is likely an upstream bug, just disappointed that I am suffering from it with these newer libraries than mentioned in the juffed-bug.

Maybe if I upgrade to octave-9.1 to bug will be gone in Ubuntu-22.04, as it did for Pantxo Diribarne (Mint 22), but I had a lot of work fixing scripts and custom functions from octave 4.2.2 to 8.4, so I am hesitant...


Anonymous
Thu 02 May 2024 06:41:38 PM UTC, comment #3: 

Normal behavior when text is selected, and then new text is typed, is for the selected text to be deleted and the newly typed text to replace the old text.

That is what should happen for normal new text, but for function keys such as F9 or modified keys such as Ctrl+F this deletion should not occur.

This could be a bug in the libraries.  A little googling led me to this report: https://github.com/Mezomish/juffed/issues/112.  Symptom seems to be the same, and Qscintilla library probably to blame.  I'm going to mark this as an upstream bug, rather than an Octave bug.

Note that the actions to reproduce the bug mentioned in the github report specify that the program outside of Octave needs to be using a textbox widget.  That probably explains the observation by Clément that only certain external programs trigger the bug (e.g., not rythmbox).

Rik <rik5>
Group administrator
Wed 01 May 2024 06:13:13 PM UTC, comment #2: 

I am able to reproduce the bug using the procedure described in comment #1 and Octave 9.1 under ubuntu 20.04, but not under linux mint 22 (based on ubuntu 22.04). So this may be ubuntu version specific or due to the Qt version in use.

Pantxo Diribarne <pantxo>
Group Member
Mon 29 Apr 2024 12:45:01 PM UTC, comment #1: 

I think I have been struggling with the same bug. Here is a reproducible way of triggering the issue (on ubuntu 20.04):

  • Open octave's GUI
  • In an unnamed page of the editor, write anything, e.g. "toto"
  • Open a new instance of GIMP (Okular works as well but not e.g. rythmbox).
  • Give the focus back to Octave
  • Select "toto" (e.g. double click on the word)
  • Press F9 (or CTRL)


"toto" will be deleted.

Clément Bret <clem_bret>
Fri 26 Apr 2024 08:23:37 AM UTC, original submission:  

I have been using 8.4.0 for a couple of months now (I worked with 4.2.2 before switching to 8.4)

Several times a day I have this, but not always:
I select some text in the editor. I do something, like ctrl F to search for that string, or I press F9 to execute that code, or just with the intention to paste the selected text somewhere.
And then the selected text is removed from the file (file is displayed as being modified).
(in the case of selecting text and pressing F9, when the text is removed, the selected code is NOT executed (so it happens before the interpreter is doing stuff))
(in the case of the intention to paste the code somewhere, the pasting does not work (it pastes nothing), the buffer for pasting seems empty)

Normally, selected text is replaced by newly entered characters, but now, I am NOT entering any characters to replace it with.

I always see that nothing is inserted at the location where the removed selected text was, also no space is inserted, the text is just removed.  (I think it leaves the cursor at the location of the removed text, but i am not sure because often I am not immediately aware that the text was removed)



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 rik5 (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by clem_bret (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 group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-05-02 rik5 StatusWorks For Me Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
        Summaryeditor removes selected text editor deletes selected text when function key or control key used
    2024-05-01 pantxo StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code