mirror of
https://github.com/atom/atom.git
synced 2026-02-05 12:15:07 -05:00
Stash changes
This commit is contained in:
@@ -144,6 +144,7 @@ class CommandPanelView extends View
|
||||
@errorMessages.append $$ ->
|
||||
@li errorMessage for errorMessage in errorMessages
|
||||
else if operationsToPreview?.length
|
||||
@previewList.show()
|
||||
@previewList.focus()
|
||||
@previewCount.text("#{_.pluralize(operationsToPreview.length, 'match', 'matches')} in #{_.pluralize(@previewList.getPathCount(operationsToPreview), 'file')}").show()
|
||||
else
|
||||
|
||||
@@ -25,7 +25,7 @@ class Operation
|
||||
preview: ->
|
||||
range = @bufferRange
|
||||
prefix = @lineText[0...range.start.column]
|
||||
match = @lineText[range.start.column + 1...range.end.column]
|
||||
match = @lineText[range.start.column...range.end.column]
|
||||
suffix = @lineText[range.end.column..]
|
||||
|
||||
{prefix, suffix, match, range}
|
||||
|
||||
@@ -49,7 +49,7 @@ class PreviewList extends ScrollView
|
||||
populateSingle: (operation) ->
|
||||
@viewsForPath ||= {}
|
||||
|
||||
@show()
|
||||
@lastRenderedOperationIndex ||= 0
|
||||
@renderOperation(operation)
|
||||
|
||||
@find('.operation:first').addClass('selected')
|
||||
@@ -67,6 +67,7 @@ class PreviewList extends ScrollView
|
||||
startingScrollHeight = @prop('scrollHeight')
|
||||
pathView = @pathViewForPath(operation.getPath())
|
||||
pathView.addOperation(operation)
|
||||
@lastRenderedOperationIndex++
|
||||
|
||||
pathViewForPath: (path) ->
|
||||
pathView = @viewsForPath[path]
|
||||
|
||||
Reference in New Issue
Block a user