Skip to content

fix: avoid clobbering existing lists#74

Merged
dmmulroy merged 1 commit into
dmmulroy:mainfrom
davidmh:fix/qf-history
Jan 12, 2026
Merged

fix: avoid clobbering existing lists#74
dmmulroy merged 1 commit into
dmmulroy:mainfrom
davidmh:fix/qf-history

Conversation

@davidmh
Copy link
Copy Markdown
Contributor

@davidmh davidmh commented Jan 12, 2026

I've found a small issue with the quickfix list integration.

Setting the replace flag when sending the TSC results into the quickfix list truncates existing results.

That's a problem because the quickfix list keeps a history of all the lists generated during the session, and you can navigate the history with :colder and :cnewer. Which means that populating the list from tsc.nvim hijacks whatever list spot we were displaying.

For example, imagine you have the lists in :chistory

order title
1 grug-far results 1
2 grug-far results 2
* 3 some other list

Then you navigate back to see the second list with :colder.

order title
1 grug-far results 1
* 2 grug-far results 2
3 some other list

Then you use TSC and send the results to the list:

order title
1 grug-far results 1
* 2 TSC
3 some other list

Now I've lost grug-far results 2.

I'm updating the quickfix action to replace the list only if the existing list was created by TSC. That way we can keep the exiting flow that shows the latest state regarding TSC, and avoid destroying unrelated lists.

@dmmulroy dmmulroy merged commit eef9e2a into dmmulroy:main Jan 12, 2026
1 check passed
@davidmh davidmh deleted the fix/qf-history branch January 12, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants