From 87cf661af621f2bcc9314ad7ae2c65df82974f8a Mon Sep 17 00:00:00 2001 From: Scott Prager Date: Thu, 23 Oct 2014 14:18:59 -0400 Subject: vim-patch:7.4.422 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: When using conceal with linebreak some text is not displayed correctly. (GrĂ¼ner Gimpel) Solution: Check for conceal mode when using linebreak. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-422 --- src/nvim/screen.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/nvim/screen.c') diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 4e6123f206..ac726f7988 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -3478,6 +3478,11 @@ win_line ( int i; int saved_nextra = n_extra; + if (is_concealing && vcol_off > 0) { + // there are characters to conceal + tab_len += vcol_off; + } + /* if n_extra > 0, it gives the number of chars to use for * a tab, else we need to calculate the width for a tab */ len = (tab_len * mb_char2len(lcs_tab2)); @@ -3495,6 +3500,12 @@ win_line ( n_extra += mb_char2len(lcs_tab2) - (saved_nextra > 0 ? 1: 0); } p_extra = p_extra_free; + + // n_extra will be increased by FIX_FOX_BOGUSCOLS + // macro below, so need to adjust for that here + if (is_concealing && vcol_off > 0) { + n_extra -= vcol_off; + } } /* Tab alignment should be identical regardless of * 'conceallevel' value. So tab compensates of all -- cgit