summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-07-23 14:47:42 +0000
committerGerd Moellmann <gerd@gnu.org>2001-07-23 14:47:42 +0000
commitf1004faf26f399e86f2000ef7702f4142de0a64b (patch)
tree415193bb96c91411424a74e0ba2a0729104ce1df /src
parentdd42b31ac43a08a15e5fa6e7ada37dbf8f4a05f9 (diff)
downloademacs-f1004faf26f399e86f2000ef7702f4142de0a64b.tar.gz
(current_column): Fix column computation in the
presence of display table entries. (current_column_1, Fmove_to_column, compute_motion): Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/indent.c13
2 files changed, 17 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 790b79e07cd..b8702273e7f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
2001-07-23 Gerd Moellmann <gerd@gnu.org>
+ * indent.c (current_column): Fix column computation in the
+ presence of display table entries.
+ (current_column_1, Fmove_to_column, compute_motion): Likewise.
+
* dispnew.c (adjust_glyph_matrix): In the optimization for
windows whose height has changed, use the new window height
to compute which rows to invalidate.
diff --git a/src/indent.c b/src/indent.c
index 49768ea5206..2d0ea9fcae9 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -465,6 +465,13 @@ current_column ()
col = 0;
tab_seen = 1;
}
+ else if (VECTORP (charvec))
+ /* With a display table entry, C is displayed as is, and
+ not displayed as \NNN or as ^N. If C is a single-byte
+ character, it takes one column. If C is multi-byte in
+ an unibyte buffer, it's translated to unibyte, so it
+ also takes one column. */
+ ++col;
else
col += (ctl_arrow && c < 0200) ? 2 : 4;
}
@@ -607,6 +614,8 @@ current_column_1 ()
scan_byte += bytes;
col += width;
}
+ else if (VECTORP (charvec))
+ ++col;
else if (ctl_arrow && (c < 040 || c == 0177))
col += 2;
else if (c < 040 || c >= 0177)
@@ -1016,6 +1025,8 @@ The return value is the current column.")
col += tab_width;
col = col / tab_width * tab_width;
}
+ else if (VECTORP (charvec))
+ ++col;
else if (ctl_arrow && (c < 040 || c == 0177))
col += 2;
else if (c < 040 || c == 0177)
@@ -1654,6 +1665,8 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
wide_column_end_hpos = hpos + wide_column;
hpos += width;
}
+ else if (VECTORP (charvec))
+ ++hpos;
else
hpos += (ctl_arrow && c < 0200) ? 2 : 4;
}