Tighten terminal scrollbar gutter

This commit is contained in:
Mohamed Boudra
2026-03-18 21:10:51 +07:00
parent 7e0a220fde
commit 09fae62888
2 changed files with 16 additions and 3 deletions

View File

@@ -634,7 +634,10 @@ export default function TerminalEmulator({
height: "100%",
overflow: "hidden",
overscrollBehavior: "none",
padding: 8,
paddingTop: 8,
paddingBottom: 8,
paddingLeft: 8,
paddingRight: 0,
}}
/>
{scrollbarGeometry.isVisible ? (

View File

@@ -86,6 +86,13 @@ const DEFAULT_TERMINAL_FONT_FAMILY = [
"monospace",
].join(", ");
function withOverviewRulerBorderHidden(theme: ITheme): ITheme {
return {
...theme,
overviewRulerBorder: theme.background ?? "transparent",
};
}
export class TerminalEmulatorRuntime {
private callbacks: TerminalEmulatorRuntimeCallbacks = {};
private pendingModifiers: PendingTerminalModifiers = {
@@ -138,8 +145,11 @@ export class TerminalEmulatorRuntime {
fontFamily: DEFAULT_TERMINAL_FONT_FAMILY,
fontSize: 13,
lineHeight: 1.0,
overviewRuler: {
width: 8,
},
scrollback: 10_000,
theme: input.theme,
theme: withOverviewRulerBorderHidden(input.theme),
});
const fitAddon = new FitAddon();
const unicode11Addon = new Unicode11Addon();
@@ -435,7 +445,7 @@ export class TerminalEmulatorRuntime {
}
try {
terminal.options.theme = input.theme;
terminal.options.theme = withOverviewRulerBorderHidden(input.theme);
} catch {
// ignore
return;