before the great git rework
This commit is contained in:
@@ -41,8 +41,6 @@ public struct RefreshScope: OptionSet, Sendable {
|
||||
public static let symbols = RefreshScope(rawValue: 4)
|
||||
/// The open file and every unsaved buffer pick up the disk text; unsaved edits are kept.
|
||||
public static let openFiles = RefreshScope(rawValue: 8)
|
||||
/// The project note picks up an outside edit when it has no unsaved typing.
|
||||
public static let note = RefreshScope(rawValue: 16)
|
||||
}
|
||||
|
||||
/// A list row whose on-screen frame the ⌘→ menu anchors to.
|
||||
@@ -84,7 +82,6 @@ public final class WorkspaceModel {
|
||||
public internal(set) var explorer: ExplorerStore?
|
||||
public internal(set) var editor: EditorStore?
|
||||
public internal(set) var terminal: TerminalStore
|
||||
public internal(set) var note: NoteStore?
|
||||
public internal(set) var cleanCopy: CleanCopyStore?
|
||||
|
||||
@ObservationIgnored public let app: AppServices
|
||||
@@ -122,7 +119,7 @@ public final class WorkspaceModel {
|
||||
if let root = self.root { attach(root) }
|
||||
}
|
||||
|
||||
/// Loads the recents and, with a project, its config, git, tree, note and session; then starts the watchers.
|
||||
/// Loads the recents and, with a project, its config, git, tree and session; then starts the watchers.
|
||||
public func start() async {
|
||||
guard !hasStarted else { return }
|
||||
hasStarted = true
|
||||
@@ -136,7 +133,6 @@ public final class WorkspaceModel {
|
||||
public func perform(_ command: Command) {
|
||||
switch command {
|
||||
case let .showSearch(seed): overlay.present(.search(seed: seed.isEmpty ? editorSelectionFirstLine() : seed))
|
||||
case .showNote: overlay.present(.note)
|
||||
case .showShortcuts: overlay.present(.shortcuts)
|
||||
case .showRecentProjects: showRecentProjects()
|
||||
case let .showRecentFiles(index): overlay.present(.recentFiles(initialSelection: index))
|
||||
@@ -188,7 +184,6 @@ public final class WorkspaceModel {
|
||||
layout.focus(.sourceControl)
|
||||
focusRequest = FocusRequest(.commitMessage)
|
||||
|
||||
case .passNote: passNote()
|
||||
case .copyCleanCopy: copyCleanCopy()
|
||||
|
||||
case .stopReading: readAloud.stop()
|
||||
@@ -251,11 +246,9 @@ public final class WorkspaceModel {
|
||||
rowFrames[key] = frame
|
||||
}
|
||||
|
||||
/// Saves the note when the window loses focus.
|
||||
/// Remembers the window lost focus, so coming back can flash branch · project.
|
||||
public func windowDidResignKey() {
|
||||
resignedKey = true
|
||||
guard let note else { return }
|
||||
track { await note.save() }
|
||||
}
|
||||
|
||||
/// Coming back to a window flashes branch · project, so the right window is obvious; launch never does.
|
||||
|
||||
Reference in New Issue
Block a user