mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Correctly autoindent single newline in Selection#insertText
This commit is contained in:
@@ -91,3 +91,8 @@ describe "Selection", ->
|
||||
expect(buffer.lineForRow(0)).toBe " "
|
||||
expect(buffer.lineForRow(1)).toBe " "
|
||||
expect(buffer.lineForRow(2)).toBe ""
|
||||
|
||||
it "auto-indents if only a newline is inserted", ->
|
||||
selection.setBufferRange [[2, 0], [3, 0]]
|
||||
selection.insertText("\n", autoIndent: true)
|
||||
expect(buffer.lineForRow(2)).toBe " "
|
||||
|
||||
Reference in New Issue
Block a user