<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>172630</bug_id>
          
          <creation_ts>2008-10-12 02:33:30 +0000</creation_ts>
          <short_desc>[BiDi/Unicode] Cursor direction dependent upon last letter typed, not selected keyboard layout</short_desc>
          <delta_ts>2023-04-04 19:34:04 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kate</product>
          <component>kwrite</component>
          <version>unspecified</version>
          <rep_platform>Ubuntu</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dotan Cohen">kde-2011.08</reporter>
          <assigned_to name="KWrite Developers">kwrite-bugs-null</assigned_to>
          <cc>christoph</cc>
    
    <cc>elcuco</cc>
    
    <cc>justin.zobel</cc>
    
    <cc>kde-2011.08</cc>
    
    <cc>zayed.alsaidi</cc>
          
          <cf_commitlink>https://invent.kde.org/frameworks/ktexteditor/commit/9a07647ee120da5b046cc71186590decebc8ded9</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>652914</commentid>
    <comment_count>0</comment_count>
    <who name="Dotan Cohen">kde-2011.08</who>
    <bug_when>2008-10-12 02:33:30 +0000</bug_when>
    <thetext>Version:            (using KDE 4.1.2)
Installed from:    Ubuntu Packages

In Kate on KDE 4.1.2 (I have not had the oppourtunity to test other KDE 4 applications) the cursor direction indicates the direction (RTL / LTR) of the last letter typed, not the selected keyboard layout. For instance, if the user is in English layout and types &quot;Hello&quot; then switches to Hebrew layout, the cursor still shows as LTR direction (lip pointing to the right).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>731702</commentid>
    <comment_count>1</comment_count>
    <who name="Dotan Cohen">kde-2011.08</who>
    <bug_when>2009-03-17 15:09:05 +0000</bug_when>
    <thetext>Confirmed in KDE 4.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1143741</commentid>
    <comment_count>2</comment_count>
    <who name="Dominik Haumann">dhaumann</who>
    <bug_when>2011-07-20 07:00:42 +0000</bug_when>
    <thetext>Is that still the case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1143827</commentid>
    <comment_count>3</comment_count>
    <who name="Dotan Cohen">kde-2011.08</who>
    <bug_when>2011-07-20 13:18:24 +0000</bug_when>
    <thetext>Yes, this is still the case on Kate Version 3.6.5 Using KDE Development Platform 4.6.5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1311874</commentid>
    <comment_count>4</comment_count>
    <who name="Christoph Cullmann">christoph</who>
    <bug_when>2012-11-02 22:46:25 +0000</bug_when>
    <thetext>Seems we have serious problems with this, anybody could help out with some patch?

*** This bug has been marked as a duplicate of bug 165397 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1311952</commentid>
    <comment_count>5</comment_count>
    <who name="Dotan Cohen">kde-2011.08</who>
    <bug_when>2012-11-03 08:50:43 +0000</bug_when>
    <thetext>Thank you Christoph. This is not a dupe of bug 165397. That bug concerns the direction that the cursor moves when pressing the arrow buttons. This bug concerns the appearance of the cursor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1312064</commentid>
    <comment_count>6</comment_count>
    <who name="Dotan Cohen">kde-2011.08</who>
    <bug_when>2012-11-03 15:24:32 +0000</bug_when>
    <thetext>I just confirmed that this bug is still present in KDE 4.9. Considering some of the other RTL issues this is pretty minor so I&apos;m marking it as such.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1314046</commentid>
    <comment_count>7</comment_count>
    <who name="Diego Iastrubni">elcuco</who>
    <bug_when>2012-11-09 21:21:50 +0000</bug_when>
    <thetext>Dotan, 

I would like close this bug as wont-fix. I think that the feature will be implemented not depending on the KB layout, but on the paragraph content. I am not convinced that what you describe is correct (show me another application/OS that does this to test and see by myself).

See also (I am working on that bug right now):
https://bugs.kde.org/show_bug.cgi?id=165397</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1314303</commentid>
    <comment_count>8</comment_count>
    <who name="Dotan Cohen">kde-2011.08</who>
    <bug_when>2012-11-10 18:20:51 +0000</bug_when>
    <thetext>Diego: most applications (such as Firefox) don&apos;t show a different cursor for each language direction. In fact, I would have no problem with that being the case, if Kate were to show the same cursor for each language. But the current implementation in which the wrong cursor is shown is in fact a problem.

