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

Break ties between ghost nodes by looking at cursor position #1690

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

ncik-roberts
Copy link
Contributor

Fix #1689 by choosing the best ghost node when both are ghost.

It would take me many times longer to write a test than it took to write this PR. If anyone has ideas for a simple test, I'm open to it.

Copy link
Collaborator

@voodoos voodoos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for your contribution !

(I cannot think of a simple way to make a test appart from writing some custom ppx...)

CHANGES.md Show resolved Hide resolved
@voodoos voodoos merged commit 7b73c6a into ocaml:master Oct 20, 2023
7 checks passed
voodoos added a commit to voodoos/merlin that referenced this pull request Nov 8, 2023
voodoos added a commit to voodoos/opam-repository that referenced this pull request Dec 1, 2023
CHANGES:

Fri Dec  1 15:00:42 CET 2023

  + merlin binary
    - Fix a follow-up issue to the preference of non-ghost nodes introduced in ocaml/merlin#1660 (ocaml/merlin#1690, fixes ocaml/merlin#1689)
    - Add `-cache-lifespan` flag, that sets cache invalidation period. (ocaml/merlin#1698,
      ocaml/merlin#1705)
    - Fix Merlin locate not fallbacking on the correct file in case of ambiguity
      (@goldfirere, ocaml/merlin#1699)
    - Fix Merlin reporting errors provoked by the recovery itself (ocaml/merlin#1709, fixes
      ocaml/merlin#1704)
  + editor modes
    - vim: load merlin when Vim is compiled with +python3/dyn (e.g. MacVim)
    - emacs: highlight only first error line by default (ocaml/merlin#1693, fixes ocaml/merlin#1663)
voodoos added a commit to voodoos/opam-repository that referenced this pull request Dec 1, 2023
CHANGES:

Fri Dec  1 15:00:42 CET 2023

  + merlin binary
    - Fix a follow-up issue to the preference of non-ghost nodes introduced in ocaml/merlin#1660 (ocaml/merlin#1690, fixes ocaml/merlin#1689)
    - Add `-cache-lifespan` flag, that sets cache invalidation period. (ocaml/merlin#1698,
      ocaml/merlin#1705)
    - Ignore the new 5.1 `cmi-file` flag instead of rejecting it (ocaml/merlin#1710, fixes
      ocaml/merlin#1703)
    - Fix Merlin locate not fallbacking on the correct file in case of ambiguity
      (@goldfirere, ocaml/merlin#1699)
    - Fix Merlin reporting errors provoked by the recovery itself (ocaml/merlin#1709, fixes
      ocaml/merlin#1704)
  + editor modes
    - vim: load merlin when Vim is compiled with +python3/dyn (e.g. MacVim)
    - emacs: highlight only first error line by default (ocaml/merlin#1693, fixes ocaml/merlin#1663)
voodoos added a commit to voodoos/opam-repository that referenced this pull request Dec 1, 2023
CHANGES:

Fri Dec  1 15:00:42 CET 2023

  + merlin binary
    - Fix a follow-up issue to the preference of non-ghost nodes introduced in ocaml/merlin#1660 (ocaml/merlin#1690, fixes ocaml/merlin#1689)
    - Add `-cache-lifespan` flag, that sets cache invalidation period. (ocaml/merlin#1698,
      ocaml/merlin#1705)
    - Ignore the new 5.1 `cmi-file` flag instead of rejecting it (ocaml/merlin#1710, fixes
      ocaml/merlin#1703)
    - Fix Merlin locate not fallbacking on the correct file in case of ambiguity
      (@goldfirere, ocaml/merlin#1699)
    - Fix Merlin reporting errors provoked by the recovery itself (ocaml/merlin#1709, fixes
      ocaml/merlin#1704)
    - Add support for OCaml 5.1.1 (ocaml/merlin#1714)
  + editor modes
    - vim: load merlin when Vim is compiled with +python3/dyn (e.g. MacVim)
    - emacs: highlight only first error line by default (ocaml/merlin#1693, fixes ocaml/merlin#1663)
voodoos added a commit to voodoos/opam-repository that referenced this pull request Dec 1, 2023
CHANGES:

Fri Dec  1 15:00:42 CET 2023

  + merlin binary
    - Fix a follow-up issue to the preference of non-ghost nodes introduced in ocaml/merlin#1660 (ocaml/merlin#1690, fixes ocaml/merlin#1689)
    - Add `-cache-lifespan` flag, that sets cache invalidation period. (ocaml/merlin#1698,
      ocaml/merlin#1705)
    - Ignore the new 5.1 `cmi-file` flag instead of rejecting it (ocaml/merlin#1710, fixes
      ocaml/merlin#1703)
    - Fix Merlin locate not fallbacking on the correct file in case of ambiguity
      (@goldfirere, ocaml/merlin#1699)
    - Fix Merlin reporting errors provoked by the recovery itself (ocaml/merlin#1709, fixes
      ocaml/merlin#1704)
    - Add support for OCaml 5.1.1 (ocaml/merlin#1714)
  + editor modes
    - vim: load merlin when Vim is compiled with +python3/dyn (e.g. MacVim)
    - emacs: highlight only first error line by default (ocaml/merlin#1693, fixes ocaml/merlin#1663)

[new release] merlin-lib and merlin (4.13-501)

CHANGES:

Fri Dec  1 15:00:42 CET 2023

  + merlin binary
    - Fix a follow-up issue to the preference of non-ghost nodes introduced in ocaml/merlin#1660 (ocaml/merlin#1690, fixes ocaml/merlin#1689)
    - Add `-cache-lifespan` flag, that sets cache invalidation period. (ocaml/merlin#1698,
      ocaml/merlin#1705)
    - Ignore the new 5.1 `cmi-file` flag instead of rejecting it (ocaml/merlin#1710, fixes
      ocaml/merlin#1703)
    - Fix Merlin locate not fallbacking on the correct file in case of ambiguity
      (@goldfirere, ocaml/merlin#1699)
    - Fix Merlin reporting errors provoked by the recovery itself (ocaml/merlin#1709, fixes
      ocaml/merlin#1704)
  + editor modes
    - vim: load merlin when Vim is compiled with +python3/dyn (e.g. MacVim)
    - emacs: highlight only first error line by default (ocaml/merlin#1693, fixes ocaml/merlin#1663)

[new release] merlin-lib and merlin (4.13-414)

CHANGES:

Fri Dec  1 15:00:42 CET 2023

  + merlin binary
    - Fix a follow-up issue to the preference of non-ghost nodes introduced in ocaml/merlin#1660 (ocaml/merlin#1690, fixes ocaml/merlin#1689)
    - Add `-cache-lifespan` flag, that sets cache invalidation period. (ocaml/merlin#1698,
      ocaml/merlin#1705)
    - Fix Merlin locate not fallbacking on the correct file in case of ambiguity
      (@goldfirere, ocaml/merlin#1699)
    - Fix Merlin reporting errors provoked by the recovery itself (ocaml/merlin#1709, fixes
      ocaml/merlin#1704)
  + editor modes
    - vim: load merlin when Vim is compiled with +python3/dyn (e.g. MacVim)
    - emacs: highlight only first error line by default (ocaml/merlin#1693, fixes ocaml/merlin#1663)
voodoos added a commit to voodoos/opam-repository that referenced this pull request Dec 18, 2023
CHANGES:

Mon Dec 18 16:42:00 CET 2023

  + merlin binary
    - Fix a follow-up issue to the preference of non-ghost nodes introduced in ocaml/merlin#1660 (ocaml/merlin#1690, fixes ocaml/merlin#1689)
    - Add `-cache-lifespan` flag, that sets cache invalidation period. (ocaml/merlin#1698,
      ocaml/merlin#1705)
    - Fix Merlin locate not fallbacking on the correct file in case of ambiguity
      (@goldfirere, ocaml/merlin#1699)
    - Fix Merlin reporting errors provoked by the recovery itself (ocaml/merlin#1709, fixes
      ocaml/merlin#1704)
  + editor modes
    - vim: load merlin when Vim is compiled with +python3/dyn (e.g. MacVim)
    - emacs: highlight only first error line by default (ocaml/merlin#1693, fixes ocaml/merlin#1663)
voodoos added a commit to voodoos/opam-repository that referenced this pull request Dec 18, 2023
CHANGES:

Mon Dec 18 16:42:00 CET 2023

  + merlin binary
    - Fix a follow-up issue to the preference of non-ghost nodes introduced in ocaml/merlin#1660 (ocaml/merlin#1690, fixes ocaml/merlin#1689)
    - Add `-cache-lifespan` flag, that sets cache invalidation period. (ocaml/merlin#1698,
      ocaml/merlin#1705)
    - Fix Merlin locate not fallbacking on the correct file in case of ambiguity
      (@goldfirere, ocaml/merlin#1699)
    - Fix Merlin reporting errors provoked by the recovery itself (ocaml/merlin#1709, fixes
      ocaml/merlin#1704)
  + editor modes
    - vim: load merlin when Vim is compiled with +python3/dyn (e.g. MacVim)
    - emacs: highlight only first error line by default (ocaml/merlin#1693, fixes ocaml/merlin#1663)
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
CHANGES:

Fri Dec  1 15:00:42 CET 2023

  + merlin binary
    - Fix a follow-up issue to the preference of non-ghost nodes introduced in ocaml/merlin#1660 (ocaml/merlin#1690, fixes ocaml/merlin#1689)
    - Add `-cache-lifespan` flag, that sets cache invalidation period. (ocaml/merlin#1698,
      ocaml/merlin#1705)
    - Ignore the new 5.1 `cmi-file` flag instead of rejecting it (ocaml/merlin#1710, fixes
      ocaml/merlin#1703)
    - Fix Merlin locate not fallbacking on the correct file in case of ambiguity
      (@goldfirere, ocaml/merlin#1699)
    - Fix Merlin reporting errors provoked by the recovery itself (ocaml/merlin#1709, fixes
      ocaml/merlin#1704)
    - Add support for OCaml 5.1.1 (ocaml/merlin#1714)
  + editor modes
    - vim: load merlin when Vim is compiled with +python3/dyn (e.g. MacVim)
    - emacs: highlight only first error line by default (ocaml/merlin#1693, fixes ocaml/merlin#1663)

[new release] merlin-lib and merlin (4.13-501)

CHANGES:

Fri Dec  1 15:00:42 CET 2023

  + merlin binary
    - Fix a follow-up issue to the preference of non-ghost nodes introduced in ocaml/merlin#1660 (ocaml/merlin#1690, fixes ocaml/merlin#1689)
    - Add `-cache-lifespan` flag, that sets cache invalidation period. (ocaml/merlin#1698,
      ocaml/merlin#1705)
    - Ignore the new 5.1 `cmi-file` flag instead of rejecting it (ocaml/merlin#1710, fixes
      ocaml/merlin#1703)
    - Fix Merlin locate not fallbacking on the correct file in case of ambiguity
      (@goldfirere, ocaml/merlin#1699)
    - Fix Merlin reporting errors provoked by the recovery itself (ocaml/merlin#1709, fixes
      ocaml/merlin#1704)
  + editor modes
    - vim: load merlin when Vim is compiled with +python3/dyn (e.g. MacVim)
    - emacs: highlight only first error line by default (ocaml/merlin#1693, fixes ocaml/merlin#1663)

[new release] merlin-lib and merlin (4.13-414)

CHANGES:

Fri Dec  1 15:00:42 CET 2023

  + merlin binary
    - Fix a follow-up issue to the preference of non-ghost nodes introduced in ocaml/merlin#1660 (ocaml/merlin#1690, fixes ocaml/merlin#1689)
    - Add `-cache-lifespan` flag, that sets cache invalidation period. (ocaml/merlin#1698,
      ocaml/merlin#1705)
    - Fix Merlin locate not fallbacking on the correct file in case of ambiguity
      (@goldfirere, ocaml/merlin#1699)
    - Fix Merlin reporting errors provoked by the recovery itself (ocaml/merlin#1709, fixes
      ocaml/merlin#1704)
  + editor modes
    - vim: load merlin when Vim is compiled with +python3/dyn (e.g. MacVim)
    - emacs: highlight only first error line by default (ocaml/merlin#1693, fixes ocaml/merlin#1663)
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
CHANGES:

Mon Dec 18 16:42:00 CET 2023

  + merlin binary
    - Fix a follow-up issue to the preference of non-ghost nodes introduced in ocaml/merlin#1660 (ocaml/merlin#1690, fixes ocaml/merlin#1689)
    - Add `-cache-lifespan` flag, that sets cache invalidation period. (ocaml/merlin#1698,
      ocaml/merlin#1705)
    - Fix Merlin locate not fallbacking on the correct file in case of ambiguity
      (@goldfirere, ocaml/merlin#1699)
    - Fix Merlin reporting errors provoked by the recovery itself (ocaml/merlin#1709, fixes
      ocaml/merlin#1704)
  + editor modes
    - vim: load merlin when Vim is compiled with +python3/dyn (e.g. MacVim)
    - emacs: highlight only first error line by default (ocaml/merlin#1693, fixes ocaml/merlin#1663)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 4.13-501
Development

Successfully merging this pull request may close these issues.

#1664 may select a worse ghost node if both nodes are ghost
2 participants