LibGUI: Implement trailing whitespace visualization in TextEditor

This patch adds an optional mode where TextEditor highlights trailing
whitespace characters on each line with a nice reddish dither pattern.

We should probably make this themable and I'm sure it could be nicer
somehow, but this is just a first cut and I do kinda like it. :^)
This commit is contained in:
Andreas Kling 2020-09-01 19:10:55 +02:00
commit aa70d8c217
Notes: sideshowbarker 2024-07-19 02:55:52 +09:00
4 changed files with 52 additions and 0 deletions

View file

@ -177,6 +177,8 @@ public:
void remove_range(TextDocument&, size_t start, size_t length);
size_t first_non_whitespace_column() const;
Optional<size_t> last_non_whitespace_column() const;
bool ends_in_whitespace() const;
private:
// NOTE: This vector is null terminated.