Mercurial > vim
diff src/popupwin.c @ 17314:b60402471f69 v8.1.1656
patch 8.1.1656: popup window width is wrong when using Tabs
commit https://github.com/vim/vim/commit/e089c3fd6937524a14d22baa7562b0820f1343ac
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 9 20:25:25 2019 +0200
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 https://github.com/vim/vim/issues/4637)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 09 Jul 2019 20:30:04 +0200 |
parents | 0dff534a0807 |
children | 8813e1626e0a |
line wrap: on
line diff
--- a/src/popupwin.c +++ b/src/popupwin.c @@ -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) {