final touches on row/column insertion

This commit is contained in:
2025-11-13 17:49:58 -07:00
parent 445c7cc3c2
commit 90c426b854
2 changed files with 10 additions and 2 deletions

View File

@@ -36,6 +36,10 @@ if value.can_be_a_number() {
| `r` | Enter insert mode on current cell, deleting contents | | `r` | Enter insert mode on current cell, deleting contents |
| `v` | Enter visual mode | | `v` | Enter visual mode |
| `:` | Enter command mode | | `:` | Enter command mode |
| `O` | Insert row above cursor |
| `o` | Insert row below cursor |
| `A` | Insert column after cursor |
| `I` | Insert column before cursor |
| `yy` | Yank current cell | | `yy` | Yank current cell |
| `d `/`dw` | Cut current cell | | `d `/`dw` | Cut current cell |
| `p` | Paste clipboard (cursor is top-left of multi-cell pastes). Automatically translates cell references | | `p` | Paste clipboard (cursor is top-left of multi-cell pastes). Automatically translates cell references |

View File

@@ -166,11 +166,15 @@ impl Mode {
} }
// insert column after // insert column after
'A' => { 'A' => {
app.grid.insert_column_after(app.grid.cursor()); let c = app.grid.cursor();
app.grid.insert_column_after(c);
app.grid.mv_cursor_to(c.0+1, c.1);
} }
// insert row below // insert row below
'o' => { 'o' => {
app.grid.insert_row_below(app.grid.cursor()); let c = app.grid.cursor();
app.grid.insert_row_below(c);
app.grid.mv_cursor_to(c.0, c.1+1);
} }
// insert row above // insert row above
'O' => { 'O' => {