whitphx/vscode-emacs-mcx

movePrimaryCursorIntoVisibleRange is overzealous

Opened this issue · 2 comments

Sorry looks like my proposed fix for #2009 is causing unforeseen problems. Now the cursor is moved to the top / bottom of the screen in scenarios where it doesn't make sense. For example, jump to definition should put the cursor on the symbol, but instead we now see the cursor placed at the top/bottom edge of the screen.

Thank you, but

jump to definition should put the cursor on the symbol, but instead we now see the cursor placed at the top/bottom edge of the screen.

I couldn't reproduce this issue in my env.
Could you provide sample code?

chee commented

Thank you, but

jump to definition should put the cursor on the symbol, but instead we now see the cursor placed at the top/bottom edge of the screen.

I couldn't reproduce this issue in my env. Could you provide sample code?

this does happen, if you:

  1. Activate ISearch Forward (^S)
  2. Highlight a word that appears here at a later page in the file
  3. Press addSelectionToNextFindMatch (⌘+D)

your first highlight will now have been removed from the symbol, and placed at the top edge of the screen.

also happens when dragging to select text that goes over a page boundary