Tighten terminal scrollbar gutter
This commit is contained in:
@@ -634,7 +634,10 @@ export default function TerminalEmulator({
|
|||||||
height: "100%",
|
height: "100%",
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
overscrollBehavior: "none",
|
overscrollBehavior: "none",
|
||||||
padding: 8,
|
paddingTop: 8,
|
||||||
|
paddingBottom: 8,
|
||||||
|
paddingLeft: 8,
|
||||||
|
paddingRight: 0,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{scrollbarGeometry.isVisible ? (
|
{scrollbarGeometry.isVisible ? (
|
||||||
|
|||||||
@@ -86,6 +86,13 @@ const DEFAULT_TERMINAL_FONT_FAMILY = [
|
|||||||
"monospace",
|
"monospace",
|
||||||
].join(", ");
|
].join(", ");
|
||||||
|
|
||||||
|
function withOverviewRulerBorderHidden(theme: ITheme): ITheme {
|
||||||
|
return {
|
||||||
|
...theme,
|
||||||
|
overviewRulerBorder: theme.background ?? "transparent",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export class TerminalEmulatorRuntime {
|
export class TerminalEmulatorRuntime {
|
||||||
private callbacks: TerminalEmulatorRuntimeCallbacks = {};
|
private callbacks: TerminalEmulatorRuntimeCallbacks = {};
|
||||||
private pendingModifiers: PendingTerminalModifiers = {
|
private pendingModifiers: PendingTerminalModifiers = {
|
||||||
@@ -138,8 +145,11 @@ export class TerminalEmulatorRuntime {
|
|||||||
fontFamily: DEFAULT_TERMINAL_FONT_FAMILY,
|
fontFamily: DEFAULT_TERMINAL_FONT_FAMILY,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
lineHeight: 1.0,
|
lineHeight: 1.0,
|
||||||
|
overviewRuler: {
|
||||||
|
width: 8,
|
||||||
|
},
|
||||||
scrollback: 10_000,
|
scrollback: 10_000,
|
||||||
theme: input.theme,
|
theme: withOverviewRulerBorderHidden(input.theme),
|
||||||
});
|
});
|
||||||
const fitAddon = new FitAddon();
|
const fitAddon = new FitAddon();
|
||||||
const unicode11Addon = new Unicode11Addon();
|
const unicode11Addon = new Unicode11Addon();
|
||||||
@@ -435,7 +445,7 @@ export class TerminalEmulatorRuntime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
terminal.options.theme = input.theme;
|
terminal.options.theme = withOverviewRulerBorderHidden(input.theme);
|
||||||
} catch {
|
} catch {
|
||||||
// ignore
|
// ignore
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user