Clarify typing condition in live autocomplete

This commit is contained in:
Aaron O'Mullan 2014-02-05 20:10:20 +01:00
commit e76a389e88

View file

@ -124,14 +124,10 @@ var onChangeAutocomplete = function(e) {
var text = e.args || "";
// Detect paste (poor man's paste detection)
var typing = !(
(
e.command.name === "insertstring" &&
text.length > 1
) ||
e.command.name !== "insertstring"
);
// Is the user entering text
// we only want to automatically show the autocomplete dialog
// whenever the user is typing in text not pasting, deleting, ...
var typing = (e.command.name === "insertstring" && text.length === 1);
// We don't want to autocomplete with no prefix
if(