File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 24
24
function isArray ( val ) { return Object . prototype . toString . call ( val ) == "[object Array]" }
25
25
26
26
function getKeywords ( editor ) {
27
- var mode = editor . doc . modeOption ;
28
- if ( mode === "sql" ) mode = "text/x-sql" ;
29
- return CodeMirror . resolveMode ( mode ) . keywords ;
27
+ return editor . getModeAt ( editor . getCursor ( ) ) . keywords || CodeMirror . resolveMode ( "text/x-sql" ) . keywords ;
30
28
}
31
29
32
30
function getIdentifierQuote ( editor ) {
33
- var mode = editor . doc . modeOption ;
34
- if ( mode === "sql" ) mode = " text/x-sql";
35
- return CodeMirror . resolveMode ( mode ) . identifierQuote || "`" ;
31
+ return editor . getModeAt ( editor . getCursor ( ) ) . identifierQuote ||
32
+ CodeMirror . resolveMode ( " text/x-sql") . identifierQuote ||
33
+ "`" ;
36
34
}
37
35
38
36
function getText ( item ) {
You can’t perform that action at this time.
0 commit comments