Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[folding] navigateToLastEditLocation doesn't expand folded regions #59383

Closed
miguelsolorio opened this issue Sep 25, 2018 · 2 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-folding Editor code folding issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@miguelsolorio
Copy link
Contributor

Issue Type: Bug

Testing #59243

This works on a single file, however when you navigate to another file it doesn't expand folded regions.

Steps to reproduce

  1. Make an edit to a line
  2. Navigate to another tab
  3. Use the shortcut command to navigate to last edit location (cmd+k cmd+q)
  4. Line returns to last line in folder region (doesn't go to last edit location)

Expected results

  1. Line to expand folded regions and return to previous position

gif

VS Code version: Code - Insiders 1.28.0-insider (fe8d9d2, 2018-09-25T07:29:33.175Z)
OS version: Darwin x64 18.0.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz (8 x 3100)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 4, 4, 4
Memory (System) 16.00GB (0.04GB free)
Process Argv
Screen Reader no
VM 22%
Extensions (8)
Extension Author (truncated) Version
vscode-svgviewer css 1.4.6
gitlens eam 8.5.6
vscode-pull-request-github Git 0.1.6
beautify Hoo 1.4.4
vscode-colorize kam 0.7.2
theme-monokai-pro-vscode mon 1.1.8
ayu tea 0.16.0
sort-lines Tyr 1.7.0

(9 theme extensions excluded)

@vscodebot vscodebot bot added the insiders label Sep 25, 2018
@bpasero bpasero added this to the September 2018 milestone Sep 26, 2018
@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug editor and removed insiders labels Sep 26, 2018
@bpasero bpasero assigned rebornix and unassigned bpasero Sep 26, 2018
@bpasero bpasero removed this from the September 2018 milestone Sep 26, 2018
@bpasero
Copy link
Member

bpasero commented Sep 26, 2018

@rebornix looks like an issue with the editor to me. I am calling editor.setSelection() but the folded region is not expanded. This is possibly a race condition because the editor is not yet rendered when calling the method?

@rebornix
Copy link
Member

rebornix commented Oct 1, 2018

@bpasero we get the folding model asynchronously so the folding regions are restored after the selection is set. The sequence of navigating to an invisible editor and setting selections is

It behaves differently when the target editor is already visible as there will be no restoreViewState.

@rebornix rebornix assigned aeschli and unassigned rebornix Oct 1, 2018
@rebornix rebornix added the editor-folding Editor code folding issues label Oct 1, 2018
@aeschli aeschli changed the title navigateToLastEditLocation doesn't expand folded regions [foling] navigateToLastEditLocation doesn't expand folded regions Oct 2, 2018
@aeschli aeschli added this to the Backlog milestone Oct 2, 2018
@alexdima alexdima removed the editor label Oct 8, 2018
@aeschli aeschli changed the title [foling] navigateToLastEditLocation doesn't expand folded regions [folding] navigateToLastEditLocation doesn't expand folded regions Oct 12, 2018
@aeschli aeschli modified the milestones: Backlog, October 2020 Oct 14, 2020
@mjbvz mjbvz added the verified Verification succeeded label Oct 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-folding Editor code folding issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants
@rebornix @bpasero @alexdima @aeschli @mjbvz @miguelsolorio and others