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

suggestion.lua executes an assignment *only* with 0.10.x but not 0.11.0+ ? #295

Open
proofer opened this issue Jun 7, 2024 · 0 comments

Comments

@proofer
Copy link

proofer commented Jun 7, 2024

I was reading the title module in order to understand what the config's suggestion.enabled actually controls, and I encountered near the top:

 local _, has_nvim_0_10_x = pcall(function()
   return vim.version().minor == 10
 end)

then down below the sole reference to has_nvim_0_10_x:

  local cursor_keys = "<End>"
  if has_nvim_0_10_x then
    cursor_keys = string.rep("<Down>", #vim.split(newText, "\n", { plain = true }) - 1) .. cursor_keys
  end

Now, I am pretty ignorant, so I have to allow for the possibility that the call to string.rep should be made only with 0.10.0. But I worry.

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

No branches or pull requests

1 participant