mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-03 08:30:09 +00:00
(compute_motion): Call strwidth only when necessary.
Set wide_column_end_hpos only when MULTIBYTE_BYTES_WIDTH set nonzero to wide_column.
This commit is contained in:
parent
b745ec7dde
commit
4116deeea8
@ -1104,7 +1104,8 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
|
||||
{
|
||||
unsigned char *ovstr;
|
||||
int ovlen = overlay_strings (pos, win, &ovstr);
|
||||
hpos += (multibyte ? strwidth (ovstr, ovlen) : ovlen);
|
||||
hpos += ((multibyte && ovlen > 0)
|
||||
? strwidth (ovstr, ovlen) : ovlen);
|
||||
}
|
||||
did_motion = 0;
|
||||
|
||||
@ -1450,7 +1451,8 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
|
||||
ptr = BYTE_POS_ADDR (pos_byte);
|
||||
MULTIBYTE_BYTES_WIDTH (ptr, c, dp);
|
||||
pos_byte += bytes;
|
||||
wide_column_end_hpos = hpos + wide_column;
|
||||
if (wide_column)
|
||||
wide_column_end_hpos = hpos + wide_column;
|
||||
hpos += width;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user