diff options
author | Eli Zaretskii <eliz@gnu.org> | 2022-07-23 18:57:06 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-07-23 18:57:06 +0300 |
commit | 57a978fd74454392a041ac65a5abba8d012b88cc (patch) | |
tree | 9eb578b7f0a8af890ff53fc4d491cdfb1def725b /src | |
parent | fc53961c1df8bee07b6a1d461d31f449b66f1d65 (diff) | |
download | emacs-57a978fd74454392a041ac65a5abba8d012b88cc.tar.gz emacs-57a978fd74454392a041ac65a5abba8d012b88cc.tar.bz2 emacs-57a978fd74454392a041ac65a5abba8d012b88cc.zip |
Optimize 'set_vertical_scroll_bar' for long lines
* src/xdisp.c (set_vertical_scroll_bar): Don't bother
being accurate about window_end_pos if long-line shortcuts
are in effect in the current buffer.
Diffstat (limited to 'src')
-rw-r--r-- | src/xdisp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index c507d0caf20..c73958854cd 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18968,8 +18968,9 @@ set_vertical_scroll_bar (struct window *w) ptrdiff_t window_end_pos = w->window_end_pos; /* If w->window_end_pos cannot be trusted, recompute it "the - hard way". */ - if (!w->window_end_valid) + hard way". But don't bother to be too accurate when + long-line shortcuts are in effect. */ + if (!w->window_end_valid && !buf->long_line_optimizations_p) { struct it it; struct text_pos start_pos; |