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

Fix some length usage #27

Merged
merged 6 commits into from
Jan 24, 2025
Merged

Fix some length usage #27

merged 6 commits into from
Jan 24, 2025

Conversation

xvw
Copy link
Member

@xvw xvw commented Jan 23, 2025

fix #25

@xvw xvw requested a review from voodoos January 23, 2025 10:57
@voodoos
Copy link
Member

voodoos commented Jan 23, 2025

The changes look good to me but the CI disagrees...

@@ -134,7 +134,7 @@ If CURRENT is set, the range of the enclosing will be highlighted."
(font-lock-fontify-region (point-min) (point-max))
(buffer-string)))
(display-buffer ocaml-eglot-type-buffer-name))
(when (and current (> (length ocaml-eglot-type-enclosing-types) 0))
(when (and current (not (null ocaml-eglot-type-enclosing-types)))
Copy link
Member

Choose a reason for hiding this comment

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

Is this really doing the same thing ? Are lisp lists null when they are empty ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, following my experiments. But I'll add some illustration test

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

The main issue is the fact that it does not work on vector. So (null []) will return nil.

@xvw xvw changed the title Fix some length usage Draft: Fix some length usage Jan 23, 2025
@xvw xvw changed the title Draft: Fix some length usage Fix some length usage Jan 24, 2025
@xvw xvw merged commit 795bc3c into main Jan 24, 2025
4 checks passed
@xvw xvw deleted the fix-some-length-usage branch January 24, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the case of empty list or vector
3 participants