FarManager: Find file search text not saved when cleared
Far Manager version
3.0.6136.0 x64
OS version
10.0.22624.1690
Other software
No response
Steps to reproduce
- Press
Alt+F7
to launch Find file - Press
Alt+T
to switch to Text mode - Type in
hello
in the Containing input box - Press
Enter
to start the search - Press
Esc
to close Find file results - Press
Alt+F7
to re-launch Find file - Note that the Containing input box shows the previous search
hello
- Press
Alt+T
, thenDel
to clear the search text - Press
Enter
to start the search - Press
Esc
to close Find file results - Press
Alt+F7
to re-launch Find file
Expected behavior
The Containing input box should be empty.
Actual behavior
The Containing input box shows the previous non-empty search text hello
.
Open the Editor, press F7
to search, press Del
to clear out the hello
text from the Search for input box, press Enter
to search. Now close the Editor and press Alt+F7
to launch Find file again. You’ll notice the Containing input box is now empty.
Appears to be a recent issue which is not present in version 3.0.6134.0 x64
.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 22 (20 by maintainers)
Commits related to this issue
- gh-681: Search string in Find File dialog. — committed to MKadaner/FarManager by MKadaner a year ago
- gh-681: Search string in Find File dialog. — committed to MKadaner/FarManager by MKadaner a year ago
- find files work per gh-681. — committed to MKadaner/FarManager by MKadaner a year ago
- Fixes of Viewer / Editor / Find File search options persisting. - Fallout of 6135: Persist forgotten Find File dialog options. - gh-681: Persist empty search pattern. - gh-685: Persist "Search in ... — committed to MKadaner/FarManager by MKadaner a year ago
- Fixes of Viewer / Editor / Find File search options persisting. - Fallout of 6135: Persist forgotten Find File dialog options. - gh-681: Persist empty search pattern. - gh-685: Persist "Search in ... — committed to MKadaner/FarManager by MKadaner a year ago
- Fixes of Viewer / Editor / Find File search options persisting. - Fallout of 6135: Persist forgotten Find File dialog options. - gh-681: Persist empty search pattern. - gh-685: Persist "Search in ... — committed to MKadaner/FarManager by MKadaner a year ago
- Fixes of Viewer / Editor / Find File search options persisting. - Fallout of 6135: Persist forgotten Find File dialog options. - gh-681: Persist empty search pattern. - gh-685: Persist "Search in ... — committed to MKadaner/FarManager by MKadaner a year ago
Thank you for the early feedback, @rohitab, always appreciated.
OK. Let’s get back to basics. The original complaint here was that the empty search pattern is not saved across FF invocations. I am going to implement the following:
Probably no. That was not the case before the latest changes and I don’t remember anyone ever requesting that.
An empty search string does not make any sense in Viewer & Editor. We probably should just forbid that by disabling Prev/Next/All buttons in the dialog (see Windows Notepad for example).
In Find File, however, it does. Moreover, conceptually empty/non-empty is not about the string value per se, but about using or not using the content search, i.e. it is sort of a weird checkbox. If the user cleared the text to not look in files’ data, we definitely do not want to restore it on the next invocation.
To summarize:
Sure thing. I figured as much. Just looking at the replaced code, it’s hard to tell that it would introduce this issue. I wouldn’t have found it either during a code review.
Just speaking for myself here. I’m fine with clearing the search string, i.e., not imitating the old behavior where the search string in the Editor/Viewer is not cleared. Since everything else is shared between the searches, it makes sense to share the search string as well. Of course, other users might disagree and expect the old behavior.