bugGNU Octave - Bugs: bug #47561, ctrl-f <enter> action can...

 
 

bug #47561: ctrl-f <enter> action can default to "replace all"

Submitter:  Lachlan Andrew <lachlan>
Submitted:  Tue 29 Mar 2016 10:24:48 AM UTC
   
 
Category:  GUI Severity:  2 - Minor
Priority:  3 - Low Item Group:  Incorrect Result
Status:  Fixed Assigned to:  lachlan
Originator Name:  Lachlan Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 16 May 2016 04:21:34 AM UTC, comment #12: 

Since Philip and Mike both have verified the patch I applied it here (http://hg.savannah.gnu.org/hgweb/octave/rev/cce4eb3f6f7c).  Thanks for catching this Lachlan.

Marked as fixed, closing report.

Rik <rik5>
Group administrator
Tue 03 May 2016 01:07:27 PM UTC, comment #11: 

or rather, fix fixes the bug (I'd better take a break)

Philip Nienhuis <philipnienhuis>
Group Member
Tue 03 May 2016 01:06:45 PM UTC, comment #10: 

And the bug fixes it, yep.

Philip Nienhuis <philipnienhuis>
Group Member
Sat 30 Apr 2016 05:18:06 PM UTC, comment #9: 

OK after building anew I can confirm the bug/unfortunate default as well.

Philip Nienhuis <philipnienhuis>
Group Member
Sat 30 Apr 2016 04:20:31 PM UTC, comment #8: 

I'll rebuild the dev version completely and try again. Perhaps several other patches (AFAICS unrelated) interfered.

Philip Nienhuis <philipnienhuis>
Group Member
Sat 30 Apr 2016 01:40:05 PM UTC, comment #7: 

And patch looks good to me.

Mike Miller <mtmiller>
Group Member
Sat 30 Apr 2016 01:38:45 PM UTC, comment #6: 

I can confirm what Lachlan reports. The Enter key activates the "Replace All" action, the dialog reports N things were replaced.

Mike Miller <mtmiller>
Group Member
Sat 30 Apr 2016 11:29:15 AM UTC, comment #5: 

Puzzling. Did you comletely document all the steps involved?
What I did:

I loaded an .m file "g.m".
=> editor popped up with file g.m

Clicked the cursor somewhere in that file in the editor and typed <ctrl>-f
==> Find dialog popped up

Inserted ";" (w/o dbl-q.) in search, and " ;" (leading space) in replace box in find dialog

Clicked "Replace all"
=> replace worked fine

Closed find dialog, stayed in editor (You didn't mention to leave the editor)
Waited 10 sec for any nasal daemons to settle down.

Opened Find dialog again using <Ctrl>-f

Typed (in that dialog) "=" (w/o dbl-q.) in search box

Hit <Return> key (with find dialog having focus)

==> Find dialog disappears. Otherwise nothing special happened.
????

Maybe the issue on my side is that the Find dialog vanishes?

My systems are Mageia-5 Linux 64bit  and  Windows7 64 bit

Philip Nienhuis <philipnienhuis>
Group Member
Sat 30 Apr 2016 03:17:15 AM UTC, comment #4: 

Puzzling...

I tried it both at work and at home, and it happens on both.

My system at home is Linux Mint Debian Edition (LMDE), with
  libqscintilla 2.9
  Qt version 4.8.7 (according to /usr/include/qt4/Qt/qglobal.h)
  Mate session manager (a fork of Gnome 2)

The behaviour I observe is the behaviour that should result from the current code, so I'm having trouble thinking of why it isn't reproducible.

Philip, thanks for testing this.  Does your session manager highlight the "default" button (i.e., one that will be activated by <ENTER>)?  If so, what does it default to at step 4?

Lachlan Andrew <lachlan>
Fri 29 Apr 2016 03:53:06 PM UTC, comment #3: 

Can't reproduce it on Linux either.

Provisionally set status to "works for me"

Philip Nienhuis <philipnienhuis>
Group Member
Thu 28 Apr 2016 08:56:28 PM UTC, comment #2: 

Lachlan,
I can't reproduce this bug on Windows 7 with 4.1.0+.
Is it a Linux-only bug?

Philip Nienhuis <philipnienhuis>
Group Member
Tue 29 Mar 2016 10:29:50 AM UTC, comment #1: 

Here's the patch.

(file #36790)

Lachlan Andrew <lachlan>
Tue 29 Mar 2016 10:24:48 AM UTC, original submission:  

To reproduce this bug do the following:

1. Open a sacrificial copy of a .m file in the GUI editor

2. Open the find dialog.  Type text to search and replace, then press "Replace all".

3. Close the dialog.  Forget you ever opened it

4. Open the find dialog.

5. Type '=' <enter>

6. Observe that all copies of '=' in the file have been replaced by the "replace" text from step 2.

7. (Adding insult to injury: Try to undo, by typing ctrl-z, and observe that only one of the replacements is undone.  Try to remember how many substitutions were made, and type ctrl-z that number of times.)

I'm not sure if retaining the most recent action is the next default is desired.  I have a patch that resets it to "find" each time the dialog is opened, which I'll attach once I have a bug number.

For some unknown reason, it also seems to reset to "find" whenever the search text is changed, which is possibly undesirable.  However, at least when repeating the most recent search by simply pressing <enter>, it seems not to reset.

Lachlan Andrew <lachlan>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

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 mtmiller (Posted a comment)
  • -email is unavailable- added by philipnienhuis
  • -email is unavailable- added by lachlan (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 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-05-16 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2016-05-14 lachlan StatusConfirmed Patch Submitted
    2016-04-30 mtmiller StatusWorks For Me Confirmed
    2016-04-29 philipnienhuis StatusPatch Submitted Works For Me
    2016-04-17 philipnienhuis Carbon-Copy- Added philipnienhuis
    2016-03-29 lachlan Attached File- Added bug_47561_default_replace.cset, #36790
        Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        StatusNone Patch Submitted
        Assigned toNone lachlan

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code