[Github-comments] [geany/geany] Sync highlighted symbol with cursor position (#1348)
frederik-labbe
notifications at xxxxx
Sun Dec 25 09:33:32 UTC 2016
The symbols tree view is allowing to navigate through all symbols parsed by CTags. However, when editing a symbol in the editor panel, the highlighted symbol won't synchronize in the tree view. As discussed in issue #1325, an option is to resolve the symbol from the current cursor position.
My implementation of the feature is doing this in two steps:
1. Check if a direct match can be made between the cursor line and one of the TMTag inside the tree
2. If no direct match but in a scope, resolve by selecting this scope
If both steps fail, the selection is cleared.
One thing that I am not sure yet how to implement is the auto-adjustment of the scrollbar to reach the symbol if it's out of visible range. Maybe someone has an idea how to do that in a clean fashion? Should the automatic scroll be an option or default behavior?
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1348
-- Commit Summary --
* Sync highlighted symbol with cursor position
-- File Changes --
M src/editor.c (9)
M src/symbols.c (115)
M src/symbols.h (7)
M src/ui_utils.c (33)
M src/ui_utils.h (2)
-- Patch Links --
https://github.com/geany/geany/pull/1348.patch
https://github.com/geany/geany/pull/1348.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1348
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20161225/a123dbd9/attachment.html>
More information about the Github-comments
mailing list