Skip to content

Commit 4d9642f

Browse files
committed
Simplified fix - minimal changes (Sun Nov 30 22:00:10 PST 2025)
1 parent 378bea7 commit 4d9642f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lua/treewalker/targets.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ function M.out(node)
2828
if not parent then break end
2929
node = parent
3030
end
31+
-- After escaping comment, try to find a good ancestor
32+
-- This handles TypeScript case where we need to move out further
33+
local temp_candidate = strategies.get_first_ancestor_with_diff_scol(node)
34+
if temp_candidate then
35+
node = temp_candidate
36+
end
3137
end
3238
end
3339

0 commit comments

Comments
 (0)