Skip to content

Neovim bug: Cursor line jumps on :MerlinTypeOf #1221

@ddickstein

Description

@ddickstein

@let-def's fix for issue #553 (7efcb22) introduces a bug in Neovim where the current line jumps to the top of the window on repeated calls to MerlinTypeOf. I do not yet understand why; only that I can reproduce it reliably.

  1. Open Neovim to a single OCaml file. It must be the only window in the tab (not sure why).
  2. Scroll down a bit so the top of your window is not at line 1 (again, not sure why).
  3. Put your cursor over some OCaml value and run :MerlinTypeOf. Observe that works correctly.
  4. Now run :MerlinTypeOf again on any value in the same line.
  5. Observe that the window scrolls s.t. the current line is now at the top of the window.

merlin-jump-2020-12-08_20 13 03

I wonder whether 7efcb22 is still needed. When I tried undoing those changes the new issue disappears and I was unable to reproduce issue #553 (my type history buffer seems to work fine). Maybe a change to neovim and/or merlin in the last 4 years has obviated this change. Still, I don't really understand why this new bug happens -- it's pretty bizarre.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions