Bug 343283

Summary: Wrong cursor drawing with positive line spacing
Product: [Applications] konsole Reporter: bwalk
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal CC: nowrep
Priority: NOR    
Version: 3.0.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Block cursor with maximum line spacing
Fix the wrong sign in the height calculation
Suggested fix leave rendering artifacts
Make the cursor height consistent with other terminals
Comparison of cursor heights for konsole, xterm and st
Make the cursor height consistent with other terminals

Description bwalk 2015-01-25 15:57:50 UTC
When increasing the line spacing option, the cursor rectangle gets smaller due to a wrong sign in the height calculation.

Reproducible: Always

Steps to Reproduce:
1. Increase line spacing in the advanced options
2.
3.

Actual Results:  
Cursor height gets less.

Expected Results:  
Cursor height should scale with the total line height.
Comment 1 bwalk 2015-01-25 15:58:52 UTC
Created attachment 90648 [details]
Block cursor with maximum line spacing
Comment 2 bwalk 2015-01-25 15:59:55 UTC
Created attachment 90649 [details]
Fix the wrong sign in the height calculation
Comment 3 bwalk 2015-01-25 16:00:37 UTC
Created attachment 90650 [details]
Suggested fix leave rendering artifacts
Comment 4 bwalk 2015-01-25 17:51:39 UTC
Created attachment 90652 [details]
Make the cursor height consistent with other terminals
Comment 5 bwalk 2015-01-25 17:52:21 UTC
Created attachment 90653 [details]
Comparison of cursor heights for konsole, xterm and st
Comment 6 bwalk 2015-01-25 18:32:28 UTC
Created attachment 90655 [details]
Make the cursor height consistent with other terminals
Comment 7 Kurt Hindenburg 2015-06-07 00:42:53 UTC
Git commit c15a9a9fb951b19f4bebff1d8dd0842db9082c81 by Kurt Hindenburg.
Committed on 07/06/2015 at 00:39.
Pushed by hindenburg into branch 'master'.

Correct cursor rectangle size calculation - noticeable when linespace>1

Thanks bwalk c17n net for bug and patch.

M  +3    -2    src/TerminalDisplay.cpp

http://commits.kde.org/konsole/c15a9a9fb951b19f4bebff1d8dd0842db9082c81
Comment 8 David Rosca 2015-12-09 13:00:41 UTC
Why is the cursor height shifted by one pixel? 

That way, if you have selected text right before the cursor, you will be able to distinguish the highlighted text and the cursor (it won't look as one highlighted line). This can be seen eg. in status line in less.

I guess this is intended exactly for that reason, but I've checked xterm and gnome-terminal and both have the cursor height same as line height.
Also I myself think it looks better if the cursor height is the same as line height.