Disable horizontal scrolling when running a WrapHighlighter
This commit is contained in:
parent
23e38a254f
commit
053544d740
|
@ -736,6 +736,10 @@ struct WrapHighlighter : Highlighter
|
||||||
return LineCount{(int)(len / column)};
|
return LineCount{(int)(len / column)};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Disable vertical scrolling when using a WrapHighlighter
|
||||||
|
setup.cursor_pos.column += setup.window_pos.column;
|
||||||
|
setup.window_pos.column = 0;
|
||||||
|
|
||||||
const LineCount win_height = context.window().dimensions().line;
|
const LineCount win_height = context.window().dimensions().line;
|
||||||
LineCount win_line = 0;
|
LineCount win_line = 0;
|
||||||
for (auto buf_line = setup.window_pos.line;
|
for (auto buf_line = setup.window_pos.line;
|
||||||
|
@ -784,7 +788,7 @@ struct WrapHighlighter : Highlighter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static HighlighterAndId create(HighlighterParameters params)
|
static HighlighterAndId create(HighlighterParameters params)
|
||||||
{
|
{
|
||||||
if (params.size() != 0)
|
if (params.size() != 0)
|
||||||
throw runtime_error("wrong parameter count");
|
throw runtime_error("wrong parameter count");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user