SUMMARY If file is reloaded and the amount of lines change, the Symbol Outline is out of sync with the lines, and shows a wrong symbol for the line. STEPS TO REPRODUCE 1. Open any file with language server that has Symbol Outline 2. Modify the file by adding 100 lines somewhere 3. Make sure the symbol outline shows the correct symbol within those lines 4. Use git or other tool *outside of Kate* to discard the changes 5. Reload the file (do not close and re-open, reload it in place) OBSERVED RESULT Symbols in symbol outline get out of sync, and you may get wrong symbol for the line now that the amount of lines has changed. EXPECTED RESULT Symbol outline is refreshed when file is reloaded SOFTWARE/OS VERSIONS Operating System: Fedora Linux 41 KDE Plasma Version: 6.3.80 KDE Frameworks Version: 6.11.0 Qt Version: 6.8.1 Kernel Version: 6.12.10-200.fc41.x86_64 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 3600 6-Core Processor Memory: 15.5 GiB of RAM Graphics Processor: AMD Radeon RX 6600 ADDITIONAL INFORMATION Like mentioned above, if the file is closed and re-opened, the symbol outline is in sync again. This only occurs if file is reloaded in-place, for example from the info notification that appears on top of file when Kate notices the file has been externally modified.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/789
My try to fix that needs testing, perhaps it is no good idea.
Git commit 77cbafd60690de3cc7a6d8b33388501dd10257dc by Waqar Ahmed, on behalf of Christoph Cullmann. Committed on 21/02/2025 at 09:08. Pushed by waqar into branch 'master'. don't reset revision on reload but increment it this avoids that we assume we are back to an old revision even if the loaded text is totally different M +2 -2 autotests/src/katedocument_test.cpp M +5 -4 src/buffer/katetextbuffer.cpp M +3 -4 src/buffer/katetexthistory.cpp https://invent.kde.org/frameworks/ktexteditor/-/commit/77cbafd60690de3cc7a6d8b33388501dd10257dc