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

docs: fix broken/buggy lua examples #943

Merged
merged 3 commits into from
Jul 18, 2024

Conversation

gepbird
Copy link
Contributor

@gepbird gepbird commented Jul 18, 2024

Breakdown of #922. This PR fixes lua codes that cause runtime errors (a096678 and 5e7687a) and has buggy behaviours (9fedfd1), see the detailed commit message for more info.

These are mostly notes to myself how does it compare to previous PR:

  • cherry-picked 698b202
  • cherry-picked c0c9b72 without stylistic changes
  • cherry-picked 8bd95fc without the extra print (currently on line 168 it doesn't have print buffer_a, on 486 it has)

Follow-up PRs (I might wait with these until this is merged to avoid merge conflicts):

cc @akinsho

gepbird added 3 commits July 18, 2024 12:34
Previously a new highlight was created and cached for each index.
For example when the result table only has a warning, an orange color
highlight will be created and cached for index 1. Then the user fixes
the warning but generates an error with index 1, the orange color will be
reused from the cache rather than creating a highlight for the
associated red color. Using an existing highlight with link will
avoid using that cache entirely.
`buffer_a.modified` returned a bool rather than a number.
@akinsho
Copy link
Owner

akinsho commented Jul 18, 2024

LGTM thanks for splitting this 🥇

@akinsho akinsho merged commit f98ede0 into akinsho:main Jul 18, 2024
2 checks passed
@gepbird gepbird deleted the docs-fix-lua-examples branch July 18, 2024 11:09
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.

2 participants