diff options
| author | Eli Zaretskii | 2017-06-24 12:37:30 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-06-24 12:37:30 +0300 |
| commit | 5b648ac7a2b2e1b77eb59573db59019d5068476c (patch) | |
| tree | ec2201fdc0e7906a49f2b5e61c99a8c850a66775 | |
| parent | 77f8b86e405cc0ff9c49aea5d98097212755b832 (diff) | |
| download | emacs-5b648ac7a2b2e1b77eb59573db59019d5068476c.tar.gz emacs-5b648ac7a2b2e1b77eb59573db59019d5068476c.zip | |
Fix problems with line-number updates in Follow mode
* src/xdisp.c (redisplay_window): If forced window-start requires
to move a window's point, and the window is under relative
line-number display, force another round of redisplay to update
the relative line numbers. This fixes follow-mode "redisplay" of
its window group.
* lisp/frame.el: Add display-line-numbers to the list of variables
that should trigger redisplay of the current buffer.
| -rw-r--r-- | lisp/frame.el | 1 | ||||
| -rw-r--r-- | src/xdisp.c | 12 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lisp/frame.el b/lisp/frame.el index b7a55169281..8f51afa2a9a 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -2434,6 +2434,7 @@ See also `toggle-frame-maximized'." | |||
| 2434 | line-prefix | 2434 | line-prefix |
| 2435 | wrap-prefix | 2435 | wrap-prefix |
| 2436 | truncate-lines | 2436 | truncate-lines |
| 2437 | display-line-numbers | ||
| 2437 | bidi-paragraph-direction | 2438 | bidi-paragraph-direction |
| 2438 | bidi-display-reordering)) | 2439 | bidi-display-reordering)) |
| 2439 | 2440 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 39176e0e675..9b5762550d7 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -16800,10 +16800,14 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) | |||
| 16800 | XBUFFER (w->contents)->text->redisplay = false; | 16800 | XBUFFER (w->contents)->text->redisplay = false; |
| 16801 | safe__call1 (true, Vpre_redisplay_function, Fcons (window, Qnil)); | 16801 | safe__call1 (true, Vpre_redisplay_function, Fcons (window, Qnil)); |
| 16802 | 16802 | ||
| 16803 | if (w->redisplay || XBUFFER (w->contents)->text->redisplay) | 16803 | if (w->redisplay || XBUFFER (w->contents)->text->redisplay |
| 16804 | { | 16804 | || (EQ (Vdisplay_line_numbers, Qrelative) |
| 16805 | /* pre-redisplay-function made changes (e.g. move the region) | 16805 | && row != MATRIX_FIRST_TEXT_ROW (w->desired_matrix))) |
| 16806 | that require another round of redisplay. */ | 16806 | { |
| 16807 | /* Either pre-redisplay-function made changes (e.g. move | ||
| 16808 | the region), or we moved point in a window that is | ||
| 16809 | under display-line-numbers = relative mode. We need | ||
| 16810 | another round of redisplay. */ | ||
| 16807 | clear_glyph_matrix (w->desired_matrix); | 16811 | clear_glyph_matrix (w->desired_matrix); |
| 16808 | if (!try_window (window, startp, 0)) | 16812 | if (!try_window (window, startp, 0)) |
| 16809 | goto need_larger_matrices; | 16813 | goto need_larger_matrices; |