comparison 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
comparison
equal deleted inserted replaced
30832:64fffffc3295 30833:e3d5781c7ec6
1401 // Count Tabs for what they are worth and compute the length based on 1401 // Count Tabs for what they are worth and compute the length based on
1402 // the maximum width (matters when 'showbreak' is set). 1402 // the maximum width (matters when 'showbreak' is set).
1403 // "margin_width" is added to "len" where it matters. 1403 // "margin_width" is added to "len" where it matters.
1404 if (wp->w_width < maxwidth) 1404 if (wp->w_width < maxwidth)
1405 wp->w_width = maxwidth; 1405 wp->w_width = maxwidth;
1406 len = win_linetabsize(wp, lnum, ml_get_buf(wp->w_buffer, lnum, FALSE), 1406 len = linetabsize(wp, lnum);
1407 (colnr_T)MAXCOL);
1408 wp->w_width = w_width; 1407 wp->w_width = w_width;
1409 1408
1410 if (wp->w_p_wrap) 1409 if (wp->w_p_wrap)
1411 { 1410 {
1412 while (len + margin_width > maxwidth) 1411 while (len + margin_width > maxwidth)