caponetto / vscode-diff-viewer

A simple VS Code extension to easily visualize git diff files.
https://marketplace.visualstudio.com/items?itemName=caponetto.vscode-diff-viewer&ssr=false#overview
MIT License
44 stars 5 forks source link

Save viewed state #52

Closed jacekkopecky closed 2 years ago

jacekkopecky commented 2 years ago

This PR starts the work to save viewed state for diffs.

As discussed in #50 the state is saved in workspaceState so that we don't have to change the file.

I've split the work in three stages; the first is done

stage 1 – save basic boolean state

stage 2 – optional – make it work with multiple tabs open

stage 3 – work nicely with changes in the diff file

"won't" requirements:

What do you think @caponetto ? I'm particularly not sure about where you would like some of the new interfaces and classes to live.

The first commit is just localized suggested renaming for clarity where we deal with elements inside a diff view, not the diff container itself.

caponetto commented 2 years ago

@jacekkopecky can you please rebase your branch with main?

jacekkopecky commented 2 years ago

Thank you @caponetto!

If you're happy with it for now, can you please look at the PR description and see if you like the rest of the plan? And would you like to merge first and have me continue in a next PR, or merge when the whole thing is done?

caponetto commented 2 years ago

@jacekkopecky good job here! I'll merge this PR already. Feel free to send others for stage 2 and stage 3, they are very welcome. :)