aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 61b685ea5c5..e4a550fed95 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1336,10 +1336,16 @@ header lines. This function also forces recomputation of the
1336menu bar menus and the frame title. */) 1336menu bar menus and the frame title. */)
1337 (Lisp_Object all) 1337 (Lisp_Object all)
1338{ 1338{
1339 if (!NILP (all) || buffer_window_count (current_buffer)) 1339 if (!NILP (all))
1340 { 1340 {
1341 update_mode_lines = 10; 1341 update_mode_lines = 10;
1342 current_buffer->prevent_redisplay_optimizations_p = 1; 1342 /* FIXME: This can't be right. */
1343 current_buffer->prevent_redisplay_optimizations_p = true;
1344 }
1345 else if (buffer_window_count (current_buffer))
1346 {
1347 bset_update_mode_line (current_buffer);
1348 current_buffer->prevent_redisplay_optimizations_p = true;
1343 } 1349 }
1344 return all; 1350 return all;
1345} 1351}
@@ -2476,6 +2482,8 @@ current buffer is cleared. */)
2476 if (narrowed) 2482 if (narrowed)
2477 error ("Changing multibyteness in a narrowed buffer"); 2483 error ("Changing multibyteness in a narrowed buffer");
2478 2484
2485 invalidate_buffer_caches (current_buffer, BEGV, ZV);
2486
2479 if (NILP (flag)) 2487 if (NILP (flag))
2480 { 2488 {
2481 ptrdiff_t pos, stop; 2489 ptrdiff_t pos, stop;
@@ -3895,17 +3903,7 @@ modify_overlay (struct buffer *buf, ptrdiff_t start, ptrdiff_t end)
3895 3903
3896 BUF_COMPUTE_UNCHANGED (buf, start, end); 3904 BUF_COMPUTE_UNCHANGED (buf, start, end);
3897 3905
3898 /* If BUF is visible, consider updating the display if ... */ 3906 bset_redisplay (buf);
3899 if (buffer_window_count (buf) > 0)
3900 {
3901 /* ... it's visible in other window than selected, */
3902 if (buf != XBUFFER (XWINDOW (selected_window)->contents))
3903 windows_or_buffers_changed = 11;
3904 /* ... or if we modify an overlay at the end of the buffer
3905 and so we cannot be sure that window end is still valid. */
3906 else if (end >= ZV && start <= ZV)
3907 windows_or_buffers_changed = 12;
3908 }
3909 3907
3910 ++BUF_OVERLAY_MODIFF (buf); 3908 ++BUF_OVERLAY_MODIFF (buf);
3911} 3909}