Opened 4 years ago

Closed 4 years ago

#896 closed defect (fixed)

search term is not remembered by the text input field

Reported by: zenogantner Owned by:
Priority: minor Milestone:
Component: editor Version: trunk
Keywords: search usability inconsistency Cc: sam_crawley@…

Description

If I perform a search, and then save the file, the search term is not remembered by the search dialog.

Here is how to reconstruct the bug:

  1. load a file in Padre
  2. select Search->Find
  3. enter a search term
  4. click cancel
  5. change something in the file
  6. save
  7. select Search->Find

Note that hitting F3 still lets you search for the term, so it is not entirely lost.

If you do not save the file, the search term also remains in the dialog.

I know this is not a severe bug, but it is a small inconsistency that can confuse users, and sometimes you want to search for the same term again ...

Padre r11141
Wx Version=(0.9701) wxWidgets 2.8.10 unicode=(1)
v5.10.0 built for i486-linux-gnu-thread-multi

Change History (7)

comment:1 Changed 4 years ago by Mutant

  • Cc sam_crawley@… added
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r11320 .. this was actually a more general problem, I don't think it was directly related to saving files.

comment:2 Changed 4 years ago by zenogantner

  • Resolution fixed deleted
  • Status changed from closed to reopened

Sorry to reopen it, but Mutant fixed a different bug.
The bug is still reproducible as of r11342, just follow the steps above.

comment:3 Changed 4 years ago by Mutant

Hi... just to confirm, between steps 3 & 4, are you actually doing a search? (i.e. clicking "Find Next" or "Find all"?)

If not, then this might be expected behaviour - i.e. we shouldn't save the search term if the user enters it, then clicks cancel immediately.

If you are actually doing a search, I'm not able to duplicate this.

comment:4 Changed 4 years ago by zenogantner

Yes, I am actually doing a search. That was a bit unclear, sorry.

Here is how to reconstruct the bug:

  1. load a file in Padre
  2. select Search->Find
  3. enter a search term

3a. click 'Find next'

  1. click 'Cancel'
  2. change something in the file
  3. save the file
  4. select Search->Find

I don't think it is intended behaviour, it does not happen when I leave out steps 5+6.

Also interesting: By searching with F3 in between, the memory comes back.

If you cannot reproduce this behaviour, we should check whether we have same setup/components.

comment:5 Changed 4 years ago by Mutant

I've tried again, and still can't duplicate this. I'm running Ubuntu 9.10, perl 5.10, probably all the latest modules from CPAN (only setup this box a couple of weeks ago).

Beyond setup, there may be another piece of the puzzle missing.. i.e. is it any type of change in the file, any type of file you're opening, how are you saving (menu, button, hotkey, etc)?

comment:6 Changed 4 years ago by zenogantner

  • Summary changed from search term is not remembered after saving the file to search term is not remembered by the text input field

Okay, I tried a bit more.

It seems that all the "remembering" depends on whether there is selected text or not.
Sorry for the confusing description - it does not depend at all on saving or not saving.

Still, the problem is that the search term is only kept in the history (and in the memory of the F3-search), but not as the current search term in the input field.

I think there should be different behaviour, the last search term used should be in the input field, except there is a text selection.

I checked with gedit and Firefox, and they more or less handle it this way (of course, the interface is a bit different).

For the cancel button, I agree that this can be a bit misleading.
I think it should be rather have the label "Close", as in gedit,
because it is - besides 'Find All' - the only way of closing the dialog, no matter whether there was an action performed or not.

I changed the title of this ticket to "search term is not remembered by the text input field"
to reflect what we found out here.

The proper way to reproduce the behaviour is now:

  1. load a file in Padre
  2. select Search->Find / Ctrl+F / the search button
  3. enter a search term
  4. click 'Find next'
  5. click 'Cancel'
  6. move the cursor to get rid of the selection
  7. select Search->Find / Ctrl+F / the search button

actual result: an empty input field at the 'Find text:' prompt.

expected result: the last search term should be in that input field

comment:7 Changed 4 years ago by Mutant

  • Resolution set to fixed
  • Status changed from reopened to closed

More or less agree that the behaviour you suggest is less confusing, and the usual for a lot of existing editors. I've changed this, and relabeled the button. In r11371

Note: See TracTickets for help on using tickets.