diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile.in | 8 | ||||
| -rw-r--r-- | src/insdel.c | 18 | ||||
| -rw-r--r-- | src/xdisp.c | 12 |
3 files changed, 27 insertions, 11 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index 5f72076dc45..a14d36f3f80 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -214,8 +214,8 @@ LIBX_OTHER=@LIBX_OTHER@ | |||
| 214 | ## configure, which should set it to nil in non-X builds. | 214 | ## configure, which should set it to nil in non-X builds. |
| 215 | LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE) | 215 | LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE) |
| 216 | 216 | ||
| 217 | ## Only used for GNUstep | 217 | ## Used only for GNUstep. |
| 218 | LIBS_GNUSTEP=@LIBS_GNUSTEP@ | 218 | LIBS_GNUSTEP=$(patsubst -specs=%-hardened-ld,,@LIBS_GNUSTEP@) |
| 219 | 219 | ||
| 220 | LIBSOUND= @LIBSOUND@ | 220 | LIBSOUND= @LIBSOUND@ |
| 221 | CFLAGS_SOUND= @CFLAGS_SOUND@ | 221 | CFLAGS_SOUND= @CFLAGS_SOUND@ |
| @@ -270,8 +270,8 @@ MSDOS_X_OBJ = | |||
| 270 | NS_OBJ=@NS_OBJ@ | 270 | NS_OBJ=@NS_OBJ@ |
| 271 | ## nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o ns_fontfile if HAVE_NS. | 271 | ## nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o ns_fontfile if HAVE_NS. |
| 272 | NS_OBJC_OBJ=@NS_OBJC_OBJ@ | 272 | NS_OBJC_OBJ=@NS_OBJC_OBJ@ |
| 273 | ## Only set if NS_IMPL_GNUSTEP. | 273 | ## Used only for GNUstep. |
| 274 | GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@ | 274 | GNU_OBJC_CFLAGS=$(patsubst -specs=%-hardened-cc1,,@GNU_OBJC_CFLAGS@) |
| 275 | ## w32fns.o w32menu.c w32reg.o fringe.o fontset.o w32font.o w32term.o | 275 | ## w32fns.o w32menu.c w32reg.o fringe.o fontset.o w32font.o w32term.o |
| 276 | ## w32xfns.o w32select.o image.o w32uniscribe.o if HAVE_W32, else | 276 | ## w32xfns.o w32select.o image.o w32uniscribe.o if HAVE_W32, else |
| 277 | ## empty. | 277 | ## empty. |
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 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 8f1e98d99ef..840699d00fb 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -825,6 +825,7 @@ static Lisp_Object redisplay_window_1 (Lisp_Object); | |||
| 825 | static bool set_cursor_from_row (struct window *, struct glyph_row *, | 825 | static bool set_cursor_from_row (struct window *, struct glyph_row *, |
| 826 | struct glyph_matrix *, ptrdiff_t, ptrdiff_t, | 826 | struct glyph_matrix *, ptrdiff_t, ptrdiff_t, |
| 827 | int, int); | 827 | int, int); |
| 828 | static bool cursor_row_fully_visible_p (struct window *, bool, bool); | ||
| 828 | static bool update_menu_bar (struct frame *, bool, bool); | 829 | static bool update_menu_bar (struct frame *, bool, bool); |
| 829 | static bool try_window_reusing_current_matrix (struct window *); | 830 | static bool try_window_reusing_current_matrix (struct window *); |
| 830 | static int try_window_id (struct window *); | 831 | static int try_window_id (struct window *); |
| @@ -13881,11 +13882,16 @@ redisplay_internal (void) | |||
| 13881 | eassert (this_line_vpos == it.vpos); | 13882 | eassert (this_line_vpos == it.vpos); |
| 13882 | eassert (this_line_y == it.current_y); | 13883 | eassert (this_line_y == it.current_y); |
| 13883 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); | 13884 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); |
| 13885 | if (cursor_row_fully_visible_p (w, false, true)) | ||
| 13886 | { | ||
| 13884 | #ifdef GLYPH_DEBUG | 13887 | #ifdef GLYPH_DEBUG |
| 13885 | *w->desired_matrix->method = 0; | 13888 | *w->desired_matrix->method = 0; |
| 13886 | debug_method_add (w, "optimization 3"); | 13889 | debug_method_add (w, "optimization 3"); |
| 13887 | #endif | 13890 | #endif |
| 13888 | goto update; | 13891 | goto update; |
| 13892 | } | ||
| 13893 | else | ||
| 13894 | goto cancel; | ||
| 13889 | } | 13895 | } |
| 13890 | else | 13896 | else |
| 13891 | goto cancel; | 13897 | goto cancel; |