D19367: [RFC]SearchBar: Don't block GUI when enter incremental pattern
noreply at phabricator.kde.org
Tue Feb 26 19:22:27 GMT 2019
loh.tar created this revision.
loh.tar added a reviewer: KTextEditor.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
loh.tar requested review of this revision.
When the document is very big and there is no early match while you enter the
search pattern the GUI hangs as long the search is running after each key
stroke. This patch break the document in smaller chunks to search to return fast
enough to the event loop to update user input.
- Disable next/prev buttons when not match
- There may a range added where fromPos = toPos. Happens when start from first or last position of the doc. For my taste is that better than to check every time that very rare case
- See code
- Merge selectRange2 into indicateMatch
- There is a status (KSqueezedTextLabel) set in indicateMatch, but I have never seen this hint. Tinker the UI file make it visible. Not so bad. Do anyone knows why this is still there? May that be better to use instead of the fancy in-view-hint which is sometimes annoying because it hides the text? Then Ctrl-H would only use fancy in-view-hint when no bar is visible. PowerUi would need such label too.
To: loh.tar, #ktexteditor
Cc: kwrite-devel, kde-frameworks-devel, #ktexteditor, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KWrite-Devel