|
@@ -1430,14 +1430,14 @@ func (m Model) Width() int {
|
|
|
return m.width
|
|
return m.width
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// moveToBegin moves the cursor to the beginning of the input.
|
|
|
|
|
-func (m *Model) moveToBegin() {
|
|
|
|
|
|
|
+// MoveToBegin moves the cursor to the beginning of the input.
|
|
|
|
|
+func (m *Model) MoveToBegin() {
|
|
|
m.row = 0
|
|
m.row = 0
|
|
|
m.SetCursorColumn(0)
|
|
m.SetCursorColumn(0)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// moveToEnd moves the cursor to the end of the input.
|
|
|
|
|
-func (m *Model) moveToEnd() {
|
|
|
|
|
|
|
+// MoveToEnd moves the cursor to the end of the input.
|
|
|
|
|
+func (m *Model) MoveToEnd() {
|
|
|
m.row = len(m.value) - 1
|
|
m.row = len(m.value) - 1
|
|
|
m.SetCursorColumn(len(m.value[m.row]))
|
|
m.SetCursorColumn(len(m.value[m.row]))
|
|
|
}
|
|
}
|
|
@@ -1626,9 +1626,9 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
|
|
|
case key.Matches(msg, m.KeyMap.WordBackward):
|
|
case key.Matches(msg, m.KeyMap.WordBackward):
|
|
|
m.wordLeft()
|
|
m.wordLeft()
|
|
|
case key.Matches(msg, m.KeyMap.InputBegin):
|
|
case key.Matches(msg, m.KeyMap.InputBegin):
|
|
|
- m.moveToBegin()
|
|
|
|
|
|
|
+ m.MoveToBegin()
|
|
|
case key.Matches(msg, m.KeyMap.InputEnd):
|
|
case key.Matches(msg, m.KeyMap.InputEnd):
|
|
|
- m.moveToEnd()
|
|
|
|
|
|
|
+ m.MoveToEnd()
|
|
|
case key.Matches(msg, m.KeyMap.LowercaseWordForward):
|
|
case key.Matches(msg, m.KeyMap.LowercaseWordForward):
|
|
|
m.lowercaseRight()
|
|
m.lowercaseRight()
|
|
|
case key.Matches(msg, m.KeyMap.UppercaseWordForward):
|
|
case key.Matches(msg, m.KeyMap.UppercaseWordForward):
|