re-organizing the cursor position text

This commit is contained in:
Jon Rohan
2012-12-26 13:06:27 -08:00
parent b737977c61
commit ca39b9dccb
3 changed files with 6 additions and 6 deletions

View File

@@ -30,7 +30,7 @@ describe "StatusBar", ->
it "displays the editor's buffer path, cursor buffer position, and buffer modified indicator", ->
expect(statusBar.currentPath.text()).toBe 'sample.js'
expect(statusBar.bufferModified.text()).toBe ''
expect(statusBar.cursorPosition.text()).toBe 'Line 1, Column 1'
expect(statusBar.cursorPosition.text()).toBe '1,1'
describe "when associated with an unsaved buffer", ->
it "displays 'untitled' instead of the buffer's path, but still displays the buffer position", ->
@@ -41,7 +41,7 @@ describe "StatusBar", ->
StatusBar.activate(rootView)
statusBar = rootView.find('.status-bar').view()
expect(statusBar.currentPath.text()).toBe 'untitled'
expect(statusBar.cursorPosition.text()).toBe 'Line 1, Column 1'
expect(statusBar.cursorPosition.text()).toBe '1,1'
describe "when the associated editor's path changes", ->
it "updates the path in the status bar", ->
@@ -105,7 +105,7 @@ describe "StatusBar", ->
describe "when the associated editor's cursor position changes", ->
it "updates the cursor position in the status bar", ->
editor.setCursorScreenPosition([1, 2])
expect(statusBar.cursorPosition.text()).toBe 'Line 2, Column 3'
expect(statusBar.cursorPosition.text()).toBe '2,3'
describe "git branch label", ->
beforeEach ->

View File

@@ -23,10 +23,10 @@ class StatusBar extends View
@span class: 'octicons branch-icon'
@span class: 'branch-label', outlet: 'branchLabel'
@span class: 'git-status', outlet: 'gitStatusIcon'
@span class: 'cursor-position', outlet: 'cursorPosition'
@span class: 'file-info', =>
@span class: 'current-path', outlet: 'currentPath'
@span class: 'buffer-modified', outlet: 'bufferModified'
@span class: 'cursor-position', outlet: 'cursorPosition'
initialize: (@rootView, @editor) ->
@@ -90,4 +90,4 @@ class StatusBar extends View
updateCursorPositionText: ->
{ row, column } = @editor.getCursorBufferPosition()
@cursorPosition.text("Line #{row + 1}, Column #{column + 1}")
@cursorPosition.text("#{row + 1},#{column + 1}")

View File

@@ -9,7 +9,7 @@
}
.status-bar .cursor-position {
padding-right: 20px;
padding-left: 10px;
}
.status-bar .git-branch {