Disable horizontal scroll offset support when wrapping
This commit is contained in:
parent
8fa7e67abc
commit
75e6b54ae2
|
@ -46,7 +46,7 @@ struct DisplaySetup
|
||||||
// Position of the cursor in the window
|
// Position of the cursor in the window
|
||||||
DisplayCoord cursor_pos;
|
DisplayCoord cursor_pos;
|
||||||
// Offset of line and columns that must remain visible around cursor
|
// Offset of line and columns that must remain visible around cursor
|
||||||
const DisplayCoord scroll_offset;
|
DisplayCoord scroll_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Highlighter
|
struct Highlighter
|
||||||
|
|
|
@ -742,9 +742,10 @@ struct WrapHighlighter : Highlighter
|
||||||
return count;
|
return count;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Disable vertical scrolling when using a WrapHighlighter
|
// Disable horizontal scrolling when using a WrapHighlighter
|
||||||
setup.cursor_pos.column += setup.window_pos.column;
|
setup.cursor_pos.column += setup.window_pos.column;
|
||||||
setup.window_pos.column = 0;
|
setup.window_pos.column = 0;
|
||||||
|
setup.scroll_offset.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;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user