Skip to content

Commit 800b68f

Browse files
committed
fix: Fixed a bug causing incorrect fold state when multiple windows are open
1 parent 533ff65 commit 800b68f

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "bars-N-lines.nvim.wiki"]
2+
path = bars-N-lines.nvim.wiki
3+
url = https://github.com/OXY2DEV/bars-N-lines.nvim.wiki.git

bars-N-lines.nvim.wiki

Submodule bars-N-lines.nvim.wiki added at 51840d1

lua/bars/statuscolumn.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ end
113113

114114
---@type bars.statuscolumn.config
115115
statuscolumn.configuration = {
116+
enable = true,
116117
parts = {
117118
{ type = "sign" },
118119
{
@@ -225,9 +226,14 @@ statuscolumn.m_fold = function (config_table, buffer, window)
225226
local foldInfo_after = ffi.C.fold_info(handle, next_line);
226227

227228
local markers = config_table.markers;
229+
local closed;
230+
231+
vim.api.nvim_win_call(window, function ()
232+
closed = vim.fn.foldclosed(vim.v.lnum);
233+
end)
228234

229235
if foldInfo.start == vim.v.lnum then
230-
if vim.fn.foldclosed(vim.v.lnum) ~= -1 then
236+
if closed ~= -1 then
231237
-- Opened fold
232238
return get_output({
233239
content = utils.format_input(markers.open, foldInfo.level)

lua/bars/tabline.lua

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ end
107107

108108
---@type bars.tabline.config
109109
tabline.configuration = {
110+
enable = true,
110111
parts = {
111112
{
112113
type = "gap",
113114
id = 2
114115
},
115116
{
116117
type = "tabs",
117-
max_cols = 25,
118118
id = 3,
119119

120120
active = {
@@ -130,8 +130,7 @@ tabline.configuration = {
130130

131131
padding_left = { " ", "BarsTablineTabInactive" },
132132
padding_right = { " " },
133-
},
134-
wrap = { "" }
133+
}
135134
},
136135
{
137136
type = "bufs",
@@ -154,10 +153,7 @@ tabline.configuration = {
154153

155154
ignore = { "" }
156155
},
157-
},
158-
159-
skip_buftypes = { "nofile", "terminal" },
160-
skip_filetypes = { "noice" },
156+
}
161157
}
162158

163159

0 commit comments

Comments
 (0)