fix(dap.hover): don't format dereferenced variables specially

This commit is contained in:
2025-09-28 12:57:32 +02:00
parent b475119409
commit 0916fa1cb8
-9
View File
@@ -72,11 +72,6 @@ function Node:is_c_array_element()
return self.item.name:match("^%[?%d+%]?$") ~= nil return self.item.name:match("^%[?%d+%]?$") ~= nil
end end
---@return boolean
function Node:is_c_pointer_child()
return self.parent ~= nil and self.parent:is_c_pointer()
end
---@return string ---@return string
function Node:format_c() function Node:format_c()
if self:is_c_array_element() then if self:is_c_array_element() then
@@ -88,10 +83,6 @@ function Node:format_c()
) )
end end
if self:is_c_pointer_child() then
return string.format("%s = %s", self.item.name, self.item.value)
end
return string.format( return string.format(
"%s %s = %s", "%s %s = %s",
self.item.type, self.item.type,