Page 49 of 49

Re: QSearch plugin

Posted: Tue Sep 15, 2026 9:51 am
by Sergei314
Hello DV,

Thank you for developing and maintaining QSearch. I use the on-the-fly search mode very often and would like to suggest a small optimization.

When searching a large text file, if the current search string is already not found, QSearch continues performing a new search after every additional character typed.

For example:

abc → NOT FOUND
abcd → searches again
abcde → searches again
abcdef → searches again

For a normal literal search, once "abc" is known not to exist in the document, there is no need to search again when characters are only appended to it, because "abcd", "abcde", etc. cannot exist either.

This becomes especially noticeable with large text files. A common practical case is accidentally typing with the wrong keyboard layout: after the first few characters QSearch already shows "Not Found", but every following character still causes another search and the editor may noticeably pause.

Would it be possible to optimize the on-the-fly mode so that, after NOT FOUND, QSearch temporarily stops searching while the user is only appending characters to the already-not-found string?

Searching should resume when the user deletes characters, changes the existing part of the search string, or otherwise modifies it so that a match may become possible again.

I understand that regular expressions and special characters (*, ?) may require the current behavior, so this optimization could apply only to normal literal search.

Thank you for considering this suggestion.