mirror of
https://github.com/atom/atom.git
synced 2026-02-17 10:01:25 -05:00
Only add local paths to recent documents list
Also, add them in Workspace::open and not AtomEnvironment::openLocations so that files opened in an existing window will also be added to the list
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
_ = require 'underscore-plus'
|
||||
url = require 'url'
|
||||
path = require 'path'
|
||||
{join} = path
|
||||
{Emitter, Disposable, CompositeDisposable} = require 'event-kit'
|
||||
@@ -409,6 +410,11 @@ class Workspace extends Model
|
||||
split = options.split
|
||||
uri = @project.resolvePath(uri)
|
||||
|
||||
# Avoid adding URLs as recent documents to work-around this Spotlight crash:
|
||||
# https://github.com/atom/atom/issues/10071
|
||||
if uri? and not url.parse(uri).protocol?
|
||||
@applicationDelegate.addRecentDocument(uri)
|
||||
|
||||
pane = @paneContainer.paneForURI(uri) if searchAllPanes
|
||||
pane ?= switch split
|
||||
when 'left'
|
||||
|
||||
Reference in New Issue
Block a user