mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
@@ -164,6 +164,8 @@ class FuzzyFinderView extends SelectList
|
||||
populateOpenBufferPaths: ->
|
||||
editSessions = project.getEditSessions().filter (editSession) ->
|
||||
editSession.getPath()?
|
||||
editSessions = _.uniq editSessions, (editSession) ->
|
||||
editSession.getPath()
|
||||
|
||||
editSessions = _.sortBy editSessions, (editSession) =>
|
||||
if editSession is rootView.getActivePaneItem()
|
||||
|
||||
@@ -166,6 +166,13 @@ describe 'FuzzyFinder', ->
|
||||
rootView.trigger 'fuzzy-finder:toggle-buffer-finder'
|
||||
expect(rootView.find('.fuzzy-finder')).not.toExist()
|
||||
|
||||
describe "when multiple sessions are opened on the same path", ->
|
||||
it "does not display duplicates for that path in the list", ->
|
||||
rootView.open 'sample.js'
|
||||
rootView.getActivePane().splitRight()
|
||||
rootView.trigger 'fuzzy-finder:toggle-buffer-finder'
|
||||
expect(_.pluck(finderView.list.children('li'), 'outerText')).toEqual ['sample.js']
|
||||
|
||||
describe "when a path selection is confirmed", ->
|
||||
[editor1, editor2] = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user