mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04: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()
|
||||
|
||||
Reference in New Issue
Block a user