zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.45k stars 3.12k forks source link

Current symbol in the outline panel not highlighted with nested functions in Python #20989

Open achimnol opened 18 hours ago

achimnol commented 18 hours ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Suppose we have a nested Python function like this:

def my_func():
    pass  # L1
    def inner1():
        pass  # L2
    def inner2():
        pass  # L3
    pass  # L4

Placing the cursor in L1, L2, and L3 highlights the current symbol as expected. Placing the cursor in L4 removes the current symbol highlighting in the outline panel, but I think it should do the same with L1.

I'm not sure this is a Python-specific issue, but it happens with both pyright and pylsp.

Environment

Zed 0.162.3 on macOS 15.2 beta (24C5079e).

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

No response