diff options
Diffstat (limited to 'src/insdel.c')
| -rw-r--r-- | src/insdel.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/insdel.c b/src/insdel.c index 905249d6714..c2a3cd42821 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -84,21 +84,14 @@ check_markers (void) | |||
| 84 | 84 | ||
| 85 | #endif /* MARKER_DEBUG */ | 85 | #endif /* MARKER_DEBUG */ |
| 86 | 86 | ||
| 87 | /* Move gap to position CHARPOS. | ||
| 88 | Note that this can quit! */ | ||
| 89 | |||
| 90 | void | ||
| 91 | move_gap (ptrdiff_t charpos) | ||
| 92 | { | ||
| 93 | move_gap_both (charpos, CHAR_TO_BYTE (charpos)); | ||
| 94 | } | ||
| 95 | |||
| 96 | /* Move gap to byte position BYTEPOS, which is also char position CHARPOS. | 87 | /* Move gap to byte position BYTEPOS, which is also char position CHARPOS. |
| 97 | Note that this can quit! */ | 88 | Note that this can quit! */ |
| 98 | 89 | ||
| 99 | void | 90 | void |
| 100 | move_gap_both (ptrdiff_t charpos, ptrdiff_t bytepos) | 91 | move_gap_both (ptrdiff_t charpos, ptrdiff_t bytepos) |
| 101 | { | 92 | { |
| 93 | eassert (charpos == BYTE_TO_CHAR (bytepos) | ||
| 94 | && bytepos == CHAR_TO_BYTE (charpos)); | ||
| 102 | if (bytepos < GPT_BYTE) | 95 | if (bytepos < GPT_BYTE) |
| 103 | gap_left (charpos, bytepos, 0); | 96 | gap_left (charpos, bytepos, 0); |
| 104 | else if (bytepos > GPT_BYTE) | 97 | else if (bytepos > GPT_BYTE) |