diff options
author | Jurica Bradaric <jbradaric@gmail.com> | 2016-02-02 18:40:10 +0100 |
---|---|---|
committer | Jurica Bradaric <jbradaric@gmail.com> | 2016-02-02 18:41:44 +0100 |
commit | cfce719c66b22f26e9f8def87c2b14d339208482 (patch) | |
tree | 8dffeb865f922a5e2459111fa4c1bba9a8a4320a /src/nvim/buffer.c | |
parent | cdc7250cd8ca948d15c158789f621a71d5c7b35d (diff) | |
download | rneovim-cfce719c66b22f26e9f8def87c2b14d339208482.tar.gz rneovim-cfce719c66b22f26e9f8def87c2b14d339208482.tar.bz2 rneovim-cfce719c66b22f26e9f8def87c2b14d339208482.zip |
vim-patch:7.4.805
Problem: The ruler shows "Bot" even when there are only filler lines
missing. (Gary Johnson)
Solution: Use "All" when the first line and one filler line are visible.
https://github.com/vim/vim/commit/29bc9db36e41cb519dca9381cc29a3fc1ff02106
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 34e24712cd..f56c64f109 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -3895,6 +3895,11 @@ void get_rel_pos(win_T *wp, char_u *buf, int buflen) above = wp->w_topline - 1; above += diff_check_fill(wp, wp->w_topline) - wp->w_topfill; + if (wp->w_topline == 1 && wp->w_topfill >= 1) { + // All buffer lines are displayed and there is an indication + // of filler lines, that can be considered seeing all lines. + above = 0; + } below = wp->w_buffer->b_ml.ml_line_count - wp->w_botline + 1; if (below <= 0) STRLCPY(buf, (above == 0 ? _("All") : _("Bot")), buflen); |