diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index aeccac2cb16..7bbe9d9ca3e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -20783,7 +20783,14 @@ display_count_lines_visually (struct it *it) | |||
| 20783 | /* Need to disable visual mode temporarily, since otherwise the | 20783 | /* Need to disable visual mode temporarily, since otherwise the |
| 20784 | call to move_it_to will cause infinite recursion. */ | 20784 | call to move_it_to will cause infinite recursion. */ |
| 20785 | specbind (Qdisplay_line_numbers, Qrelative); | 20785 | specbind (Qdisplay_line_numbers, Qrelative); |
| 20786 | move_it_to (&tem_it, to, -1, -1, -1, MOVE_TO_POS); | 20786 | /* Some redisplay optimizations could invoke us very far from |
| 20787 | PT, which will make the caller painfully slow. There should | ||
| 20788 | be no need to go too far beyond the window's bottom, as any | ||
| 20789 | such optimization will fail to show point anyway. */ | ||
| 20790 | move_it_to (&tem_it, to, -1, | ||
| 20791 | tem_it.last_visible_y | ||
| 20792 | + (SCROLL_LIMIT + 10) * FRAME_LINE_HEIGHT (tem_it.f), | ||
| 20793 | -1, MOVE_TO_POS | MOVE_TO_Y); | ||
| 20787 | unbind_to (count, Qnil); | 20794 | unbind_to (count, Qnil); |
| 20788 | return IT_CHARPOS (*it) <= PT ? -tem_it.vpos : tem_it.vpos; | 20795 | return IT_CHARPOS (*it) <= PT ? -tem_it.vpos : tem_it.vpos; |
| 20789 | } | 20796 | } |