summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2024-07-15 15:33:34 +0900
committerOBATA Akio <obache@wizdas.com>2024-07-16 14:14:46 +0900
commit928fbada0a7fc1f055b05fbdc969aea2f59cb08e (patch)
tree984d1ec73e849f1e99f0646113f504f798dedbda
parent5675b97655963b8a2d424d16b3ea2dacfe40b9bb (diff)
downloadtdebase-928fbada0a7fc1f055b05fbdc969aea2f59cb08e.tar.gz
tdebase-928fbada0a7fc1f055b05fbdc969aea2f59cb08e.zip
konsole: fix column width calculation for string
TQString accessor is 0-based. Signed-off-by: OBATA Akio <obache@wizdas.com>
-rw-r--r--konsole/konsole/konsole_wcwidth.cpp2
1 files changed, 1 insertions, 1 deletions
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;