javascript - Autocomplete first line shouldn't be active -
i'm still working on autocomplete integration , found out strange behaviour. when start type , autocomplete popup shown, can't move next line 'enter' because first line in autocomplete active. how can disable this?
i want leave 'ace' word on fifth line , go 6th line 'enter' can't.
here's i've changed in ext-language_tools.js:
changed false
this.autoselect = false; // changed true popup.setdata = function(list) { popup.setvalue(lang.stringrepeat("\n", list.length), -1); popup.data = list || []; popup.setrow(-1); // changed 0 };
and added additional condition:
popup.setrow = function (line) { if (line == -1) // added { popup.selection.clearselection(); selectionmarker.start.row = selectionmarker.end.row = line; popup.session._emit("changebackmarker"); popup.movecursorto(line, 0); if (popup.isopen) popup._signal("select"); } else { line = math.max(0, math.min(this.data.length, line)); if (selectionmarker.start.row != line) { popup.selection.clearselection(); selectionmarker.start.row = selectionmarker.end.row = line || 0; popup.session._emit("changebackmarker"); popup.movecursorto(line || 0, 0); if (popup.isopen) popup._signal("select"); } }; };
Comments
Post a Comment