我还在进行自动完成集成,发现了奇怪的行为。当我开始输入内容并显示自动完成弹出窗口时,我无法使用“Enter”移动到下一行,因为自动完成中的第一行始终处于活动状态。如何禁用此功能?
我只想在第五行留下'ace'字,然后用'enter'转到第6行,但不能。
答案 0 :(得分:1)
这是我在ext-language_tools.js中所做的改变:
更改为false
this.autoSelect = false; // changed from true
popup.setData = function(list) {
popup.setValue(lang.stringRepeat("\n", list.length), -1);
popup.data = list || [];
popup.setRow(-1); // changed from 0
};
并增加了附加条件:
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");
}
};
};