[Konsole-devel] [PATCH] improve On The Spot input style

Toshitaka Fujioka toshitaka at crux.ocn.ne.jp
Wed Nov 26 13:10:31 UTC 2003


On Wednesday 26 November 2003 02:35, Waldo Bastian wrote:
> On Tue November 25 2003 16:48, Toshitaka Fujioka wrote:
> > Hello,
> >
> > The attached a patch, improve on the spot input style like a kate(CVS
> > HEAD). (composing text background color, selection text background color)
>
> Thank you for your patch.
>
> You use  qstrlen( e->text().local8Bit().data() ); is that in order to get
> the number of columns that the text occupies? I think it would be more
> correct to use something based on konsole_wcwidth(), e.g.
>
> int string_width(conqt QString &txt)
> {
>   int w = 0;
>    for(int i=0; i < txt.length(); i++)
>       w += konsole_wcwidth(txt[i].unicode());
>   return w;
> }
>
> and then use string_width(e->text()) ??

Oh !!, I did looking for this, but I could not find this.
Thank you for your advice.

I remade a patch. Please review.

Regards,
Toshitaka


-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdebase-konsole-improve_OnTheSpot-20031126-2.diff
Type: text/x-diff
Size: 9352 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20031126/50212267/attachment.bin>


More information about the konsole-devel mailing list