mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Fix LanguageMode.proto.suggestedIndentationForBufferRow exception for row 0
This commit is contained in:
@@ -92,7 +92,8 @@ class LanguageMode
|
||||
return currentIndentation unless increaseIndentPattern = TextMateBundle.indentRegexForScope(scopes[0])
|
||||
|
||||
currentLine = @buffer.lineForRow(bufferRow)
|
||||
precedingRow = @buffer.previousNonBlankRow(bufferRow)
|
||||
return currentIndentation unless precedingRow = @buffer.previousNonBlankRow(bufferRow)
|
||||
|
||||
precedingLine = @buffer.lineForRow(precedingRow)
|
||||
|
||||
desiredIndentation = @buffer.indentationForRow(precedingRow)
|
||||
|
||||
Reference in New Issue
Block a user