Skip to content

feat(picker.preview): preview oversized files around target - #2951

Open
soundsmitten wants to merge 1 commit into
folke:mainfrom
soundsmitten:feat/oversized-picker-previews
Open

feat(picker.preview): preview oversized files around target#2951
soundsmitten wants to merge 1 commit into
folke:mainfrom
soundsmitten:feat/oversized-picker-previews

Conversation

@soundsmitten

Copy link
Copy Markdown

Description

Picker file previews currently reject files larger than previewers.file.max_size, even when the item has an exact target position. This commonly affects LSP locations in generated or SDK files.

For oversized files with item.pos, preview a bounded slice centered around the target while preserving source line numbers and correctly resolving LSP columns. Regular files continue using the existing full-file preview path, and oversized files without a position keep the existing warning.

Also clears stale preview contents on refusal and error paths.

Related Issue(s)

Screenshots

Before

ScreenFloat Shot of Ghostty on 2026-09-05 at 15-03-04

After

ScreenFloat Shot of Ghostty on 2026-09-05 at 15-01-46

@github-actions github-actions Bot added picker size/xl Extra large PR (100+ lines changed) labels Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

picker size/xl Extra large PR (100+ lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant