don't let user go oob
This commit is contained in:
@@ -273,13 +273,13 @@ impl Mode {
|
|||||||
// Go to end of row
|
// Go to end of row
|
||||||
'$' => {
|
'$' => {
|
||||||
let (_, y) = app.grid.cursor();
|
let (_, y) = app.grid.cursor();
|
||||||
app.grid.mv_cursor_to(super::logic::calc::LEN, y);
|
app.grid.mv_cursor_to(super::logic::calc::LEN-1, y);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Go to bottom of column
|
// Go to bottom of column
|
||||||
'G' => {
|
'G' => {
|
||||||
let (x, _) = app.grid.cursor();
|
let (x, _) = app.grid.cursor();
|
||||||
app.grid.mv_cursor_to(x, super::logic::calc::LEN);
|
app.grid.mv_cursor_to(x, super::logic::calc::LEN-1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// edit cell
|
// edit cell
|
||||||
|
|||||||
Reference in New Issue
Block a user