https://bugs.kde.org/show_bug.cgi?id=452853

Christoph Cullmann <cullm...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/fram
                   |                            |eworks/ktexteditor/commit/5
                   |                            |934689df192aa681c6d7856bd6e
                   |                            |aed9f22790a5
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Christoph Cullmann <cullm...@kde.org> ---
Git commit 5934689df192aa681c6d7856bd6eaed9f22790a5 by Christoph Cullmann, on
behalf of Waqar Ahmed.
Committed on 29/03/2023 at 18:10.
Pushed by cullmann into branch 'master'.

Draw caret ourselves

Drawing caret ourselves helps solve a few issues:

1. With custom line height, the caret is no longer smaller than line
2. Cursor direction depends on the block content, not keyboard layout
(bug 172630). Our own cursor will not draw the direction marker and
thus will avoid this issue
3. Make cursor insertion point a few pixels larger vertically (bug 452853).
You can just increase the line height and the caret will be bigger :)
Technically, this is not exactly what is requested, but it works. Making
Cursor visually larger than the line is _possible_ but it means that now
we need to _always_ dirty 3 lines for repaint: current line, line above,
line below which is a lot of uneeded work for such a small thing. So this
will do.

It is also more efficient than the Qt implementation as the work done in
here is a lot less.
Related: bug 172630

M  +24   -1    src/render/katerenderer.cpp

https://invent.kde.org/frameworks/ktexteditor/commit/5934689df192aa681c6d7856bd6eaed9f22790a5

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to