<?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>178594</bug_id>
          
          <creation_ts>2008-12-23 20:00:36 +0000</creation_ts>
          <short_desc>Kate is useless for editing code which contains hebrew/arabic</short_desc>
          <delta_ts>2009-04-24 19:24:12 +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>general</component>
          <version>unspecified</version>
          <rep_platform>Compiled Sources</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Diego Iastrubni">elcuco</reporter>
          <assigned_to name="KWrite Developers">kwrite-bugs-null</assigned_to>
          <cc>finex</cc>
    
    <cc>nadavkav</cc>
          
          <cf_commitlink></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>685969</commentid>
    <comment_count>0</comment_count>
    <who name="Diego Iastrubni">elcuco</who>
    <bug_when>2008-12-23 20:00:36 +0000</bug_when>
    <thetext>Version:            (using Devel)
Installed from:    Compiled sources

Back in March someone (who shall remain un-named) added to kate a new function which would calculate the &quot;best 
direction&quot; of a paragraph by counting the LTR and RTL chars in that line. 
That is r788729: 
http://websvn.kde.org/trunk/KDE/kdelibs/kate/render/katerenderer.cpp?r1=772931&amp;r2=788729

The last month I found a really ugly &quot;bug&quot; in it. Imagine this php code:

function foo()
{
   $a = &quot;שלום עולם&quot;;
   return $a;
}

Now paste it into kate and see what happens. This get funkier when the hebrew 
is inside lists or hashes. IMHO, this renders this &quot;feature&quot; useless - much 
more people will be using kate to code then to write &quot;plain text&quot;.

My proposal is detecting the paragraph direction using 
QString::isRightToLeft() and in 4.3 also provide a manual method for setting 
the direction of the paragraph. 

IMHO, this renders kate unusable for editing code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686296</commentid>
    <comment_count>1</comment_count>
    <who name="FiNeX">finex</who>
    <bug_when>2008-12-24 12:43:53 +0000</bug_when>
    <thetext>When kate highlight the block code inside { }, the second line disappear :-(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>693290</commentid>
    <comment_count>2</comment_count>
    <who name="Diego Iastrubni">elcuco</who>
    <bug_when>2009-01-03 18:58:44 +0000</bug_when>
    <thetext>SVN commit 905112 by iastrubni:

Fix for bug 178594, now katepart determinates the direction of each 
paragraph (line) according to the first strong character. 

Since we are no longer using counting chars and not using 
QString::isRightToLeft() (we use a new internal implementation, based
of QString::updateProperties()) we might have a small speed improve: 
now determinating the paragraph direction is done (on average) in O(1) 
instead of O(n) - where n is the length of the string.

BUG: 178594



 M  +15 -12    katerenderer.cpp  
 M  +8 -4      katerenderer.h  


WebSVN link: http://websvn.kde.org/?view=rev&amp;revision=905112
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>719523</commentid>
    <comment_count>3</comment_count>
    <who name="Diego Iastrubni">elcuco</who>
    <bug_when>2009-02-19 22:20:59 +0000</bug_when>
    <thetext>Just as a reference... I asked Ubuntu to backport this issue to KDE 4.1.X. And they did :)

https://bugs.launchpad.net/ubuntu/+source/kde4libs/+bug/314016</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>746807</commentid>
    <comment_count>4</comment_count>
    <who name="Diego Iastrubni">elcuco</who>
    <bug_when>2009-04-24 19:24:12 +0000</bug_when>
    <thetext>*** Bug 175931 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>