mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -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', =>
|
||||
|
||||
@@ -60,6 +60,11 @@
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.command-panel .preview-list .path-match-number {
|
||||
padding-left: 8px;
|
||||
color: rgba(255, 255, 255, .3);
|
||||
}
|
||||
|
||||
.command-panel .preview-list .preview {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
@@ -57,6 +57,11 @@
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.command-panel .preview-list .path-match-number {
|
||||
padding-left: 8px;
|
||||
color: #3D5075;
|
||||
}
|
||||
|
||||
.command-panel .preview-list .preview {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user