mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
fix(undotree): check foldmethod before invoking fold (#36192)
This commit is contained in:
@@ -236,7 +236,10 @@ local function buf_apply_graph_lines(tree, graph_lines, buf, meta, find_seq)
|
|||||||
local end_ = vim.api.nvim_buf_line_count(buf) - 1
|
local end_ = vim.api.nvim_buf_line_count(buf) - 1
|
||||||
local start = end_ - #line_buffer + 3
|
local start = end_ - #line_buffer + 3
|
||||||
vim.api.nvim_buf_call(buf, function()
|
vim.api.nvim_buf_call(buf, function()
|
||||||
|
local w = vim.b[buf].nvim_is_undotree
|
||||||
|
if vim.api.nvim_win_is_valid(w) and vim.wo[w].foldmethod == 'manual' then
|
||||||
vim.cmd.fold { range = { start, end_ } }
|
vim.cmd.fold { range = { start, end_ } }
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user