浏览代码

HUE-6158 [autocomplete] Don’t remove characters to the right on insert

Johan Ahlen 8 年之前
父节点
当前提交
d95bd53
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      desktop/libs/notebook/src/notebook/templates/hue_ace_autocompleter.mako

+ 5 - 4
desktop/libs/notebook/src/notebook/templates/hue_ace_autocompleter.mako

@@ -461,10 +461,11 @@ from desktop.views import _ko
             self.editor().session.remove(range);
           }
         }
-        var match = self.editor().getTextAfterCursor().match(/^[^\s.]+/);
-        if (match) {
-          self.editor().removeTextAfterCursor(match[0].length);
-        }
+        // TODO: Only replace when editing identifiers (using parse locations)
+##         var match = self.editor().getTextAfterCursor().match(/^[^\s.]+/);
+##         if (match) {
+##           self.editor().removeTextAfterCursor(match[0].length);
+##         }
         // TODO: Move cursor handling for '? FROM tbl' here
         self.editor().execCommand('insertstring', self.suggestions.filtered()[self.selectedIndex()].value);
         self.editor().renderer.scrollCursorIntoView();