'wrap search'-option in internal textfile viewer

We welcome any suggestions for new features or improvements in Altap Salamander. Please post one suggestion per report.
freckyo
Posts: 8
Joined: 29 Apr 2006, 23:07
Location: Warendorf, Germany
Contact:

'wrap search'-option in internal textfile viewer

Post by freckyo »

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.
Jan Patera
Plugin Developer
Plugin Developer
Posts: 707
Joined: 08 Dec 2005, 14:33
Location: Prague, Czech Republic
Contact:

Re: 'wrap search'-option in internal textfile viewer

Post by Jan Patera »

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.
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.
User avatar
KNUT
Posts: 286
Joined: 12 Dec 2005, 09:57
Location: Hamburg, Germany

Re: 'wrap search'-option in internal textfile viewer

Post by KNUT »

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.
This is the better solution, I think.
Kind regards, KNUT
_____________________________________________
Satisfied Servant Salamander User from Version 1.5 till now
freckyo
Posts: 8
Joined: 29 Apr 2006, 23:07
Location: Warendorf, Germany
Contact:

Post by freckyo »

Or maye instead of a new checkbox it should simply ask "Continue searching from the begining?" when the document end is reached.
Yes, this would be a good solution. The "Yes" Button should be preselected.
freckyo
Posts: 8
Joined: 29 Apr 2006, 23:07
Location: Warendorf, Germany
Contact:

Post by freckyo »

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.
Jan Patera
Plugin Developer
Plugin Developer
Posts: 707
Joined: 08 Dec 2005, 14:33
Location: Prague, Czech Republic
Contact:

Post by Jan Patera »

freckyo wrote:Thus the message box is even displayed, if the file contains the second string, but only above the current position.
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).
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....
User avatar
SvA
Posts: 483
Joined: 29 Mar 2006, 02:41
Location: DE

Post by SvA »

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).
This seems to be an acceptable solution. It adds functionality without addin overhead to the UI and 5s easy to comprehend.
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....
Yes, I often do a similar thing:
  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...
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.
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).

On the other hand, if someone wants to search the whole file, why not simply press HOME before starting the search?
mity

Post by mity »

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).
Post Reply