Mercurial > hg > xemacs-beta
comparison src/insdel.c @ 211:78478c60bfcd r20-4b4
Import from CVS: tag r20-4b4
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:05:51 +0200 |
parents | 850242ba4a81 |
children | 262b8bb4a523 |
comparison
equal
deleted
inserted
replaced
210:49f55ca3ba57 | 211:78478c60bfcd |
---|---|
206 #include "frame.h" | 206 #include "frame.h" |
207 #include "extents.h" | 207 #include "extents.h" |
208 #include "insdel.h" | 208 #include "insdel.h" |
209 #include "lstream.h" | 209 #include "lstream.h" |
210 #include "redisplay.h" | 210 #include "redisplay.h" |
211 #include "line-number.h" | |
211 | 212 |
212 /* We write things this way because it's very important the | 213 /* We write things this way because it's very important the |
213 MAX_BYTIND_GAP_SIZE_3 is a multiple of 3. (As it happens, | 214 MAX_BYTIND_GAP_SIZE_3 is a multiple of 3. (As it happens, |
214 65535 is a multiple of 3, but this may not always be the | 215 65535 is a multiple of 3, but this may not always be the |
215 case.) */ | 216 case.) */ |
2436 merge_gap_with_end_gap (buf); | 2437 merge_gap_with_end_gap (buf); |
2437 else | 2438 else |
2438 make_gap (buf, length - BUF_GAP_SIZE (buf)); | 2439 make_gap (buf, length - BUF_GAP_SIZE (buf)); |
2439 } | 2440 } |
2440 | 2441 |
2442 insert_invalidate_line_number_cache (buf, pos, nonreloc + offset, length); | |
2443 | |
2441 record_insert (buf, pos, cclen); | 2444 record_insert (buf, pos, cclen); |
2442 BUF_MODIFF (buf)++; | 2445 BUF_MODIFF (buf)++; |
2443 MARK_BUFFERS_CHANGED; | 2446 MARK_BUFFERS_CHANGED; |
2444 | 2447 |
2445 /* string may have been relocated up to this point */ | 2448 /* string may have been relocated up to this point */ |
2622 } | 2625 } |
2623 | 2626 |
2624 bi_from = bufpos_to_bytind (buf, from); | 2627 bi_from = bufpos_to_bytind (buf, from); |
2625 bi_to = bufpos_to_bytind (buf, to); | 2628 bi_to = bufpos_to_bytind (buf, to); |
2626 bc_numdel = bi_to - bi_from; | 2629 bc_numdel = bi_to - bi_from; |
2630 | |
2631 delete_invalidate_line_number_cache (buf, from, to); | |
2627 | 2632 |
2628 if (to == BUF_Z (buf) && | 2633 if (to == BUF_Z (buf) && |
2629 bi_from > BI_BUF_GPT (buf)) | 2634 bi_from > BI_BUF_GPT (buf)) |
2630 { | 2635 { |
2631 /* avoid moving the gap just to delete from the bottom. */ | 2636 /* avoid moving the gap just to delete from the bottom. */ |