Keep the prompt's block cursor while it is focused

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Zebreus 2026-10-25 02:01:21 +02:00
commit 7e1f995e7e

View file

@ -64,8 +64,7 @@ a:hover, a:focus-visible {
animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
#term-input { all: unset; width: 0; padding-right: 1px; caret-color: var(--fg); } /* as wide as its text */
.prompt:focus-within .cursor { display: none; } /* the input's own caret takes over while typing */
#term-input { all: unset; width: 0; caret-color: transparent; } /* as wide as its text, so the block cursor follows it */
/* Terminal: continues right below the first prompt. Lines scrolled off its screen become page text,
the screen shows the rows in use and xterm.js fits rows and columns to the window. */