Non-integer indentation levels are impossible.

This commit is contained in:
Rob 2016-06-22 15:08:20 -07:00
parent 6a03163fcb
commit f100e7ab52

View file

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