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

BUG: global table_is_empty #1466

Open
3 tasks done
bluss opened this issue May 12, 2024 · 0 comments · May be fixed by #1507
Open
3 tasks done

BUG: global table_is_empty #1466

bluss opened this issue May 12, 2024 · 0 comments · May be fixed by #1507
Labels
bug Something isn't working

Comments

@bluss
Copy link

bluss commented May 12, 2024

Did you check docs and existing issues?

  • I have read all the docs.
  • I have searched the existing issues.
  • I have searched the existing discussions.

Neovim Version (nvim -v)

v0.9.5

Operating System / Version

linux x86-64

Describe the Bug

function table_is_empty is global in the lua environment. This kind of error is normally a mistake. It's not a documented function. Autocomplete found it.

See:

function table_is_empty(table_to_check)

Screenshots, Traceback

No response

Steps to Reproduce

  1. View source code link above

Expected Behavior

Don't leak functions into the global scope, just to not cause problems for users down the line (API stability of unintentionally exposed functions etc). Thanks for the nice plugin!

Your Configuration

N/A

Other

I think the same might be true for variable col here, should be local?

if state.current_position == "right" then
col = vim.o.columns - tree_width - width - 1
else
col = tree_width - 1

@bluss bluss added the bug Something isn't working label May 12, 2024
@wsdjeg wsdjeg linked a pull request Jul 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant