Mercurial > emacs
comparison src/coding.c @ 42105:09cc243e2d14
(code_convert_region): Update coding->cmp_data->char_offset
before calling decode_coding.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Mon, 17 Dec 2001 15:33:12 +0000 |
| parents | d69c2368e549 |
| children | e85e4d9494b1 |
comparison
equal
deleted
inserted
replaced
| 42104:d69c2368e549 | 42105:09cc243e2d14 |
|---|---|
| 5514 dst = GPT_ADDR + inserted_byte; | 5514 dst = GPT_ADDR + inserted_byte; |
| 5515 | 5515 |
| 5516 if (encodep) | 5516 if (encodep) |
| 5517 result = encode_coding (coding, src, dst, len_byte, 0); | 5517 result = encode_coding (coding, src, dst, len_byte, 0); |
| 5518 else | 5518 else |
| 5519 result = decode_coding (coding, src, dst, len_byte, 0); | 5519 { |
| 5520 if (coding->composing != COMPOSITION_DISABLED) | |
| 5521 coding->cmp_data->char_offset = from + inserted; | |
| 5522 result = decode_coding (coding, src, dst, len_byte, 0); | |
| 5523 } | |
| 5520 | 5524 |
| 5521 /* The buffer memory is now: | 5525 /* The buffer memory is now: |
| 5522 +--------+-------converted-text----+--+------original-text----+---+ | 5526 +--------+-------converted-text----+--+------original-text----+---+ |
| 5523 |<-from->|<-inserted->|<-produced->|--|<-(len_byte-consumed)->|---| | 5527 |<-from->|<-inserted->|<-produced->|--|<-(len_byte-consumed)->|---| |
| 5524 |<---------------------- GAP ----------------------->| */ | 5528 |<---------------------- GAP ----------------------->| */ |
