mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
fix(statuscolumn): fix folds_open = true
(#3756)
After some recent changes in https://github.com/neovim/neovim/pull/28709 I was getting an error when the user had `folds_open = true` in his personal configuration whenever he pressed `o/O`. This is an attempt to fix that. ## What is this PR for? I was getting an error with `folds_open = true` in the user configuration whenever pressing `o/O` or pressing `Enter` for a new line. The error was `Error executing lua: ...e/jrn23/projects/plugins/LazyVim/lua/lazyvim/util/ui.lua:127: attempt to index a number value`. <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> ## Does this PR fix an existing issue? No <!-- If this PR fixes any issues, please link to the issue here. Fixes #<issue_number> --> ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
This commit is contained in:
parent
b0274a2222
commit
b47c65f408
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ function M.statuscolumn()
|
||||||
elseif
|
elseif
|
||||||
show_open_folds
|
show_open_folds
|
||||||
and not LazyVim.ui.skip_foldexpr[buf]
|
and not LazyVim.ui.skip_foldexpr[buf]
|
||||||
and vim.treesitter.foldexpr(vim.v.lnum):sub(1, 1) == ">"
|
and tostring(vim.treesitter.foldexpr(vim.v.lnum)):sub(1, 1) == ">"
|
||||||
then -- fold start
|
then -- fold start
|
||||||
fold = { text = vim.opt.fillchars:get().foldopen or "", texthl = githl }
|
fold = { text = vim.opt.fillchars:get().foldopen or "", texthl = githl }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue