Mercurial > emacs
changeset 53587:6feb1f3f7a9b
(Freplace_match): Use make_multibyte_string or
make_unibyte_string according to the buffer multibyteness.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 15 Jan 2004 11:31:37 +0000 |
parents | c242b125b405 |
children | 49076c3bcd5e |
files | src/search.c |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/search.c Wed Jan 14 22:59:33 2004 +0000 +++ b/src/search.c Thu Jan 15 11:31:37 2004 +0000 @@ -2553,8 +2553,16 @@ } if (really_changed) - newtext = make_string (substed, substed_len); - + { + if (buf_multibyte) + { + int nchars = multibyte_chars_in_text (substed, substed_len); + + newtext = make_multibyte_string (substed, nchars, substed_len); + } + else + newtext = make_unibyte_string (substed, substed_len); + } xfree (substed); }