Small tweaks after review

This commit is contained in:
Sander van Harmelen
2015-07-13 00:58:03 +02:00
parent 195b84a34a
commit e7de136a27
2 changed files with 2 additions and 3 deletions

View File

@@ -3023,7 +3023,6 @@ describe "TextEditor", ->
expect(editor.lineTextForBufferRow(9)).toBe " c(x);"
expect(editor.lineTextForBufferRow(10)).toBe " }"
describe "when pasting a line of text without line ending", ->
it "does not auto-indent the text", ->
atom.clipboard.write("a(x);", indentBasis: 0)

View File

@@ -242,7 +242,7 @@ class LanguageMode
tokenizedLine = @editor.displayBuffer.tokenizedBuffer.buildTokenizedLineForRowWithText(bufferRow, line)
@suggestedIndentForTokenizedLineAtBufferRow(bufferRow, line, tokenizedLine, options)
suggestedIndentForTokenizedLineAtBufferRow: (bufferRow, line, tokenizedLine, options={}) ->
suggestedIndentForTokenizedLineAtBufferRow: (bufferRow, line, tokenizedLine, options) ->
iterator = tokenizedLine.getTokenIterator()
iterator.next()
scopeDescriptor = new ScopeDescriptor(scopes: iterator.getScopes())
@@ -254,7 +254,7 @@ class LanguageMode
currentIndentLevel = @editor.indentationForBufferRow(bufferRow)
return currentIndentLevel unless increaseIndentRegex
if options.skipBlankLines ? true
if options?.skipBlankLines ? true
precedingRow = @buffer.previousNonBlankRow(bufferRow)
return 0 unless precedingRow?
else