Mercurial > emacs
comparison src/xdisp.c @ 28362:a568b23317fe
(face_before_or_after_it_pos): Pass multibyteness
to DEC_TEXT_POS and INC_TEXT_POS.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 27 Mar 2000 16:04:39 +0000 |
parents | 84be12f331b8 |
children | cad4cc0508a0 |
comparison
equal
deleted
inserted
replaced
28361:eccb57c44da5 | 28362:a568b23317fe |
---|---|
1967 | 1967 |
1968 limit = IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT; | 1968 limit = IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT; |
1969 pos = it->current.pos; | 1969 pos = it->current.pos; |
1970 | 1970 |
1971 if (before_p) | 1971 if (before_p) |
1972 DEC_TEXT_POS (pos); | 1972 DEC_TEXT_POS (pos, it->multibyte_p); |
1973 else | 1973 else |
1974 { | 1974 { |
1975 if (it->what == IT_COMPOSITION) | 1975 if (it->what == IT_COMPOSITION) |
1976 /* For composition, we must check the position after the | 1976 /* For composition, we must check the position after the |
1977 composition. */ | 1977 composition. */ |
1978 pos.charpos += it->cmp_len, pos.bytepos += it->len; | 1978 pos.charpos += it->cmp_len, pos.bytepos += it->len; |
1979 else | 1979 else |
1980 INC_TEXT_POS (pos); | 1980 INC_TEXT_POS (pos, it->multibyte_p); |
1981 } | 1981 } |
1982 /* Determine face for CHARSET_ASCII, or unibyte. */ | 1982 /* Determine face for CHARSET_ASCII, or unibyte. */ |
1983 face_id = face_at_buffer_position (it->w, | 1983 face_id = face_at_buffer_position (it->w, |
1984 CHARPOS (pos), | 1984 CHARPOS (pos), |
1985 it->region_beg_charpos, | 1985 it->region_beg_charpos, |