mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Use setEditorWidthInChars to resize editor
This makes the comparisons for the soft wrap column more sane.
This commit is contained in:
@@ -2674,7 +2674,8 @@ describe "Editor", ->
|
||||
describe "when the window is resized", ->
|
||||
it "updates the active edit session with the current soft wrap column", ->
|
||||
editor.attachToDom()
|
||||
expect(editor.activeEditSession.getSoftWrapColumn()).toBe 78
|
||||
editor.width(editor.width() * 2)
|
||||
setEditorWidthInChars(editor, 50)
|
||||
expect(editor.activeEditSession.getSoftWrapColumn()).toBe 50
|
||||
setEditorWidthInChars(editor, 100)
|
||||
$(window).trigger 'resize'
|
||||
expect(editor.activeEditSession.getSoftWrapColumn()).toBe 155
|
||||
expect(editor.activeEditSession.getSoftWrapColumn()).toBe 100
|
||||
|
||||
Reference in New Issue
Block a user