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

Moving cursor across folded code should not automatically unfold #16858

Closed
michael-yx-wu opened this issue Dec 7, 2016 · 6 comments
Closed
Assignees

Comments

@michael-yx-wu
Copy link

michael-yx-wu commented Dec 7, 2016

  • VSCode Version: 1.7.2
  • OS Version: OS X 10.11.16

Folding code is often a strategy for hiding parts of files that aren't important or relevant to the current task and making it more manageable to scroll up / down. Given this context, I propose that when code is folded, it should perhaps remain folded until the user explicitly wants to unfold it.

Steps to Reproduce:

  1. Fold code
  2. Attempt to move cursor over folded code

Example:

dec-07-2016 15-51-21

Desired Behavior:

  1. Fold code
  2. Be able to move cursor past line of folded code without auto-unfolding
@aeschli
Copy link
Contributor

aeschli commented Dec 8, 2016

I can not reproduce that. When move the cursor over a folded section (cursor down, cursor down) or I place the cursor at the end of the line, this does not unfold the section.
What key sequence do you exactly press?

@michael-yx-wu
Copy link
Author

This happens when I press j, k, up, down in either normal or insert mode. In gif, you can see that my cursor is also at the end of the line.

@aeschli
Copy link
Contributor

aeschli commented Dec 13, 2016

@michael-yx-wu I guess you are using a VIM extension. Which one is it? You have to file this issue against that extension.

@michael-yx-wu
Copy link
Author

Okay I'll refile against the vscode vim extension. I believe I'm using the one published by msft

@aeschli
Copy link
Contributor

aeschli commented Dec 29, 2016

Thanks. Closing issue then

@emyller
Copy link

emyller commented Jun 15, 2017

This happens to me even with all extensions disabled. I really wish to place the cursor after a folded code, hit Enter twice and be able to write new stuff after the folded code block. Here's what happens instead:

  • Scenario 1: I focus/click the region after the folded code block. The block expands.
  • Scenario 2: Even if I manually fold the expanded block, hitting Enter in there will add the new chars right after the folded block's first line instead of where I need (completely after it).

Sublime Text 3 delivers the expected behavior: https://streamable.com/5yct3
VSCode is weird about that: https://streamable.com/gjfcy

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants