Merge pull request #7730 from minrk/complete-v4-empty

handle zero-length match in v4 completions
This commit is contained in:
Matthias Bussonnier 2015-02-12 11:14:33 -08:00
commit 9cc7c2bf02

View File

@ -183,7 +183,9 @@ define([
// interpret end=null as current position,
// and negative start relative to that
end = utils.to_absolute_cursor_pos(this.editor, cur);
if (start < 0) {
if (start === null) {
start = end;
} else if (start < 0) {
start = end + start;
}
}