0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.1.1656: popup window width is wrong when using Tabs

Problem:    Popup window width is wrong when using Tabs. (Paul Jolly)
Solution:   Count tabs correctly. (closes #4637)
This commit is contained in:
Bram Moolenaar
2019-07-09 20:25:25 +02:00
parent 3dabd718f4
commit e089c3fd69
4 changed files with 11 additions and 7 deletions

View File

@@ -880,7 +880,9 @@ popup_adjust_position(win_T *wp)
wp->w_width = 1;
for (lnum = wp->w_topline; lnum <= wp->w_buffer->b_ml.ml_line_count; ++lnum)
{
int len = vim_strsize(ml_get_buf(wp->w_buffer, lnum, FALSE));
// count Tabs for what they are worth
int len = win_linetabsize(wp, ml_get_buf(wp->w_buffer, lnum, FALSE),
(colnr_T)MAXCOL);
if (wp->w_p_wrap)
{