aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/common.c')
-rw-r--r--src/bin/psql/common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index 511107b575d..2a6be545caf 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.83 2004/03/14 04:25:17 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.84 2004/03/15 10:41:26 ishii Exp $
*/
#include "postgres_fe.h"
#include "common.h"
@@ -410,7 +410,7 @@ ReportSyntaxErrorPosition(const PGresult *result, const char *query)
{
qidx[i] = qoffset;
scridx[i] = scroffset;
- scroffset += 1; /* XXX fix me when we have screen width info */
+ scroffset += PQdsplen(&query[qoffset], pset.encoding);
qoffset += PQmblen(&query[qoffset], pset.encoding);
}
qidx[i] = qoffset;
@@ -526,7 +526,7 @@ ReportSyntaxErrorPosition(const PGresult *result, const char *query)
scroffset = 0;
for (i = 0; i < msg.len; i += PQmblen(&msg.data[i], pset.encoding))
{
- scroffset += 1; /* XXX fix me when we have screen width info */
+ scroffset += PQdsplen(&msg.data[i], pset.encoding);
}
/* Finish and emit the message. */