feat: add search (Ctrl+F) and image rendering (Sixel/Kitty) addons
Search: xterm-addon-search (0.13.0) with slide-down search bar. Ctrl+F opens bar; type to search (live highlight); Enter/Shift+Enter for next/prev; Escape to close. Bar sits above terminal-container inside a new .terminal-wrapper flex column. Image: xterm-addon-image (0.5.0) for inline graphics. Enables Sixel, iTerm2 IIP, and Kitty graphic protocols — needed for tools like yazi file manager. Auto-detects escape sequences, no configuration needed.
This commit is contained in:
@@ -631,6 +631,14 @@ body {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.terminal-wrapper {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.terminal-container {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
@@ -639,6 +647,59 @@ body {
|
||||
padding: 0 4px; /* keep text off the side edges */
|
||||
}
|
||||
|
||||
/* Terminal search bar */
|
||||
.terminal-search-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 4px 8px;
|
||||
background: var(--bg-surface);
|
||||
border-bottom: 1px solid var(--border);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.terminal-search-bar.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.terminal-search-input {
|
||||
flex: 1;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
padding: 4px 8px;
|
||||
font-family: var(--font-ui);
|
||||
font-size: 13px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.terminal-search-input:focus {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.terminal-search-count {
|
||||
color: var(--text-muted);
|
||||
font-size: 12px;
|
||||
min-width: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.terminal-search-btn {
|
||||
background: none;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
padding: 2px 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.terminal-search-btn:hover {
|
||||
color: var(--text);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
/* xterm.js injects overflow-y: scroll on .xterm-viewport — override it */
|
||||
.xterm .xterm-viewport {
|
||||
overflow-y: hidden !important;
|
||||
|
||||
Reference in New Issue
Block a user