mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Small tweaks after review
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user