Эх сурвалжийг харах

[editor] Drop exact match for SQL autocomplete

This also reverts one of our previous changes to Ace where we forced exact match in the Ace source.
Johan Ahlen 10 жил өмнө
parent
commit
e234252aea

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/ext-language_tools.js


+ 9 - 1
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -1861,7 +1861,15 @@
 
 
       editor.setOptions(editorOptions);
       editor.setOptions(editorOptions);
 
 
-      editor.session.setCompleters([snippet.autocompleter]);
+      var AceAutocomplete = ace.require("ace/autocomplete").Autocomplete;
+
+      if (!editor.completer) {
+        editor.completer = new AceAutocomplete();
+      }
+      editor.completer.exactMatch = ! snippet.isSqlDialect();
+
+      var langTools = ace.require("ace/ext/language_tools")
+      langTools.addCompleter(snippet.autocompleter);
 
 
       var placeHolderElement = null;
       var placeHolderElement = null;
       var placeHolderVisible = false;
       var placeHolderVisible = false;

+ 1 - 1
tools/ace-editor/lib/ace/autocomplete.js

@@ -425,7 +425,7 @@ var FilteredList = function(array, filterText) {
     this.all = array;
     this.all = array;
     this.filtered = array;
     this.filtered = array;
     this.filterText = filterText || "";
     this.filterText = filterText || "";
-    this.exactMatch = true;
+    this.exactMatch = false;
 };
 };
 (function(){
 (function(){
     this.setFilter = function(str) {
     this.setFilter = function(str) {

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно