Fixed tab key in empty line
This commit is contained in:
parent
e8b5485c1f
commit
8e4722fe76
@ -289,7 +289,7 @@ exports.commands = [{
|
|||||||
var range = new Range(selectionRange.end.row, 0, selectionRange.end.row, selectionRange.end.column);
|
var range = new Range(selectionRange.end.row, 0, selectionRange.end.row, selectionRange.end.column);
|
||||||
var startText = editor.session.getTextRange(range);
|
var startText = editor.session.getTextRange(range);
|
||||||
var token = editor.session.getTokenAt(selectionRange.end.row, selectionRange.end.column);
|
var token = editor.session.getTokenAt(selectionRange.end.row, selectionRange.end.column);
|
||||||
if(token.type == "markup.list" && /^\s*(?:[-+*]|\d+\.)\s+$/.test(startText)) {
|
if(token && token.type == "markup.list" && /^\s*(?:[-+*]|\d+\.)\s+$/.test(startText)) {
|
||||||
editor.blockIndent();
|
editor.blockIndent();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user