Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions lua/cmake-tools/session.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,15 @@ local function get_dirty_fields(current, default)
for key, current_value in pairs(current) do
local default_value = default[key]
if type(current_value) == "table" and type(default_value) == "table" then
local dirty_sub = get_dirty_fields(current_value, default_value)
if dirty_sub then
dirty[key] = dirty_sub
if vim.islist(current_value) or vim.islist(default_value) then
if not vim.deep_equal(current_value, default_value) then
dirty[key] = current_value
end
else
local dirty_sub = get_dirty_fields(current_value, default_value)
if dirty_sub then
dirty[key] = dirty_sub
end
end
elseif current_value ~= default_value then
dirty[key] = current_value
Expand Down
Loading