summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Wooding <kjell@cvs.openbsd.org>2008-06-11 19:35:38 +0000
committerKjell Wooding <kjell@cvs.openbsd.org>2008-06-11 19:35:38 +0000
commit7d92f67902f70f60f0e95d238a88c4bdb20f5f55 (patch)
tree3813ff1a196a5c280e179da7a9f3b58f3107b0fb
parentdab1550c0ec29f3b90ddf995a8c41e0962314953 (diff)
Use getcolpos to compute column. doto does not account for tabs
-rw-r--r--usr.bin/mg/display.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mg/display.c b/usr.bin/mg/display.c
index 5f00d4aa078..fc689786c15 100644
--- a/usr.bin/mg/display.c
+++ b/usr.bin/mg/display.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: display.c,v 1.35 2007/05/28 17:52:17 kjell Exp $ */
+/* $OpenBSD: display.c,v 1.36 2008/06/11 19:35:37 kjell Exp $ */
/* This file is in the public domain. */
@@ -836,7 +836,7 @@ modeline(struct mgwin *wp)
if (linenos) {
len = snprintf(sl, sizeof(sl), "--L%d--C%d", wp->w_dotline,
- wp->w_doto);
+ getcolpos());
if (len < sizeof(sl) && len != -1)
n += vtputs(sl);
}