Skip to content

Commit 2eee632

Browse files
committed
codex: fix PR #1124 CI regressions
1 parent 01d80d6 commit 2eee632

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/engine/CaptureChoiceEngine.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,8 @@ export class CaptureChoiceEngine extends QuickAddChoiceEngine {
9999
case "activeFileTop":
100100
msg = `Captured to top of ${fileName}`;
101101
break;
102-
case "activeFileBottom":
103-
msg = `Captured to bottom of ${fileName}`;
104-
break;
105102
case "append":
106-
msg = `Captured to ${fileName}`;
103+
msg = `Captured to bottom of ${fileName}`;
107104
break;
108105
case "insertAfter": {
109106
const heading = this.choice.insertAfter.after;

src/engine/canvasCapture.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type WorkspaceLeafLike = {
3939

4040
type WorkspaceLike = {
4141
getMostRecentLeaf?: () => WorkspaceLeafLike | null;
42+
activeLeaf?: WorkspaceLeafLike | null;
4243
getActiveFile?: () => TFile | null;
4344
};
4445

@@ -166,7 +167,9 @@ function isTFileLike(file: TAbstractFile | null): file is TFile {
166167
}
167168

168169
function getActiveCanvasView(app: CanvasAppLike): CanvasViewLike | null {
169-
const activeView = app.workspace.getMostRecentLeaf?.()?.view;
170+
const mostRecentLeaf =
171+
app.workspace.getMostRecentLeaf?.() ?? app.workspace.activeLeaf ?? null;
172+
const activeView = mostRecentLeaf?.view;
170173
if (!activeView || activeView.getViewType?.() !== "canvas") return null;
171174
return activeView;
172175
}

0 commit comments

Comments
 (0)