Mercurial > emacs
changeset 38530:90ab35fe206c
(current_column): Fix column computation in the
presence of display table entries.
(current_column_1, Fmove_to_column, compute_motion): Likewise.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 23 Jul 2001 14:47:23 +0000 |
parents | 0e8aa50a6ac0 |
children | 393c8e5512ee |
files | src/indent.c |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/indent.c Mon Jul 23 11:33:58 2001 +0000 +++ b/src/indent.c Mon Jul 23 14:47:23 2001 +0000 @@ -465,6 +465,13 @@ 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 @@ 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 @@ 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 @@ wide_column_end_hpos = hpos + wide_column; hpos += width; } + else if (VECTORP (charvec)) + ++hpos; else hpos += (ctl_arrow && c < 0200) ? 2 : 4; }