Mercurial > vim
diff src/popupwin.c @ 30833:e3d5781c7ec6 v9.0.0751
patch 9.0.0751: 'scrolloff' does not work well with 'smoothscroll'
Commit: https://github.com/vim/vim/commit/c9121f798f49fa71e814912cb186d89c164090c3
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Oct 14 20:09:04 2022 +0100
patch 9.0.0751: 'scrolloff' does not work well with 'smoothscroll'
Problem: 'scrolloff' does not work well with 'smoothscroll'.
Solution: Make positioning the cursor a bit better. Rename functions.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 14 Oct 2022 21:15:03 +0200 |
parents | d914a3812d5b |
children | b6bef244837e |
line wrap: on
line diff
--- a/src/popupwin.c +++ b/src/popupwin.c @@ -1403,8 +1403,7 @@ popup_adjust_position(win_T *wp) // "margin_width" is added to "len" where it matters. if (wp->w_width < maxwidth) wp->w_width = maxwidth; - len = win_linetabsize(wp, lnum, ml_get_buf(wp->w_buffer, lnum, FALSE), - (colnr_T)MAXCOL); + len = linetabsize(wp, lnum); wp->w_width = w_width; if (wp->w_p_wrap)