Page up page down
This commit is contained in:
@@ -609,15 +609,15 @@ int64_t MoveLeft(Buffer &buffer, int64_t pos) {
|
||||
return pos;
|
||||
}
|
||||
|
||||
int64_t MoveDown(Buffer &buffer, int64_t pos) {
|
||||
int64_t MoveDown(Buffer &buffer, int64_t pos, int64_t count = 1) {
|
||||
LineAndColumn info = FindLineAndColumn(buffer, pos);
|
||||
int64_t new_pos = FindPos(buffer, info.line.number + 1, info.column);
|
||||
int64_t new_pos = FindPos(buffer, info.line.number + count, info.column);
|
||||
return new_pos;
|
||||
}
|
||||
|
||||
int64_t MoveUp(Buffer &buffer, int64_t pos) {
|
||||
int64_t MoveUp(Buffer &buffer, int64_t pos, int64_t count = 1) {
|
||||
LineAndColumn info = FindLineAndColumn(buffer, pos);
|
||||
int64_t new_pos = FindPos(buffer, info.line.number - 1, info.column);
|
||||
int64_t new_pos = FindPos(buffer, info.line.number - count, info.column);
|
||||
return new_pos;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user