diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index faf2271387c..89cd1701961 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1245,7 +1245,7 @@ redisplay_window (window, just_this_one) | |||
| 1245 | struct position pos; | 1245 | struct position pos; |
| 1246 | int opoint = PT; | 1246 | int opoint = PT; |
| 1247 | int tem; | 1247 | int tem; |
| 1248 | int window_needs_modeline; | 1248 | int update_mode_line; |
| 1249 | 1249 | ||
| 1250 | if (FRAME_HEIGHT (f) == 0) abort (); /* Some bug zeros some core */ | 1250 | if (FRAME_HEIGHT (f) == 0) abort (); /* Some bug zeros some core */ |
| 1251 | 1251 | ||
| @@ -1291,12 +1291,15 @@ redisplay_window (window, just_this_one) | |||
| 1291 | } | 1291 | } |
| 1292 | } | 1292 | } |
| 1293 | 1293 | ||
| 1294 | if (update_mode_lines) | 1294 | update_mode_line = (!NILP (w->update_mode_line) || update_mode_lines); |
| 1295 | w->update_mode_line = Qt; | ||
| 1296 | 1295 | ||
| 1297 | /* Otherwise set up data on this window; select its buffer and point value */ | 1296 | /* Otherwise set up data on this window; select its buffer and point value */ |
| 1298 | 1297 | ||
| 1299 | set_buffer_temp (XBUFFER (w->buffer)); | 1298 | if (update_mode_line) |
| 1299 | set_buffer_internal (XBUFFER (w->buffer)); | ||
| 1300 | else | ||
| 1301 | set_buffer_temp (XBUFFER (w->buffer)); | ||
| 1302 | |||
| 1300 | opoint = PT; | 1303 | opoint = PT; |
| 1301 | 1304 | ||
| 1302 | /* Count number of windows showing the selected buffer. | 1305 | /* Count number of windows showing the selected buffer. |
| @@ -1366,7 +1369,14 @@ redisplay_window (window, just_this_one) | |||
| 1366 | { | 1369 | { |
| 1367 | /* Forget any recorded base line for line number display. */ | 1370 | /* Forget any recorded base line for line number display. */ |
| 1368 | w->base_line_number = Qnil; | 1371 | w->base_line_number = Qnil; |
| 1369 | w->update_mode_line = Qt; | 1372 | /* Redisplay the mode line. Select the buffer properly for that. */ |
| 1373 | if (!update_mode_line) | ||
| 1374 | { | ||
| 1375 | set_buffer_temp (old); | ||
| 1376 | set_buffer_internal (XBUFFER (w->buffer)); | ||
| 1377 | update_mode_line = 1; | ||
| 1378 | w->update_mode_line = Qt; | ||
| 1379 | } | ||
| 1370 | w->force_start = Qnil; | 1380 | w->force_start = Qnil; |
| 1371 | XSETFASTINT (w->last_modified, 0); | 1381 | XSETFASTINT (w->last_modified, 0); |
| 1372 | if (startp < BEGV) startp = BEGV; | 1382 | if (startp < BEGV) startp = BEGV; |
| @@ -1504,7 +1514,14 @@ redisplay_window (window, just_this_one) | |||
| 1504 | } | 1514 | } |
| 1505 | 1515 | ||
| 1506 | XSETFASTINT (w->last_modified, 0); | 1516 | XSETFASTINT (w->last_modified, 0); |
| 1507 | w->update_mode_line = Qt; | 1517 | /* Redisplay the mode line. Select the buffer properly for that. */ |
| 1518 | if (!update_mode_line) | ||
| 1519 | { | ||
| 1520 | set_buffer_temp (old); | ||
| 1521 | set_buffer_internal (XBUFFER (w->buffer)); | ||
| 1522 | update_mode_line = 1; | ||
| 1523 | w->update_mode_line = Qt; | ||
| 1524 | } | ||
| 1508 | 1525 | ||
| 1509 | /* Try to scroll by specified few lines */ | 1526 | /* Try to scroll by specified few lines */ |
| 1510 | 1527 | ||
| @@ -1551,7 +1568,7 @@ recenter: | |||
| 1551 | = (startp == BEGV || FETCH_CHAR (startp - 1) == '\n') ? Qt : Qnil; | 1568 | = (startp == BEGV || FETCH_CHAR (startp - 1) == '\n') ? Qt : Qnil; |
| 1552 | 1569 | ||
| 1553 | done: | 1570 | done: |
| 1554 | if ((!NILP (w->update_mode_line) | 1571 | if ((update_mode_line |
| 1555 | /* If window not full width, must redo its mode line | 1572 | /* If window not full width, must redo its mode line |
| 1556 | if the window to its side is being redone */ | 1573 | if the window to its side is being redone */ |
| 1557 | || (!just_this_one && width < FRAME_WIDTH (f) - 1) | 1574 | || (!just_this_one && width < FRAME_WIDTH (f) - 1) |
| @@ -1568,7 +1585,7 @@ done: | |||
| 1568 | } | 1585 | } |
| 1569 | 1586 | ||
| 1570 | /* When we reach a frame's selected window, redo the frame's menu bar. */ | 1587 | /* When we reach a frame's selected window, redo the frame's menu bar. */ |
| 1571 | if (!NILP (w->update_mode_line) | 1588 | if (update_mode_line |
| 1572 | #ifdef USE_X_TOOLKIT | 1589 | #ifdef USE_X_TOOLKIT |
| 1573 | && FRAME_EXTERNAL_MENU_BAR (f) | 1590 | && FRAME_EXTERNAL_MENU_BAR (f) |
| 1574 | #else | 1591 | #else |
| @@ -1613,7 +1630,10 @@ done: | |||
| 1613 | } | 1630 | } |
| 1614 | 1631 | ||
| 1615 | BUF_PT (current_buffer) = opoint; | 1632 | BUF_PT (current_buffer) = opoint; |
| 1616 | set_buffer_temp (old); | 1633 | if (update_mode_line) |
| 1634 | set_buffer_internal (old); | ||
| 1635 | else | ||
| 1636 | set_buffer_temp (old); | ||
| 1617 | BUF_PT (current_buffer) = lpoint; | 1637 | BUF_PT (current_buffer) = lpoint; |
| 1618 | } | 1638 | } |
| 1619 | 1639 | ||