Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 6be84d4

Browse files
committed
fix: guide command should not open a new tab when in popup mode
1 parent 1ec9cae commit 6be84d4

File tree

1 file changed

+10
-2
lines changed
  • plugins/plugin-client-common/src/controller

1 file changed

+10
-2
lines changed

plugins/plugin-client-common/src/controller/guide.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@
1717
import React from 'react'
1818
import { v4 } from 'uuid'
1919
import { basename } from 'path'
20-
import { Arguments, CommentaryResponse, ParsedOptions, Registrar, Util, encodeComponent } from '@kui-shell/core'
20+
import {
21+
Arguments,
22+
CommentaryResponse,
23+
ParsedOptions,
24+
Registrar,
25+
Util,
26+
encodeComponent,
27+
isPopup
28+
} from '@kui-shell/core'
2129

2230
import fetchMarkdownFile from './fetch'
2331
import { setTabReadonly } from './commentary' // TODO move to core?
@@ -59,7 +67,7 @@ async function guide(args: Arguments<HereOptions>) {
5967
try {
6068
const filepath = args.argvNoOptions[1]
6169

62-
if (!args.parsedOptions.here) {
70+
if (!args.parsedOptions.here && !isPopup()) {
6371
await args.REPL.qexec(`tab new --cmdline "guide --here ${encodeComponent(filepath)}"`)
6472
return true
6573
}

0 commit comments

Comments
 (0)