Field Widget: Handle 'delete'
This commit is contained in:
@@ -101,6 +101,12 @@ func (w *Field) HandleKey(ev *tcell.EventKey) bool {
|
||||
}
|
||||
return w.handleBackspace(ev)
|
||||
}
|
||||
if ev.Key() == tcell.KeyDelete {
|
||||
if w.cursor < len(w.value) {
|
||||
w.cursor++
|
||||
return w.handleBackspace(ev)
|
||||
}
|
||||
}
|
||||
if ok := w.keyMap.Handle(ev); ok {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user