microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.51k stars 29.4k forks source link

Adopt selection support in notebook diff / interactive editor to enable in-editor history #142507

Open bpasero opened 2 years ago

bpasero commented 2 years ago

https://github.com/microsoft/vscode/commit/7858e237ae3cc69658ba4e8830c23a24deac2a45#diff-330f92e5612e8f9dcc91e85d694b6e10fdaa5f14c384157edfd27dfbbf0f8684 added support for selection in notebook editor to participate in history navigation by recording locations for each cell change. This is not yet adopted for these two:

Fyi for text diff editors we implemented this in a simple way by just delegating to the right hand (modified) side. This is not 100% correct because you could compare 2 different files via explorer where both sides are editable, but I have not heard complaints so far.

bpasero commented 2 years ago

Thanks, I can verify in endgame.

bpasero commented 2 years ago

I think this still does not work in notebook diff editors.

rebornix commented 2 years ago

https://user-images.githubusercontent.com/876920/166748710-2e0070b7-eccf-452d-b756-24be3677340a.mov

@bpasero can you check above video to verify if that's what you are seeing too?:

bpasero commented 2 years ago

@rebornix this is not about navigating from a different editor back to the right cell but rather about navigating between cells from within the same editor 👍 . The idea is that an editor can emit selection change events whenever a meaningful selection change happens that should add to the history stack. For example, in the text editor case this happens when you move the mouse around inside the editor.