-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to do search selection without actually selecting text for editing? #31
Comments
At the moment edbee only renders the current selection ... You can control the complete rendering yourself, by subclassing the TextEditorRenderer class and make edbee use the new[renderer via: widget->textEditorComponent()->giveTextEditorRenderer( .. ) Maybe I should build in support for custom non-selected regions (painting extra regions with borders like sublime does). By adding an extra TextRangeSet that can be set. btw. To find textranges in edbee editor, you can use the TextSearcher class, which supports regexp searching and multiple selections. |
I've just implemented TextEditorController::borderedTextRanges... Example for the FindWidget in the edbee app: void FindWidget::textChanged(const QString &text)
{
edbee::TextEditorController* controller = editorRef_->controller();
edbee::TextSearcher* searcher = controller->textSearcher();
searcher->setSearchTerm(text);
searcher->markAll(controller->borderedTextRanges());
controller->update();
} |
This is a quick solution for, rendering special areas. |
Perfect! Thanks so much :) |
Sublime allows selecting, or highlighting searched text of sorts without the text actually being selected for editing when you use the 'search in all open files' option. Is this possible in edbee?
The text was updated successfully, but these errors were encountered: