If there are no completions matching, detach the completer.

This prevents an invisible completer from swallowing keystrokes such as up/down
This commit is contained in:
Shane Kilkelly 2016-07-26 15:54:33 +01:00
parent e7483ed9e5
commit 72c9c3f020

View file

@ -134,6 +134,8 @@ define [
editor.completer.showPopup(editor) editor.completer.showPopup(editor)
editor.completer.cancelContextMenu() editor.completer.cancelContextMenu()
$(editor.completer.popup?.container).css({'font-size': @$scope.fontSize + 'px'}) $(editor.completer.popup?.container).css({'font-size': @$scope.fontSize + 'px'})
if editor.completer?.completions?.filtered?.length == 0
editor.completer.detach()
bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space" bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space"
} }