Add editor.showLineNumbers config option

Also adds toggle-line-numbers command. Closes #377
This commit is contained in:
Corey Johnson
2013-03-25 10:38:06 -07:00
parent 7756f8e86d
commit ec4bb162c3
3 changed files with 12 additions and 0 deletions

View File

@@ -1707,6 +1707,12 @@ describe "Editor", ->
miniEditor.setText(" a line with tabs\tand spaces ")
expect(miniEditor.renderedLines.find('.line').text()).toBe "#{space}a line with tabs#{tab} and spaces#{space}"
describe "when config.editor.showLineNumbers is false", ->
it "doesn't render any line numbers", ->
expect(editor.gutter.lineNumbers).toBeVisible()
config.set("editor.showLineNumbers", false)
expect(editor.gutter.lineNumbers).not.toBeVisible()
describe "gutter line highlighting", ->
beforeEach ->
editor.attachToDom(heightInLines: 5.5)