This commit is contained in:
Maxim Slipenko 2022-11-09 17:51:12 +00:00
parent f7750f3d07
commit 6e00038ceb

View File

@ -541,6 +541,7 @@ func (m *Model) deleteBeforeCursor() {
// the cursor so as not to reveal word breaks in the masked input. // the cursor so as not to reveal word breaks in the masked input.
func (m *Model) deleteAfterCursor() { func (m *Model) deleteAfterCursor() {
m.value[m.row] = m.value[m.row][:m.col] m.value[m.row] = m.value[m.row][:m.col]
m.isChanged = true
m.SetCursor(len(m.value[m.row])) m.SetCursor(len(m.value[m.row]))
} }
@ -560,6 +561,7 @@ func (m *Model) transposeLeft() {
if m.col < len(m.value[m.row]) { if m.col < len(m.value[m.row]) {
m.SetCursor(m.col + 1) m.SetCursor(m.col + 1)
} }
m.isChanged = true
} }
// deleteWordLeft deletes the word left to the cursor. Returns whether or not // deleteWordLeft deletes the word left to the cursor. Returns whether or not