Bug 343283 - Wrong cursor drawing with positive line spacing
Summary: Wrong cursor drawing with positive line spacing
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 3.0.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-25 15:57 UTC by bwalk
Modified: 2015-12-09 13:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Block cursor with maximum line spacing (3.83 KB, image/png)
2015-01-25 15:58 UTC, bwalk
Details
Fix the wrong sign in the height calculation (809 bytes, patch)
2015-01-25 15:59 UTC, bwalk
Details
Suggested fix leave rendering artifacts (54.82 KB, image/png)
2015-01-25 16:00 UTC, bwalk
Details
Make the cursor height consistent with other terminals (1.42 KB, patch)
2015-01-25 17:51 UTC, bwalk
Details
Comparison of cursor heights for konsole, xterm and st (11.27 KB, image/png)
2015-01-25 17:52 UTC, bwalk
Details
Make the cursor height consistent with other terminals (926 bytes, patch)
2015-01-25 18:32 UTC, bwalk
Details

Note You need to log in before you can comment on or make changes to this bug.
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.