Procházet zdrojové kódy

Don’t activate the notebook by default (putting the notebook into command mode)

Jason Grout před 6 roky
rodič
revize
5254411c0b
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      packages/notebook-extension/src/index.ts

+ 3 - 1
packages/notebook-extension/src/index.ts

@@ -769,7 +769,9 @@ function addCommands(app: JupyterLab, services: ServiceManager, tracker: Noteboo
   commands.addCommand(CommandIDs.runInConsole, {
     label: 'Run Selected Text or Current Line in Console',
     execute: args => {
-      const current = getCurrent(args);
+      // Default to not activating the notebook (thereby putting the notebook
+      // into command mode)
+      const current = getCurrent({activate: false, ...args});
 
       if (current) {
         const { context, content } = current;