瀏覽代碼

HUE-5978 [autocomplete] Fix issue with moving cursor to ‘?’ after completion

Johan Ahlen 8 年之前
父節點
當前提交
f8491fffa8
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      desktop/libs/notebook/src/notebook/templates/hue_ace_autocompleter.mako

+ 2 - 1
desktop/libs/notebook/src/notebook/templates/hue_ace_autocompleter.mako

@@ -465,7 +465,8 @@ from desktop.views import _ko
         if (match) {
           self.editor().removeTextAfterCursor(match[0].length);
         }
-        self.editor().insert(self.suggestions.filtered()[self.selectedIndex()].value);
+        // TODO: Move cursor handling for '? FROM tbl' here
+        self.editor().execCommand('insertstring', self.suggestions.filtered()[self.selectedIndex()].value);
         self.editor().renderer.scrollCursorIntoView();
         self.detach();
       };