Fix bug where visual indents couldn't nest.

This commit is contained in:
Rob 2016-06-03 14:01:37 -07:00
parent b3663196d7
commit 2ef10f58b3

View file

@ -316,7 +316,7 @@ module.exports = class SpellView extends CocoView
xstart = startOfRow(row)
if language is 'python'
requiredIndent = new RegExp '^' + new Array(xstart / 4 + 2).join '( |\t)' + '(\\S|\\s*$)'
requiredIndent = new RegExp '^' + new Array(xstart / 4 + 1).join('( |\t)') + '( |\t)+(\\S|\\s*$)'
for crow in [docRange.start.row+1..docRange.end.row]
unless requiredIndent.test lines[crow]
docRange.end.row = crow - 1