mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
GTextEditor: Allow GTextDocumentSpans to be "skippable"
Setting the is_skippable flag on a GTextDocumentSpan will now cause the cursor to skip over that span when moving with Ctrl+Left/Right.
This commit is contained in:
parent
27a30fdc2a
commit
57f7009b9e
Notes:
sideshowbarker
2024-07-19 11:12:56 +09:00
Author: https://github.com/awesomekling
Commit: 57f7009b9e
3 changed files with 56 additions and 26 deletions
|
@ -15,6 +15,7 @@ class GTextDocumentLine;
|
|||
struct GTextDocumentSpan {
|
||||
GTextRange range;
|
||||
Color color;
|
||||
bool is_skippable { false };
|
||||
const Font* font { nullptr };
|
||||
};
|
||||
|
||||
|
@ -76,6 +77,9 @@ public:
|
|||
|
||||
char character_at(const GTextPosition&) const;
|
||||
|
||||
Optional<GTextDocumentSpan> first_non_skippable_span_before(const GTextPosition&) const;
|
||||
Optional<GTextDocumentSpan> first_non_skippable_span_after(const GTextPosition&) const;
|
||||
|
||||
private:
|
||||
explicit GTextDocument(Client* client);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue