konsole: fix column width calculation for string

TQString accessor is 0-based.

Signed-off-by: OBATA Akio <obache@wizdas.com>
(cherry picked from commit 928fbada0a)
r14.1.x
OBATA Akio 4 months ago committed by Michele Calgaro
parent b97477fa9d
commit 9a7df655b8
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -213,7 +213,7 @@ int string_width( const TQString &txt )
{ {
int w = 0; int w = 0;
for ( uint i = 1; i < txt.length(); ++i ) { for ( uint i = 0; i < txt.length(); ++i ) {
w += konsole_wcwidth(txt[i].unicode()); w += konsole_wcwidth(txt[i].unicode());
} }
return w; return w;

Loading…
Cancel
Save