Ticket #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:
- load a file in Padre
- select Search->Find
- enter a search term
- click cancel
- change something in the file
- save
- 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
comment:1 Changed 3 years ago by Mutant
- Cc sam_crawley@… added
- Status changed from new to closed
- Resolution set to fixed
comment:2 Changed 3 years ago by zenogantner
- Status changed from closed to reopened
- Resolution fixed deleted
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 3 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 3 years ago by zenogantner
Yes, I am actually doing a search. That was a bit unclear, sorry.
Here is how to reconstruct the bug:
- load a file in Padre
- select Search->Find
- enter a search term
3a. click 'Find next'
- click 'Cancel'
- change something in the file
- save the file
- 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 3 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 3 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:
- load a file in Padre
- select Search->Find / Ctrl+F / the search button
- enter a search term
- click 'Find next'
- click 'Cancel'
- move the cursor to get rid of the selection
- 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

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