mirror of
https://github.com/atom/atom.git
synced 2026-02-06 04:34:55 -05:00
Add match count to path header text
This commit is contained in:
@@ -299,7 +299,7 @@ describe "CommandPanel", ->
|
||||
expect(commandPanel.previewList).toBeVisible()
|
||||
expect(commandPanel.previewList).toMatchSelector ':focus'
|
||||
previewItem = commandPanel.previewList.find("li:contains(sample.js):first")
|
||||
expect(previewItem.text()).toBe "sample.js"
|
||||
expect(previewItem.text()).toBe "sample.js(1)"
|
||||
expect(previewItem.next().find('.preview').text()).toBe "var quicksort = function () {"
|
||||
expect(previewItem.next().find('.preview > .match').text()).toBe "quicksort"
|
||||
|
||||
|
||||
@@ -34,7 +34,9 @@ class PreviewList extends ScrollView
|
||||
operation.index = index for operation, index in operations
|
||||
operationsByPath = _.groupBy(operations, (operation) -> operation.getPath())
|
||||
for path, ops of operationsByPath
|
||||
@li path, class: 'path'
|
||||
@li class: 'path', =>
|
||||
@span path
|
||||
@span "(#{ops.length})", class: 'path-match-number'
|
||||
for operation in ops
|
||||
{prefix, suffix, match, range} = operation.preview()
|
||||
@li 'data-index': operation.index, class: 'operation', =>
|
||||
|
||||
Reference in New Issue
Block a user