Bug 485885

Summary: Completion text in popup does not vertically align with the input
Product: [Applications] kate Reporter: ratijas <me>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Kate
Sublime Text

Description ratijas 2024-04-21 10:22:08 UTC
Created attachment 168739 [details]
Kate

SUMMARY
When completing some text one might expect that completion suggestions are neatly aligned with the prefix input, like other text editing applications / IDEs do it.

STEPS TO REPRODUCE
1. Open any text file
2. type in few characters
3. Hit Ctrl+Space if a popup hasn't already shown up

OBSERVED RESULT
Input text is here, suggestions are somewhere there far to the right.

EXPECTED RESULT
Suggestions are vertically aligned right below the input text. This requires shifting the completion popup to the left to account for padding/margin and an icon width.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Kernel Version: 6.8.7-arch1-1 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Sublime Text, IntelliJ platform are some examples of products which got this attentions to the details right.
Comment 1 ratijas 2024-04-21 10:23:38 UTC
Created attachment 168740 [details]
Sublime Text
Comment 2 Bug Janitor Service 2024-11-15 07:36:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/757
Comment 3 Christoph Cullmann 2024-11-16 14:36:15 UTC
Git commit c4c79a4a8e8390893f23d74d8d7d27836a614bb8 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 16/11/2024 at 13:52.
Pushed by cullmann into branch 'master'.

Align completion with the word being completed

M  +10   -0    src/completion/katecompletiontree.cpp
M  +2    -0    src/completion/katecompletiontree.h
M  +4    -1    src/completion/katecompletionwidget.cpp

https://invent.kde.org/frameworks/ktexteditor/-/commit/c4c79a4a8e8390893f23d74d8d7d27836a614bb8