Clarify typing condition in live autocomplete
This commit is contained in:
parent
c36fac3a94
commit
e76a389e88
1 changed files with 4 additions and 8 deletions
|
|
@ -124,14 +124,10 @@ var onChangeAutocomplete = function(e) {
|
||||||
|
|
||||||
var text = e.args || "";
|
var text = e.args || "";
|
||||||
|
|
||||||
// Detect paste (poor man's paste detection)
|
// Is the user entering text
|
||||||
var typing = !(
|
// we only want to automatically show the autocomplete dialog
|
||||||
(
|
// whenever the user is typing in text not pasting, deleting, ...
|
||||||
e.command.name === "insertstring" &&
|
var typing = (e.command.name === "insertstring" && text.length === 1);
|
||||||
text.length > 1
|
|
||||||
) ||
|
|
||||||
e.command.name !== "insertstring"
|
|
||||||
);
|
|
||||||
|
|
||||||
// We don't want to autocomplete with no prefix
|
// We don't want to autocomplete with no prefix
|
||||||
if(
|
if(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue