Repository navigation
Investigate possible Find in Files destination loss on first CSV open #127
Description
Clicking a result in VS Code's Find in Files sidebar should open the intended text editor at the matching line and column, with the destination remaining selected after editor initialization.
There may be a remaining edge case when the CSV is not already open in a native text editor. If VS Code initializes CSV's custom editor before handing the file to the text editor, the requested search destination may be lost. This specific case has not been confirmed end to end; this issue records a suspected limitation for separate investigation.
The current resolveCustomTextEditor(document, webviewPanel, token) entry point receives the document, panel and cancellation token, without the native open options or requested text selection. A subsequent handoff can therefore open the correct file without explicitly forwarding the requested line and column. That does not establish that VS Code has no supported way to preserve the destination: its routing and selection behavior need to be checked before concluding this is an API limitation.
#110 addresses demonstrated lifecycle and handoff defects: it avoids reopening an existing text editor in the same group, prevents duplicate handoffs, respects disposal/cancellation during initialization, and preserves remote resource URI information. This follow-up concerns the possible remaining case where no text editor exists yet.
Suggested verification:
- Close the CSV's text and table editors, leaving the extension enabled. Include the extension's disabled-table/native-text handoff configuration described in Cannot jump to search result in text editor when CSV extension is enabled #104.
- Search for a known value well below the beginning of the file using Find in Files.
- Click the result and check whether the intended text editor retains the matching line and column after all editor initialization and handoffs finish.
- Compare with the same file already open in a text editor. Check CSV and TSV and the intended editor group.
Record the platform, VS Code version, extension/table-enabled state and which editor initially opens. This can be investigated on any supported platform; Windows/WSL reproduction is not a prerequisite.
Resolve this issue by either confirming and correcting destination loss, with a regression check, or documenting evidence that VS Code already preserves the destination through the relevant routing path. Any proposed change to editor associations or user settings should be discussed separately rather than silently changing those preferences.
Activity
jonaraphael commentedon Oct 17, 2026
The installed-host checks confirm native search destinations with CSV Off and with a supported saved file explicitly switched to Text. They do not establish a fix for the first search open while the file still resolves to Table. I am keeping this investigation open and will treat the missing callback range as a clue, not proof that a supported solution is impossible.
Audit note: Open investigation: cold native search destination. Remaining work: Reproduce cold and warm CSV/TSV openings in the intended group, compare match selection before/after custom resolution, and identify a supported handoff. Preserve Off/per-file Text routing as distinct delivered paths.