mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-26 15:44:20 +00:00
outline: Fix nesting issue for variable declarations (#45797)
Before: <img width="665" height="116" alt="image" src="https://github.com/user-attachments/assets/3c0b6ea4-f030-4fef-a0eb-8251ce16a651" /> After: <img width="601" height="104" alt="image" src="https://github.com/user-attachments/assets/31659c75-6f73-40e7-9d3b-c4ae99357b12" /> The fix is similar to https://github.com/zed-industries/zed/pull/36076. Release Notes: - Fix outline nesting issue for variable declarations in C++
This commit is contained in:
parent
e07a304c32
commit
0e5b6a5f3f
1 changed files with 3 additions and 1 deletions
|
|
@ -37,7 +37,9 @@
|
|||
(type_qualifier)? @context
|
||||
type: (_) @context
|
||||
declarator: (init_declarator
|
||||
declarator: (_) @name)) @item
|
||||
; The declaration may define multiple variables, using @item on the
|
||||
; declarator so that they get distinct ranges.
|
||||
declarator: (_) @item @name))
|
||||
|
||||
(function_definition
|
||||
(type_qualifier)? @context
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue