From 928fbada0a7fc1f055b05fbdc969aea2f59cb08e Mon Sep 17 00:00:00 2001 From: OBATA Akio Date: Mon, 15 Jul 2024 15:33:34 +0900 Subject: konsole: fix column width calculation for string TQString accessor is 0-based. Signed-off-by: OBATA Akio --- konsole/konsole/konsole_wcwidth.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/konsole/konsole/konsole_wcwidth.cpp b/konsole/konsole/konsole_wcwidth.cpp index 098cd16d4..5159dfca7 100644 --- a/konsole/konsole/konsole_wcwidth.cpp +++ b/konsole/konsole/konsole_wcwidth.cpp @@ -213,7 +213,7 @@ int string_width( const TQString &txt ) { 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()); } return w; -- cgit v1.2.1