diff options
| author | Maxime Coste <mawww@kakoune.org> | 2022-07-13 12:24:14 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2022-07-13 12:24:14 +1000 |
| commit | c7fbf1f3905f77f136e898479352e590787434d2 (patch) | |
| tree | 190edecbc65bac3c2e03a53b62056b3a981cd90a /src/display_buffer.hh | |
| parent | 195fe8fd29a1824372ff69e6ef8b8e5be8bc9a07 (diff) | |
Re-work line trimming to fix issues with column highighters
Instead of triming only buffer ranges, add a trim_from method to
display line to keep the initial N columns, we know how many columns
are used by non-trimable widgets in DisplaySetup::widget_columns so
we can just pass this.
Also restore the previous logic for face merging
Fixes #4670
Diffstat (limited to 'src/display_buffer.hh')
| -rw-r--r-- | src/display_buffer.hh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/display_buffer.hh b/src/display_buffer.hh index af37b18f..8008f86a 100644 --- a/src/display_buffer.hh +++ b/src/display_buffer.hh @@ -144,9 +144,13 @@ public: iterator erase(iterator beg, iterator end); DisplayAtom& push_back(DisplayAtom atom); - // remove first_col from the begining of the line, and make sure + // remove front from the begining of the line, and make sure // the line is less that col_count character - bool trim(ColumnCount first_col, ColumnCount col_count, bool only_buffer = false); + bool trim(ColumnCount front, ColumnCount col_count); + + // remove front from the begining of the line + first_col, and make sure + // the line is less that col_count character + bool trim_from(ColumnCount first_col, ColumnCount front, ColumnCount col_count); // Merge together consecutive atoms sharing the same display attributes void optimize(); |
