1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-19 00:28:03 +02:00

better CLI interface

This commit is contained in:
Jesse Duffield
2022-08-14 14:33:44 +10:00
parent 349a7d2453
commit 5173d7f5e1
13 changed files with 287 additions and 140 deletions

View File

@ -24,10 +24,10 @@ func (f EditorFunc) Edit(v *View, key Key, ch rune, mod Modifier) bool {
}
// DefaultEditor is the default editor.
var DefaultEditor Editor = EditorFunc(simpleEditor)
var DefaultEditor Editor = EditorFunc(SimpleEditor)
// simpleEditor is used as the default gocui editor.
func simpleEditor(v *View, key Key, ch rune, mod Modifier) bool {
// SimpleEditor is used as the default gocui editor.
func SimpleEditor(v *View, key Key, ch rune, mod Modifier) bool {
switch {
case key == KeyBackspace || key == KeyBackspace2:
v.TextArea.BackSpaceChar()