aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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 @@
12001-07-23 Gerd Moellmann <gerd@gnu.org> 12001-07-23 Gerd Moellmann <gerd@gnu.org>
2 2
3 * indent.c (current_column): Fix column computation in the
4 presence of display table entries.
5 (current_column_1, Fmove_to_column, compute_motion): Likewise.
6
3 * dispnew.c (adjust_glyph_matrix): In the optimization for 7 * dispnew.c (adjust_glyph_matrix): In the optimization for
4 windows whose height has changed, use the new window height 8 windows whose height has changed, use the new window height
5 to compute which rows to invalidate. 9 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 ()
465 col = 0; 465 col = 0;
466 tab_seen = 1; 466 tab_seen = 1;
467 } 467 }
468 else if (VECTORP (charvec))
469 /* With a display table entry, C is displayed as is, and
470 not displayed as \NNN or as ^N. If C is a single-byte
471 character, it takes one column. If C is multi-byte in
472 an unibyte buffer, it's translated to unibyte, so it
473 also takes one column. */
474 ++col;
468 else 475 else
469 col += (ctl_arrow && c < 0200) ? 2 : 4; 476 col += (ctl_arrow && c < 0200) ? 2 : 4;
470 } 477 }
@@ -607,6 +614,8 @@ current_column_1 ()
607 scan_byte += bytes; 614 scan_byte += bytes;
608 col += width; 615 col += width;
609 } 616 }
617 else if (VECTORP (charvec))
618 ++col;
610 else if (ctl_arrow && (c < 040 || c == 0177)) 619 else if (ctl_arrow && (c < 040 || c == 0177))
611 col += 2; 620 col += 2;
612 else if (c < 040 || c >= 0177) 621 else if (c < 040 || c >= 0177)
@@ -1016,6 +1025,8 @@ The return value is the current column.")
1016 col += tab_width; 1025 col += tab_width;
1017 col = col / tab_width * tab_width; 1026 col = col / tab_width * tab_width;
1018 } 1027 }
1028 else if (VECTORP (charvec))
1029 ++col;
1019 else if (ctl_arrow && (c < 040 || c == 0177)) 1030 else if (ctl_arrow && (c < 040 || c == 0177))
1020 col += 2; 1031 col += 2;
1021 else if (c < 040 || c == 0177) 1032 else if (c < 040 || c == 0177)
@@ -1654,6 +1665,8 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
1654 wide_column_end_hpos = hpos + wide_column; 1665 wide_column_end_hpos = hpos + wide_column;
1655 hpos += width; 1666 hpos += width;
1656 } 1667 }
1668 else if (VECTORP (charvec))
1669 ++hpos;
1657 else 1670 else
1658 hpos += (ctl_arrow && c < 0200) ? 2 : 4; 1671 hpos += (ctl_arrow && c < 0200) ? 2 : 4;
1659 } 1672 }