| Message |
I'm torn between agreeing it is a bug and trying to fix it, or trying to explain why it isn't a bug ...
First, by design, the find feature has a granularity of one "item". So for example, if you search the triggers list for "foo" and "foo" appears twice in a trigger (eg. in the Send box), that trigger is only "found" once.
Further, the find feature uses shared code (eg. finding triggers, line in the output, variables, timers, aliases etc.) because they all do basically the same thing:
- From a nominated starting item:
- Search the item for the desired string or regexp
- If found, remember the matching item
- Advance to the next item (forwards or backwards) for next time
This explains the behaviour you are seeing, once a line is matched, it starts again on the next line.
The item is remembered as a single number (eg. line number, item number in the triggers list).
I can't just remember the matching word in the output buffer as an offset from the start, because as lines are scrolled off the top of the buffer that offset would change. It would have to be a line-number/offset pair.
Even if the matching position *was* remembered, there would be cases where it wouldn't apply. For example:
Search for: ^Worstje says
Regexp: checked
In that case, we couldn't restart the search on the same line, because the anchored regexp wouldn't apply. (Nor could we re-apply the regexp starting at an offset, because that would then erroneously match on: "Worstje says Worstje says").
I am inclined to regard this as a documentation problem, and document that this is the expected behaviour.
I note that the Find function has been in MUSHclient since version 2.0 (May 2007) and you are the first to complain about this behaviour.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|