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