mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
Merge pull request #72067 from ClickHouse/backport/24.8/72049
Backport #72049 to 24.8: Another fix for client syntax highlighting
This commit is contained in:
commit
b1a405c2c4
@ -53,7 +53,12 @@ void Expected::highlight(HighlightedRange range)
|
|||||||
/// for each highlight x and the next one y: x.end <= y.begin, thus preventing any overlap.
|
/// for each highlight x and the next one y: x.end <= y.begin, thus preventing any overlap.
|
||||||
|
|
||||||
if (it != highlights.begin())
|
if (it != highlights.begin())
|
||||||
it = std::prev(it);
|
{
|
||||||
|
auto prev_it = std::prev(it);
|
||||||
|
|
||||||
|
if (range.begin < prev_it->end)
|
||||||
|
it = prev_it;
|
||||||
|
}
|
||||||
|
|
||||||
while (it != highlights.end() && range.begin < it->end)
|
while (it != highlights.end() && range.begin < it->end)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user