mirror of
https://github.com/atom/atom.git
synced 2026-01-26 07:19:06 -05:00
Add a spec for line number updates after folding/unfolding
This commit is contained in:
@@ -8,7 +8,7 @@ $ = require 'jquery'
|
||||
_ = require 'underscore'
|
||||
fs = require 'fs'
|
||||
|
||||
fdescribe "Editor", ->
|
||||
describe "Editor", ->
|
||||
[rootView, buffer, editor, cachedLineHeight] = []
|
||||
|
||||
getLineHeight = ->
|
||||
@@ -463,6 +463,13 @@ fdescribe "Editor", ->
|
||||
otherEditor.simulateDomAttachment()
|
||||
expect(otherEditor.setMaxLineLength).toHaveBeenCalled()
|
||||
|
||||
describe "when lines are folded and then unfolded", ->
|
||||
it "renders the lines and line numbers correctly after unfolding", ->
|
||||
editor.createFold(2, 9).destroy()
|
||||
|
||||
expect(editor.gutter.find('.line-number:last').text()).toBe '13'
|
||||
expect(editor.gutter.find('.line-number').length).toBe 13
|
||||
|
||||
describe "when some lines at the end of the buffer are not visible on screen", ->
|
||||
beforeEach ->
|
||||
editor.attachToDom(heightInLines: 5.5)
|
||||
|
||||
Reference in New Issue
Block a user