Page 1 of 1

enhancing "Find next" function in text file viewer

Posted: 24 Apr 2007, 15:10
by Mity
There is one related (mis)feature in the text viewer I do not like -- that "find next/previous" searches from actual position in the file (as determined by scrollbar), not from last match.

IMHO this behavior is not expected by most users. And when talking about me, it's really irritating ;-)

Often when i need to inspect some long files (e.g. logs), I search some text pattern to locate the part of the file i'm interesting in and then need to look to various messages around it (before and/or after) to see it's not the right place in the file and need to find next one (or to compare the two places in the logs).

So I press <F3> to just realize I'm on the same place as before -- because I moved mouse wheel few line back to see what messages preceded the one with the matching text.

Or as an alternative -- a lot of editors/viewers continue to search from position of the current selection, as it highlights the last match. (Unless the user changes selection of text with mouse the two solutions behave identically.)

Regards

Posted: 24 Apr 2007, 19:21
by therube
For me, it is quirky in the way it behaves, but not too bothersome.

And actually, sometimes a subsequent find will reverse direction, before coming back to where it started from, & then proceeding in the proper direction.

http://find-sjb.googlecode.com/files/fi ... quirks.TXT

Search for '226' ...
(Lines 126-158 visible on screen, my screen at least.)

First find, Line = 129
F3, Line = 137
F3, Line = 156

Use scroll arrow up 1 line (or mouse wheel).
(Lines 125-157, or 123-155 if using mouse wheel, visible on screen.)

F3, now jumps back to Line = 129, instead of jumping down to Line = 226.

Re: enhancing "Find next" function in text file viewer

Posted: 19 Nov 2009, 22:04
by therube
No big deal, but just ran into this oddity again, so a slight bump just to say it still exists.

Re: enhancing "Find next" function in text file viewer

Posted: 21 Nov 2009, 17:31
by Ether
therube wrote:F3, now jumps back to Line = 129, instead of jumping down to Line = 226.
Line 226, are you sure?

Anyway, this behavior is useful for me in some cases and I wouldn't like to see it just "fixed". When I search for something in a bigger file, find some irrelevant matches at the beginning and realize that there's gonna be a lot of them, I can just scroll down to the part where I want and F3 find the next match starting from there.

Similarly, if I find a match and scroll in various directions to see the whole block of text, I forget where I was in the first place, I can go a little up and one or two F3's get me back there.

Of cource, this is a matter of preference and other ways to handle the search cursor have also their advantages, maybe there should be a choicein the configuration, or in the Find window.

Re: enhancing "Find next" function in text file viewer

Posted: 22 Nov 2009, 17:43
by therube
"226" is the Find string that I'm testing with.
There is also a line in the file "[226]" which happens to be line 226, so yes, once you were at line 156, you would expect the next match to be found at line 226.
When I search for something in a bigger file, find some irrelevant matches at the beginning and realize that there's gonna be a lot of them, I can just scroll down to the part where I want and F3 find the next match starting from there.
And that is precisely my point. It does not always work that way. (I think. I'll have to think about that a bit more, but not time at the moment.)