openLineAbove

This commit is contained in:
Dustin Swan 2026-04-06 17:58:21 -06:00
parent 24f0046c77
commit fcb8feb16f
No known key found for this signature in database
GPG key ID: 30D46587E2100467

View file

@ -2,10 +2,8 @@
_ = "TODO
# r to repalce
# O to open new line above
# s to seek
# w / b bug, can't select `textEditor` at start of line
# a to append
# smart case searching
";
@ -196,6 +194,8 @@ textEditor = name \
emit = []
};
openLineAbove = state \ openLine state.{ cursorRow = state.cursorRow - 1 };
escape = state \ { state = state.{ mode = Normal, pending = None }, emit = [] };
undo = state \ state.undoStack
@ -445,6 +445,7 @@ textEditor = name \
| Key { key = "A" } \ appendEndLine state
| Key { key = "i" } \ insertMode state
| Key { key = "o" } \ openLine state
| Key { key = "O" } \ openLineAbove state
| Key { key = "d", ctrl = True } \ scrollHalfDown state ctx
| Key { key = "u", ctrl = True } \ scrollHalfUp state ctx
| Key { key = "u" } \ undo state