Johan Rong 1 개월 전
부모
커밋
5b389875dc
3개의 변경된 파일3개의 추가작업 그리고 31개의 파일을 삭제
  1. 1 1
      go.mod
  2. 2 24
      internal/editor/action.go
  3. 0 6
      internal/editor/keyinput.go

+ 1 - 1
go.mod

@@ -5,6 +5,7 @@ go 1.26.4
 require (
 	github.com/gdamore/tcell/v3 v3.4.0
 	github.com/zyedidia/rope v0.0.0-20210616205215-37fbf22eab3a
+	golang.design/x/clipboard v0.8.0
 )
 
 require (
@@ -13,7 +14,6 @@ require (
 	github.com/ebitengine/purego v0.10.1 // indirect
 	github.com/gdamore/encoding v1.0.1 // indirect
 	github.com/lucasb-eyer/go-colorful v1.4.0 // indirect
-	golang.design/x/clipboard v0.8.0 // indirect
 	golang.design/x/x11 v0.2.0 // indirect
 	golang.org/x/exp/shiny v0.0.0-20250606033433-dcc06ee1d476 // indirect
 	golang.org/x/image v0.28.0 // indirect

+ 2 - 24
internal/editor/action.go

@@ -318,21 +318,6 @@ func DefaultActionManager() ActionManager {
 					}
 				},
 			},
-			Action{
-				Bindings: []Binding{
-					Binding{
-						Type:   BindingSingle,
-						Single: "j",
-					},
-				},
-				Callback: func(m *Model, args []string) {
-					if m.Mode == ModePalette {
-						m.BM.PaletteBuffer.MoveHoriz(-1)
-					} else {
-						m.BM.Current().MoveHoriz(-1)
-					}
-				},
-			},
 		},
 		Insert:  []Action{
 			Action{
@@ -342,8 +327,7 @@ func DefaultActionManager() ActionManager {
 						Single: "shift+up",
 					},
 				},
-				Commands: []string{"TODO:"},
-				AskArgs: false,
+				Commands: []string{"curup"},
 				Callback: func(m *Model, args []string) {
 					m.BM.Current().AddCursorVert(-1)
 				},
@@ -355,8 +339,7 @@ func DefaultActionManager() ActionManager {
 						Single: "shift+down",
 					},
 				},
-				Commands: []string{"TODO:"},
-				AskArgs: false,
+				Commands: []string{"curdown"},
 				Callback: func(m *Model, args []string) {
 					m.BM.Current().AddCursorVert(1)
 				},
@@ -369,7 +352,6 @@ func DefaultActionManager() ActionManager {
 					},
 				},
 				Commands: []string{"clrc", "clearcursors"},
-				AskArgs: false,
 				Callback: func(m *Model, args []string) {
 					m.BM.Current().ClearCursors()
 				},
@@ -381,8 +363,6 @@ func DefaultActionManager() ActionManager {
 						Single: "tab",
 					},
 				},
-				Commands: []string{"TODO:"},
-				AskArgs: false,
 				Callback: func(m *Model, args []string) {
 					for _ = range 4 {
 						m.BM.Current().Insert(" ")
@@ -396,8 +376,6 @@ func DefaultActionManager() ActionManager {
 						Single: "shift+tab",
 					},
 				},
-				Commands: []string{"TODO:"},
-				AskArgs: false,
 				Callback: func(m *Model, args []string) {
 					// TODO: implement m.BM.Current().remove...
 					

+ 0 - 6
internal/editor/keyinput.go

@@ -50,14 +50,8 @@ func (m *Model) HandleKeyInput(ev *tcell.EventKey) {
 									m.AM.CM = NewChordManager()
 									return
 								}
-							} else {
-								continue
 							}
-						} else {
-							continue
 						}
-					} else {
-						continue
 					}
 				} else {
 					if binding.Chord[0] == util.StandardizeBinding(ev.Name()) {