PageDown, PageUp is setting cursor position to beginning of line now
This commit is contained in:
@@ -455,11 +455,10 @@ void MoveCursorByPageSize(Window *window, int direction, bool shift = false) {
|
||||
|
||||
For (set.view->carets) {
|
||||
XY xy = PosToXY(set.buffer, GetFront(it));
|
||||
xy.col = 0;
|
||||
if (direction == DIR_DOWN && xy.line == set.buffer->line_starts.len - 1) {
|
||||
Range line_range = GetLineRange(set.buffer, xy.line);
|
||||
xy.col = line_range.max - line_range.min;
|
||||
} else if (direction == DIR_UP && xy.line == 0) {
|
||||
xy.col = 0;
|
||||
}
|
||||
xy.line += y;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user