mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +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
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