aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/insdel.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/insdel.c b/src/insdel.c
index f0a4dcd784e..05f37d6f647 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -126,7 +126,10 @@ gap_left (ptrdiff_t charpos, ptrdiff_t bytepos, bool newgap)
126 if (i == 0) 126 if (i == 0)
127 break; 127 break;
128 /* If a quit is requested, stop copying now. 128 /* If a quit is requested, stop copying now.
129 Change BYTEPOS to be where we have actually moved the gap to. */ 129 Change BYTEPOS to be where we have actually moved the gap to.
130 Note that this cannot happen when we are called to make the
131 gap larger or smaller, since make_gap_larger and
132 make_gap_smaller prevent QUIT by setting inhibit-quit. */
130 if (QUITP) 133 if (QUITP)
131 { 134 {
132 bytepos = new_s1; 135 bytepos = new_s1;
@@ -179,7 +182,10 @@ gap_right (ptrdiff_t charpos, ptrdiff_t bytepos)
179 if (i == 0) 182 if (i == 0)
180 break; 183 break;
181 /* If a quit is requested, stop copying now. 184 /* If a quit is requested, stop copying now.
182 Change BYTEPOS to be where we have actually moved the gap to. */ 185 Change BYTEPOS to be where we have actually moved the gap to.
186 Note that this cannot happen when we are called to make the
187 gap larger or smaller, since make_gap_larger and
188 make_gap_smaller prevent QUIT by setting inhibit-quit. */
183 if (QUITP) 189 if (QUITP)
184 { 190 {
185 bytepos = new_s1; 191 bytepos = new_s1;
@@ -386,7 +392,9 @@ make_gap_larger (ptrdiff_t nbytes_added)
386 392
387 enlarge_buffer_text (current_buffer, nbytes_added); 393 enlarge_buffer_text (current_buffer, nbytes_added);
388 394
389 /* Prevent quitting in move_gap. */ 395 /* Prevent quitting in gap_left. We cannot allow a QUIT there,
396 because that would leave the buffer text in an inconsistent
397 state, with 2 gap holes instead of just one. */
390 tem = Vinhibit_quit; 398 tem = Vinhibit_quit;
391 Vinhibit_quit = Qt; 399 Vinhibit_quit = Qt;
392 400
@@ -432,7 +440,9 @@ make_gap_smaller (ptrdiff_t nbytes_removed)
432 if (GAP_SIZE - nbytes_removed < GAP_BYTES_MIN) 440 if (GAP_SIZE - nbytes_removed < GAP_BYTES_MIN)
433 nbytes_removed = GAP_SIZE - GAP_BYTES_MIN; 441 nbytes_removed = GAP_SIZE - GAP_BYTES_MIN;
434 442
435 /* Prevent quitting in move_gap. */ 443 /* Prevent quitting in gap_right. We cannot allow a QUIT there,
444 because that would leave the buffer text in an inconsistent
445 state, with 2 gap holes instead of just one. */
436 tem = Vinhibit_quit; 446 tem = Vinhibit_quit;
437 Vinhibit_quit = Qt; 447 Vinhibit_quit = Qt;
438 448