I do know that the Mac applications does show a different cursor for RTL and LTR, but I&apos;m not sure about Windows applications and other MS software. LibreOffice does show the different cursors per language directionality, but it is even buggier than Kate&apos;s!

I suggest to &quot;won&apos;t fix&quot; this bug by just showing the same cursor in Kate. Even other KDE applications, such as Konqueror&apos;s address bar, show the same cursor per language directionality.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1389652</commentid>
    <comment_count>9</comment_count>
    <who name="Dominik Haumann">dhaumann</who>
    <bug_when>2013-08-14 10:00:34 +0000</bug_when>
    <thetext>Diego, any further comments on this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1390295</commentid>
    <comment_count>10</comment_count>
    <who name="Zayed Al-Saidi">zayed.alsaidi</who>
    <bug_when>2013-08-16 18:10:07 +0000</bug_when>
    <thetext>For my understanding, the kate should capture the event of changing the keyboard layout then change the cursor maintaining the focus during this process.  While this is a good future, I do not see a great benefit from it.  The only application (to my knowledge) has this future is Firefox but it takes around 3 sec to change the cursor!!

The current implementation of kate (I&apos;m using KDE 4.10.4) will change the cursor to correct one after entering a new letter. This behavior is same as other Qt applications and libreoffice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1472638</commentid>
    <comment_count>11</comment_count>
    <who name="Christoph Cullmann">christoph</who>
    <bug_when>2014-09-23 19:22:45 +0000</bug_when>
    <thetext>Is that now ok the way it is or not? ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1473567</commentid>
    <comment_count>12</comment_count>
    <who name="Dotan Cohen">kde-2011.08</who>
    <bug_when>2014-09-29 09:09:06 +0000</bug_when>
    <thetext>@Christoph: No, the situation today is exactly as it was in the OP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1967948</commentid>
    <comment_count>13</comment_count>
    <who name="Justin Zobel">justin.zobel</who>
    <bug_when>2020-10-25 07:21:52 +0000</bug_when>
    <thetext>Dotan can you please confirm if this is still an issue in Kate from KDE5.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1973079</commentid>
    <comment_count>14</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2020-11-09 04:33:37 +0000</bug_when>
    <thetext>Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED &gt; WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1973226</commentid>
    <comment_count>15</comment_count>
    <who name="Dotan Cohen">kde-2011.08</who>
    <bug_when>2020-11-09 12:21:47 +0000</bug_when>
    <thetext>@Justin Zobel: No, the situation today is exactly as it was in the OP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1973227</commentid>
    <comment_count>16</comment_count>
    <who name="Dotan Cohen">kde-2011.08</who>
    <bug_when>2020-11-09 12:22:26 +0000</bug_when>
    <thetext>@Justin Zobel: No, the situation today is exactly as it was in the OP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2219094</commentid>
    <comment_count>17</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2023-03-29 11:49:17 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/532</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2219202</commentid>
    <comment_count>18</comment_count>
    <who name="Christoph Cullmann">christoph</who>
    <bug_when>2023-03-29 19:42:14 +0000</bug_when>
    <thetext>Git commit 5934689df192aa681c6d7856bd6eaed9f22790a5 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 29/03/2023 at 18:10.
Pushed by cullmann into branch &apos;master&apos;.

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 452853

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

https://invent.kde.org/frameworks/ktexteditor/commit/5934689df192aa681c6d7856bd6eaed9f22790a5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2219222</commentid>
    <comment_count>19</comment_count>
    <who name="Dotan Cohen">kde-2011.08</who>
    <bug_when>2023-03-29 22:46:41 +0000</bug_when>
    <thetext>(In reply to Christoph Cullmann from comment #18)
&gt; Git commit 5934689df192aa681c6d7856bd6eaed9f22790a5 by Christoph Cullmann,
&gt; on behalf of Waqar Ahmed.

Thank you, I look forward to testing this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2220314</commentid>
    <comment_count>20</comment_count>
    <who name="Waqar Ahmed">waqar.17a</who>
    <bug_when>2023-04-04 19:34:04 +0000</bug_when>
    <thetext>Git commit 9a07647ee120da5b046cc71186590decebc8ded9 by Waqar Ahmed.
Committed on 04/04/2023 at 18:59.
Pushed by cullmann into branch &apos;kf5&apos;.

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 452853

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

https://invent.kde.org/frameworks/ktexteditor/commit/9a07647ee120da5b046cc71186590decebc8ded9</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>