I would find it very useful, if the internal viewer's search dialog (CTRL+F) would provide a 'wrap search' option. It should be selected by default. If selected, the viewer shouldn't display the "Cannot find String 'xyz'" message box at the end of file, but restart the search from the file's beginning.
Only if the file doesn't contain the search string at all, the viewer should display the "Cannot find..." message box.
The CTRL+N and CTRL+P shortcuts should work in the same way.
'wrap search'-option in internal textfile viewer
-
- Plugin Developer
- Posts: 707
- Joined: 08 Dec 2005, 14:33
- Location: Prague, Czech Republic
- Contact:
Re: 'wrap search'-option in internal textfile viewer
Or maye instead of a new checkbox it should simply ask "Continue searching from the begining?" when the document end is reached.freckyo wrote:If selected, the viewer shouldn't display the "Cannot find String 'xyz'" message box at the end of file, but restart the search from the file's beginning.
Only if the file doesn't contain the search string at all, the viewer should display the "Cannot find..." message box.
I think it should also display smtg like "Finished searching" when the entire wrapped document is searched and the start position is reached again. It is better than infinite looping.
Re: 'wrap search'-option in internal textfile viewer
This is the better solution, I think.Jan Patera wrote:Or maye instead of a new checkbox it should simply ask "Continue searching from the begining?" when the document end is reached.
I think it should also display smtg like "Finished searching" when the entire wrapped document is searched and the start position is reached again. It is better than infinite looping.
Kind regards, KNUT
_____________________________________________
Satisfied Servant Salamander User from Version 1.5 till now
_____________________________________________
Satisfied Servant Salamander User from Version 1.5 till now
To describe my problem more concrete:
I often search for a specific string 'abc' in a large textfile. If the file contains the string, its first occurence is highlighted.
When I now search a second string 'xyz', the search-algorithm starts at the current position and displays a "Cannot find the string 'xyz'" message box if the string isn't found between the current position and the file's end. Thus the message box is even displayed, if the file contains the second string, but only above the current position.
I often search for a specific string 'abc' in a large textfile. If the file contains the string, its first occurence is highlighted.
When I now search a second string 'xyz', the search-algorithm starts at the current position and displays a "Cannot find the string 'xyz'" message box if the string isn't found between the current position and the file's end. Thus the message box is even displayed, if the file contains the second string, but only above the current position.
-
- Plugin Developer
- Posts: 707
- Joined: 08 Dec 2005, 14:33
- Location: Prague, Czech Republic
- Contact:
My proposal is - SS should ask the user if he wants to search from the beginning - this should solve your problem - it is just about hitting Esc (no) vers. Enter (yes).freckyo wrote:Thus the message box is even displayed, if the file contains the second string, but only above the current position.
On the other hand, I often do the following: I know that the seacrh string has dozens of occurences in the first 50% of the file but I don't know and want to know if also any in the 2nd half of the file -> I scroll to 50% and start searching. Automatic wrap would puzzle me....
This seems to be an acceptable solution. It adds functionality without addin overhead to the UI and 5s easy to comprehend.Jan Patera wrote:My proposal is - SS should ask the user if he wants to search from the beginning - this should solve your problem - it is just about hitting Esc (no) vers. Enter (yes).
Yes, I often do a similar thing:Jan Patera wrote:On the other hand, I often do the following: I know that the seacrh string has dozens of occurences in the first 50% of the file but I don't know and want to know if also any in the 2nd half of the file -> I scroll to 50% and start searching. Automatic wrap would puzzle me....
1) search for some trigger (i.e. a section heading, a date, a keyword).
2) search from this point onward for target pattern.
Automatic wrap would confuse me...
With Jan's suggestion this is superfluous. Moreover, if it was there, Salamander shoud not check it by default, but remember it's last state (or set it to a userdefined prefered state).freckyo wrote:I would find it very useful, if the internal viewer's search dialog (CTRL+F) would provide a 'wrap search' option. It should be selected by default.
On the other hand, if someone wants to search the whole file, why not simply press HOME before starting the search?
I believe that it should be more configurable (in search->find... dialog in the text viewer probably).
A lot of people (i certainly do) prefer an automatic wrap with being interrupted with any dialog, yet no behavior can suit all users.
An ideal solution (for me at least) would be, let the user choose in find dialog:
(1) Never wrap (current behavior)
(2) Wrap always
(3) Ask the user
When wrapped automatically (option (2)), some feedback should be displayed, but not any modal dialog. (small popup message which will disappear shortly or you can add status bar in the text viewer, as a lot of other apps do to show this kind of messages).
A lot of people (i certainly do) prefer an automatic wrap with being interrupted with any dialog, yet no behavior can suit all users.
An ideal solution (for me at least) would be, let the user choose in find dialog:
(1) Never wrap (current behavior)
(2) Wrap always
(3) Ask the user
When wrapped automatically (option (2)), some feedback should be displayed, but not any modal dialog. (small popup message which will disappear shortly or you can add status bar in the text viewer, as a lot of other apps do to show this kind of messages).