Skip to content

The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.

fix(terminal): Keep the cursor to the font height instead of the whole line

l0ng-aic77d1a6de763
diff --git a/src/features/terminal/Terminal.module.css b/src/features/terminal/Terminal.module.css
index 15c9bdac0..e9bc90e9c 100644
--- a/src/features/terminal/Terminal.module.css
+++ b/src/features/terminal/Terminal.module.css
@@ -67,6 +67,16 @@
.pane :global(.xterm) {
height: 100%;
}
+/* xterm's DOM renderer stretches the cursor cell over the whole row (line height
+ included); keep it to the font's own height, centred like the glyphs. */
+.pane :global(.xterm-rows .xterm-cursor) {
+ position: relative;
+ top: 50%;
+ height: auto;
+ max-height: 100%;
+ line-height: normal;
+ transform: translateY(-50%);
+}
.pane :global(.xterm-viewport) {
background-color: var(--bg-island, var(--bg-app)) !important;
}