Reimplement the now missing curwin_col_off FFI function binding, fix #38#41
Reimplement the now missing curwin_col_off FFI function binding, fix #38#41bbjornstad wants to merge 8 commits intoanuvyklack:masterfrom
curwin_col_off FFI function binding, fix #38#41Conversation
…ixes anuvyklack#38 As noted by @cassava, as of a recent version of this plugin, the `curwin_col_off` function was removed, leaving us to fend for ourselves. Luckily, @cassava also proposed a fix, the likes of which seems to work on my machine and from the limited reports, other individuals' machines as well. This commit simply implements the patch specified by @cassava as the solution to issues related to `curwin_col_off` no longer existing.
Not only was the original function `curwin_col_off` deprecated and removed, but we also have a number of recent deprecations related to vim operations on tables. In this case, we need to get rid of calls to `tbl_flatten` and replace them with `vim.iter():flatten():totable()` wrappings
Ffi curwin fix
I accidentally forgot this part in the first commit, but we do still need a function called `curwin_col_off` even though it was not used directly in `init.lua`.
fix(ffi): correctly include variant definition for `curwin_col_off`
|
If anyone finds this hoping that this issue has been fixed in the upstream version of pretty-fold.nvim, until this PR is merged you can substitute my fork in your configuration (bbjornstad/pretty-fold.nvim). When this makes its way into the original repository I will remove my fork and one can move back to the upstream repo. |
|
@bbjornstad I am using you fork, it works like charming 👍 |
might want to add this fork to rockerboo/awesome-neovim, because the last commit to this one was 2 years ago |
User should upgrade the plugin pretty-fold.nvim by manual. use bbjornstad/pretty-fold.nvim instead of anuvyklack/pretty-fold.nvim, because the later has not updated since 2 years ago. related issue: anuvyklack/pretty-fold.nvim#39 pr: anuvyklack/pretty-fold.nvim#41
- tbl_flatten is deprecated and will be removed in Nvim 0.13
- This patch exchanges the affected parts with the suggested
alternative vim.iter(…):flatten():totable()
fix(components): swap tbl_flatten
Please see the resolved issue for more information about the specific issue this is solving. TLDR: removed a function binding which was necessary for plugin operation and reimplemented it according to @cassava's proposed solution.
This has worked for me for some time and I believe for other people as well.