Skip to content

Commit

Permalink
feat(tui): Map "c0" and "d0" in string editor
Browse files Browse the repository at this point in the history
  • Loading branch information
ja-he committed Jul 1, 2024
1 parent 21541c8 commit e895136
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/control/cli/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ func NewController(
"<ESC>": "quit",
"D": "delete-to-end",
"d$": "delete-to-end",
"d0": "backspace-to-beginning",
"C": "delete-to-end-and-insert",
"c$": "delete-to-end-and-insert",
"c0": "backspace-to-beginning-and-insert",
"x": "delete-rune",
"s": "delete-rune-and-insert",
"i": "swap-mode-insert",
Expand Down
1 change: 1 addition & 0 deletions internal/control/edit/editors/string_editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ func (e *StringEditor) CreateInputProcessor(cfg input.InputConfig) (input.ModalI
"quit": e.Quit,
"backspace": e.BackspaceRune,
"backspace-to-beginning": e.BackspaceToBeginning,
"backspace-to-beginning-and-insert": func() { e.BackspaceToBeginning(); enterInsertMode() },
"delete-rune": e.DeleteRune,
"delete-rune-and-insert": func() { e.DeleteRune(); enterInsertMode() },
"delete-to-end": e.DeleteToEnd,
Expand Down

0 comments on commit e895136

Please sign in to comment.