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)
diff --git a/src/popupwin.c b/src/popupwin.c
index 32f4861..a997cde 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -880,7 +880,9 @@
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)
{