Comment 0 for bug 314016

Revision history for this message
Diego Iastrubni (elcuco) wrote :

Binary package hint: kate-kde4

This is a request for a backport from trunk to 4.1.3 in ubuntu. The original bug is https://bugs.kde.org/show_bug.cgi?id=178594

"Back in March someone (who shall remain un-named) added to kate a new function which would calculate the "best direction" 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&r2=788729 The last month I found a really ugly "bug" in it.

Imagine this php code:

function foo() {
  $a = "שלום עולם";
  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 "feature" useless - much more people will be using kate to code then to write "plain text". 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."

A visual display of how code looks can be seen here:
http://elcuco.blogli.co.il/files/2009/01/kate-hebrew-code-broken.png

I am requesting a backport of changeset 905112 to the currently available packages in 8.10. See the patch here: http://websvn.kde.org/?view=rev&revision=905112 (it will apply to the branch as well).