Alt+Backspace and Ctrl+Backspace shouldn't insert characters anymore when they aren't assigned as shortcuts
@@ -467,8 +467,13 @@ func NewEditor() *Editor {
} else if shortcuts.InputNewLine.Equals(event) {
editor.InsertCharacter('\n')
} else if event.Rune() != 0 {
+ //Workaround, since Alt+Backspace and Ctrl+Backspace will insert
+ //invalid characters if they aren't used as shortcuts anywhere.
+ if event.Key() == tcell.KeyRune ||
+ (event.Key() != tcell.KeyBackspace2 && event.Key() != tcell.KeyBackspace) {
editor.InsertCharacter(event.Rune())
}
+ }
editor.TriggerHeightRequestIfNecessary()
editor.internalTextView.ScrollToHighlight()
