diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 030847f..f6670e1 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -23,7 +23,7 @@ } ], "security": { - "csp": "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' asset: https://asset.localhost data:; connect-src 'self' ipc: http://ipc.localhost" + "csp": "default-src 'self' tauri: https://tauri.localhost; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' asset: https://asset.localhost data:; connect-src 'self' ipc: http://ipc.localhost https://ipc.localhost tauri:" }, "withGlobalTauri": false }, diff --git a/src/assets/css/terminal.css b/src/assets/css/terminal.css index 6eaac7f..fe38fb2 100644 --- a/src/assets/css/terminal.css +++ b/src/assets/css/terminal.css @@ -20,12 +20,8 @@ height: 100%; } -/* Selection styling — let xterm.js theme handle selection colors. - The !important override was removed because it conflicts with - theme-driven selectionBackground set via terminal.options.theme. */ -.terminal-container .xterm-selection div { - background-color: rgba(88, 166, 255, 0.3); -} +/* Selection styling — xterm.js v6 handles selection via canvas renderer. + No CSS override needed; colors come from terminal.options.theme. */ /* Cursor styling */ .terminal-container .xterm-cursor-layer { diff --git a/src/components/terminal/LocalTerminalView.vue b/src/components/terminal/LocalTerminalView.vue index e0fd82d..e27f347 100644 --- a/src/components/terminal/LocalTerminalView.vue +++ b/src/components/terminal/LocalTerminalView.vue @@ -57,6 +57,8 @@ function applyTheme(): void { if (containerRef.value) { containerRef.value.style.backgroundColor = theme.background; } + + terminal.refresh(0, terminal.rows - 1); } onMounted(() => { diff --git a/src/components/terminal/TerminalView.vue b/src/components/terminal/TerminalView.vue index 1213154..50377c7 100644 --- a/src/components/terminal/TerminalView.vue +++ b/src/components/terminal/TerminalView.vue @@ -211,6 +211,9 @@ function applyTheme(): void { if (containerRef.value) { containerRef.value.style.backgroundColor = theme.background; } + + // Force xterm.js to repaint all visible rows with the new theme colors + terminal.refresh(0, terminal.rows - 1); } // Watch for theme changes in the session store and apply to this terminal.