Skip to content

Commit 50e910f

Browse files
save file
1 parent f3a1599 commit 50e910f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

utils/misc/nodejs-terminal/v3.0/nodejs-terminal-v3.0.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@
484484
snippet.css.insert_rule([':host {height:100%;}','#root {height:100%}']);
485485
snippet.editor.css.insert_rule([':host {flex:1}','#root {height:100%}']);
486486

487-
snippet.ctx = {snippet,webcontainer,viewport,vm,shell,term,input,output};
487+
snippet.ctx = {snippet,webcontainer,viewport,vm,tabs};
488488

489489

490490
var attrs = {component:'page'};
@@ -545,7 +545,7 @@
545545

546546
menu_callback['https-server'] = async function(){
547547

548-
var cwd = tabs.cur.terminal.shell.cwd;
548+
var cwd = tabs.cur.view.terminal.shell.cwd;
549549
if(cwd===null){
550550
term.writeln.red('can only install https-server relative to workdir');
551551
return;
@@ -605,8 +605,8 @@
605605

606606
menu_callback['save-snapshot'] = async function(){
607607
console.log('save-snapshot');
608-
var cwd = tabs.cur.terminal.shell.cwd;
609-
var cwd_abs = tabs.cur.terminal.shell.cwd_abs;
608+
var cwd = tabs.cur.view.terminal.shell.cwd;
609+
var cwd_abs = tabs.cur.view.terminal.shell.cwd_abs;
610610
console.log(cwd_abs);
611611
if(cwd===null){
612612
term.writeln.red('can only save snapshot relative to workdir');
@@ -647,7 +647,7 @@
647647

648648
menu_callback['load-snapshot'] = async function(){
649649
console.log('load-snapshot');
650-
var cwd = tabs.cur.terminal.shell.cwd;
650+
var cwd = tabs.cur.view.terminal.shell.cwd;
651651

652652
if(cwd===null){
653653
term.writeln.red('can only load snapshot relative to workdir');

0 commit comments

Comments
 (0)