mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
update editor view specs to account for lineHeight
This commit is contained in:
@@ -2937,14 +2937,14 @@ describe "EditorView", ->
|
||||
.editor { line-height: 2; }
|
||||
"""
|
||||
|
||||
expect(editorView.pixelPositionForScreenPosition([1, 3])).toEqual {top: 32, left: 30}
|
||||
expect(editorView.getCursorView().position()).toEqual {top: 32, left: 30}
|
||||
expect(editorView.pixelPositionForScreenPosition([1, 3])).toEqual {top: 20, left: 30}
|
||||
expect(editorView.getCursorView().position()).toEqual {top: 20, left: 30}
|
||||
|
||||
atom.themes.applyStylesheet 'char-width', """
|
||||
.editor { letter-spacing: 2px; }
|
||||
"""
|
||||
expect(editorView.pixelPositionForScreenPosition([1, 3])).toEqual {top: 32, left: 36}
|
||||
expect(editorView.getCursorView().position()).toEqual {top: 32, left: 36}
|
||||
expect(editorView.pixelPositionForScreenPosition([1, 3])).toEqual {top: 20, left: 36}
|
||||
expect(editorView.getCursorView().position()).toEqual {top: 20, left: 36}
|
||||
|
||||
describe "when the editor contains hard tabs", ->
|
||||
it "correctly calculates the the position left for a column", ->
|
||||
|
||||
Reference in New Issue
Block a user