mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
PreviewItem displays matched text
This commit is contained in:
@@ -17,7 +17,8 @@ class Operation
|
||||
editSession.addSelectionForBufferRange(@getBufferRange()) unless @preserveSelection
|
||||
|
||||
preview: ->
|
||||
"sad :-("
|
||||
range = @anchorRange.getBufferRange()
|
||||
@buffer.textInRange(range)
|
||||
|
||||
destroy: ->
|
||||
@buffer.release()
|
||||
|
||||
@@ -4,5 +4,6 @@ module.exports =
|
||||
class PreviewItem extends View
|
||||
@content: (operation) ->
|
||||
@li =>
|
||||
@span operation.getPath()
|
||||
@span operation.preview()
|
||||
@span operation.getPath(), outlet: "path", class: "path"
|
||||
@span outlet: "preview", class: "preview", ->
|
||||
operation.preview()
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.command-panel .preview-list .path{
|
||||
padding-left: 1em;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.command-panel .preview-list .preview {
|
||||
padding-left: 1em;
|
||||
color: green;
|
||||
}
|
||||
|
||||
.command-panel .preview-list .preview .match{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.command-panel .prompt-and-editor {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user