mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
re-organizing the cursor position text
This commit is contained in:
@@ -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 ->
|
||||
|
||||
@@ -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}")
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
.status-bar .cursor-position {
|
||||
padding-right: 20px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.status-bar .git-branch {
|
||||
|
||||
Reference in New Issue
Block a user