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

 
 

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

Submitted by:  Lachlan Andrew <lachlan>
Submitted on:  Tue 29 Mar 2016 10:24:48 AM UTC  
 
Category: GUISeverity: 2 - Minor
Priority: 3 - LowItem Group: Incorrect Result
Status: FixedAssigned to: Lachlan Andrew <lachlan>
Originator Name: LachlanOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission 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>
Project 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>
Project Member
Tue 03 May 2016 01:06:45 PM UTC, comment #10:

And the bug fixes it, yep.

Philip Nienhuis <philipnienhuis>
Project 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>
Project 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>
Project Member
Sat 30 Apr 2016 01:40:05 PM UTC, comment #7:

And patch looks good to me.

Mike Miller <mtmiller>
Project Administrator
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>
Project Administrator
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>
Project 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>
Project MemberIn charge of this item.
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>
Project 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>
Project Member
Tue 29 Mar 2016 10:29:50 AM UTC, comment #1:

Here's the patch.

(file #36790)

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
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>
Project MemberIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 16 May 2016 04:21:34 AM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Sat 14 May 2016 01:21:10 AM UTClachlanStatusConfirmed=>Patch Submitted
    Sat 30 Apr 2016 01:38:45 PM UTCmtmillerStatusWorks For Me=>Confirmed
    Fri 29 Apr 2016 03:53:06 PM UTCphilipnienhuisStatusPatch Submitted=>Works For Me
    Sun 17 Apr 2016 12:28:58 PM UTCphilipnienhuisCarbon-Copy-=>Added philipnienhuis
    Tue 29 Mar 2016 10:29:50 AM UTClachlanAttached 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.1-cleanup1