Let's consider the following example:
```python import math class A(object): def f(self): pass def g(self): pass ```
From the symbols list, if I select the `f` method:
1. its name is highlighted in the symbols list 2. its heading is highlighted in the editor 3. but the status bar says that I'm in `A`, while I would have expected `A.f`
While, if, from the symbols list, I select the `A` class: 1. as above 2. as above 3. but the status bar says that I'm in `unknown`, while I would have expected `A`
Let's suppose now that the staus bar returns the right name of the current function.
From the editor, if I select the `g` method (could be its heading or its body):
1. its name is not highlighted in the symbols list (it's still `f`), while I would have expected it to be 2. the current line is highlighted in the editor 3. the status bar says that I'm in `A.g`
At this point, I think that it would be relatively easy to: 1. take the value returned from the status bar (`A.g`) 2. take the value of the current symbol highlighted in the symbols list (`A.f`) 3. if they are different [*] then highlight the symbol with value equal to one returned from the status bar (`A.g`)
[*] In certain cases the staus bar returns the value `unknown`, for instance if I select, from the editor, the import statement `import math`. So it would be better to rephrase the last point in:
3. if (they are different **and** the value of the staus bar is not unknown) then highlight the symbol with value equal to one returned from the status bar (`A.g`)
I would really supply a pull request, but unfortunately I don't know C.
Maybe this issue is somehow similar to issue #1325
Closed #1685.
* The highlighting in the symbols list doesn't follow the editor, it's merely the one you selected last. * When you click on a name in the symbols list, it tries to go to the definition of that name (e.g. the line at which the function name is defined) * The statusbar is trying to show the function your are *in* (e.g. the scope at the cursor), and the line `def foo()` isn't really inside `foo`, as it declares it.
So yeah, maybe it could be changed somehow to match what you expect, but I think that from my POV it's doing something sensible. And yeah, it feels very close to #1325.
github-comments@lists.geany.org