summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2024-07-15 15:33:34 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-07-16 17:24:49 +0900
commit9a7df655b8942152114db2b062ac26c727fc8218 (patch)
tree6deadd3ea133ab01af22637707f874f392dfcf14
parentb97477fa9d61bbba668c2c025a32ee554d379d41 (diff)
downloadtdebase-9a7df655b8942152114db2b062ac26c727fc8218.tar.gz
tdebase-9a7df655b8942152114db2b062ac26c727fc8218.zip
konsole: fix column width calculation for string
TQString accessor is 0-based. Signed-off-by: OBATA Akio <obache@wizdas.com> (cherry picked from commit 928fbada0a7fc1f055b05fbdc969aea2f59cb08e)
-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;