diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/indent.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/indent.c b/src/indent.c index bd09008104c..2811fbde7b7 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -1104,7 +1104,8 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1104 | { | 1104 | { |
| 1105 | unsigned char *ovstr; | 1105 | unsigned char *ovstr; |
| 1106 | int ovlen = overlay_strings (pos, win, &ovstr); | 1106 | int ovlen = overlay_strings (pos, win, &ovstr); |
| 1107 | hpos += (multibyte ? strwidth (ovstr, ovlen) : ovlen); | 1107 | hpos += ((multibyte && ovlen > 0) |
| 1108 | ? strwidth (ovstr, ovlen) : ovlen); | ||
| 1108 | } | 1109 | } |
| 1109 | did_motion = 0; | 1110 | did_motion = 0; |
| 1110 | 1111 | ||
| @@ -1450,7 +1451,8 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1450 | ptr = BYTE_POS_ADDR (pos_byte); | 1451 | ptr = BYTE_POS_ADDR (pos_byte); |
| 1451 | MULTIBYTE_BYTES_WIDTH (ptr, c, dp); | 1452 | MULTIBYTE_BYTES_WIDTH (ptr, c, dp); |
| 1452 | pos_byte += bytes; | 1453 | pos_byte += bytes; |
| 1453 | wide_column_end_hpos = hpos + wide_column; | 1454 | if (wide_column) |
| 1455 | wide_column_end_hpos = hpos + wide_column; | ||
| 1454 | hpos += width; | 1456 | hpos += width; |
| 1455 | } | 1457 | } |
| 1456 | else | 1458 | else |