Created attachment 184655 [details] Including indents in search results pushes the results too far to the right. *** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports Please remove this comment after reading and before submitting - thanks! *** SUMMARY STEPS TO REPRODUCE Shift+Ctrl+F Enter search term and press enter OBSERVED RESULT The search results include indentation, and hides some of the results too far to the right EXPECTED RESULT Search results should not include indentation: the user is searching for terms, not indents. SOFTWARE/OS VERSIONS Linux/KDE Plasma: 22.04 KDE Plasma Version: 5.27.12 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.13 ADDITIONAL INFORMATION See attached pictures for issue and suggested solution
Created attachment 184656 [details] Better to omit indentation so that all results can be seen
Thanks for the report. I turned this into a wish. It is a good improvement suggestion! Sometimes the indentation can have some value, so a blanket remove all leading white-space might not be desired. The target should definitely be to get the match to always be visible. This needs some tweaking.
as a follow-on to this, someone just asked about tab widths in the search results. https://discuss.kde.org/t/size-of-tab-in-katesearch-and-diff-plugin/40155 not quite the same thing but related in the sense that whitespace handling in the search results might be improved.
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1903
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1906
Git commit 7b3e5ea11a382bc84df9f1070413f432e0918db0 by Christoph Cullmann, on behalf of Kåre Särs. Committed on 04/10/2025 at 19:19. Pushed by cullmann into branch 'master'. S&R: Limit the pre-match part in the results to 25% of view width If the search tool-view is narrow we don't want too much pre-match string as the match might not even be visible. So ensure that at most 25% of the tree-view width is occupied by the pre-match part M +13 -4 addons/search/SearchResultsDelegate.cpp https://invent.kde.org/utilities/kate/-/commit/7b3e5ea11a382bc84df9f1070413f432e0918db0