update the UI
This commit is contained in:
@@ -201,11 +201,13 @@ public final class WorkspaceModel {
|
||||
}
|
||||
|
||||
/// Opens a file in the editor, reveals it in the Explorer and gives the editor the wide columns.
|
||||
/// Nothing moves when the editor's unsaved-edits prompt is cancelled or its save fails.
|
||||
public func open(_ path: String, _ options: OpenOptions = OpenOptions()) {
|
||||
guard let editor else { return }
|
||||
explorer?.select(path)
|
||||
editor.open(path, options)
|
||||
layout.setFocusZone(.editor)
|
||||
editor.open(path, options) { [weak self] in
|
||||
self?.explorer?.select(path)
|
||||
self?.layout.setFocusZone(.editor)
|
||||
}
|
||||
}
|
||||
|
||||
/// Inserts text into the agent's composer without submitting it, and confirms with a toast.
|
||||
|
||||
Reference in New Issue
Block a user