Disable horizontal scrolling when running a WrapHighlighter

This commit is contained in:
Maxime Coste 2017-05-01 21:32:38 +01:00
parent 23e38a254f
commit 053544d740

View File

@ -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;