Fixed tab key in empty line

This commit is contained in:
benweet 2013-10-22 23:16:05 +01:00
parent e8b5485c1f
commit 8e4722fe76

View File

@ -289,7 +289,7 @@ exports.commands = [{
var range = new Range(selectionRange.end.row, 0, selectionRange.end.row, selectionRange.end.column);
var startText = editor.session.getTextRange(range);
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();
}
else {