use correct indent size when expanding snippet at the start of the line
This commit is contained in:
parent
f5f2d823b9
commit
4d868a046a
1 changed files with 4 additions and 1 deletions
|
|
@ -265,8 +265,11 @@ var SnippetManager = function() {
|
|||
this.insertSnippet = function(editor, snippetText) {
|
||||
var cursor = editor.getCursorPosition();
|
||||
var line = editor.session.getLine(cursor.row);
|
||||
var indentString = line.match(/^\s*/)[0];
|
||||
var tabString = editor.session.getTabString();
|
||||
var indentString = line.match(/^\s*/)[0];
|
||||
|
||||
if (cursor.column < indentString.length)
|
||||
indentString = indentString.slice(0, cursor.column);
|
||||
|
||||
var tokens = this.tokenizeTmSnippet(snippetText);
|
||||
tokens = this.resolveVariables(tokens, editor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue