@@ -16,7 +16,7 @@ class ReactWebView {
1616this . extensionPath = extensionPath
1717
1818// Create and show a new webview panel
19- this . panel = this . createWebviewPanel ( vscode . ViewColumn . One )
19+ this . panel = this . createWebviewPanel ( vscode . ViewColumn . Two )
2020
2121// Set the webview's initial html content
2222this . panel . webview . html = this . getHtmlForWebview ( )
@@ -28,7 +28,24 @@ class ReactWebView {
2828// Handle messages from the webview
2929const onReceive = ( action :string | CR . Action ) => vscode . commands . executeCommand ( 'coderoad.receive_action' , action )
3030this . panel . webview . onDidReceiveMessage ( onReceive , null , this . disposables )
31- console . log ( 'webview loaded' )
31+
32+ // update panel on changes
33+ const updateWindows = ( ) => {
34+ vscode . commands . executeCommand ( 'vscode.setEditorLayout' , { orientation :0 , groups :[ { groups :[ { } ] , size :0.6 } , { groups :[ { } ] , size :0.4 } ] } )
35+ this . panel . reveal ( vscode . ViewColumn . Two )
36+ }
37+ // prevents new panels from going ontop of coderoad panel
38+ vscode . window . onDidChangeActiveTextEditor ( ( param ) => {
39+ if ( ! param || param . viewColumn !== vscode . ViewColumn . Two ) {
40+ updateWindows ( )
41+ }
42+ } )
43+ // prevents moving coderoad panel on top of left panel
44+ vscode . window . onDidChangeVisibleTextEditors ( ( param ) => {
45+ updateWindows ( )
46+ } )
47+
48+ // TODO: prevent window from moving to the left when no windows remain on rights
3249}
3350
3451public createOrShow ( column :number ) :void {