Fix page down behavior, resolves #1
All checks were successful
timw4mail/php-kilo/pipeline/head This commit looks good
All checks were successful
timw4mail/php-kilo/pipeline/head This commit looks good
This commit is contained in:
parent
4812d548a7
commit
228576ccf1
@ -778,7 +778,7 @@ class Editor {
|
||||
break;
|
||||
|
||||
default:
|
||||
// Do nothing
|
||||
return;
|
||||
}
|
||||
|
||||
// Snap cursor to the end of a row when moving
|
||||
@ -792,8 +792,9 @@ class Editor {
|
||||
}
|
||||
|
||||
$this->cursor->x = $x;
|
||||
$this->cursor->y = $y;
|
||||
}
|
||||
|
||||
$this->cursor->y = ($y >= $this->document->numRows) ? $this->document->numRows - 1 : $y;
|
||||
}
|
||||
|
||||
protected function insertChar(string $c): void
|
||||
|
Loading…
Reference in New Issue
Block a user