Screen jumps when folding/unfolding code if cursor is off-screen


#1

Often the screen jumps when I am unfolding code.

I think the repro is:

  • Open a file that is longer than the screen is tall.
  • Place the cursor at the bottom of the file.
  • Using the trackpad, scroll the window to the top, leaving the cursor off-screen at the bottom of the file.
  • Click in the gutter (next to the line numbers) to fold or unfold a block of code.

Expected: You stay where you are and the block folds or unfolds.

Actual: The block folds/unfolds, but you are also jumped to the bottom of the file, where the cursor is.

Now that I’ve figured out the repro I’ll be able to avoid it, but this has been really weird behavior.


#2

I have experienced the same thing and found it odd behavior and pretty annoying as well. Like you said, once you know about it you can work around it, but still.


#3

Same here — this is pretty annoying.