Skip to content

Commit 3f81b37

Browse files
ozgesolidkeyclaude
andcommitted
Wider scrollable minimap preview
- Preview box widened to 600px (max 70vw) - Horizontal scrollbar for long lines - 500 char limit per line (up from 120) - Interactive: pointer-events enabled for scrolling inside preview Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent dc6296b commit 3f81b37

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

src/renderer/renderer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3324,12 +3324,13 @@ function handleMinimapHover(event: MouseEvent): void {
33243324
return;
33253325
}
33263326

3327-
let html = `<div class="minimap-preview-header">Line ${targetLine + 1}</div>`;
3327+
let html = `<div class="minimap-preview-header">Line ${targetLine + 1}</div><div class="minimap-preview-lines">`;
33283328
for (const line of result.lines) {
33293329
const isCurrent = line.lineNumber === targetLine;
3330-
const text = line.text.length > 120 ? line.text.substring(0, 120) + '...' : line.text;
3330+
const text = line.text.length > 500 ? line.text.substring(0, 500) + '...' : line.text;
33313331
html += `<div class="minimap-preview-line${isCurrent ? ' current' : ''}"><span class="minimap-preview-num">${line.lineNumber + 1}</span>${escapeHtml(text)}</div>`;
33323332
}
3333+
html += `</div>`;
33333334
preview.innerHTML = html;
33343335

33353336
// Position: vertically centered on hover Y, to the left of the minimap

src/renderer/styles.css

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2898,15 +2898,15 @@ body.platform-darwin .titlebar {
28982898
position: absolute;
28992899
right: 100%;
29002900
margin-right: 4px;
2901-
width: 450px;
2902-
max-width: 50vw;
2901+
width: 600px;
2902+
max-width: 70vw;
29032903
background: var(--bg-secondary);
29042904
border: 1px solid var(--border-color);
29052905
border-radius: 4px;
29062906
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
29072907
z-index: 100;
29082908
overflow: hidden;
2909-
pointer-events: none;
2909+
pointer-events: auto;
29102910
}
29112911
.minimap-preview.hidden { display: none; }
29122912
.minimap-preview-header {
@@ -2921,12 +2921,16 @@ body.platform-darwin .titlebar {
29212921
padding: 1px 8px;
29222922
font-size: 11px;
29232923
font-family: var(--font-mono, monospace);
2924-
white-space: nowrap;
2925-
overflow: hidden;
2926-
text-overflow: ellipsis;
2924+
white-space: pre;
29272925
color: var(--text-secondary);
29282926
line-height: 16px;
29292927
}
2928+
2929+
.minimap-preview-lines {
2930+
overflow-x: auto;
2931+
overflow-y: hidden;
2932+
max-height: 130px;
2933+
}
29302934
.minimap-preview-line.current {
29312935
background: rgba(255, 255, 0, 0.1);
29322936
color: var(--text-primary);

0 commit comments

Comments
 (0)