| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.422 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.4.422 |
| 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) |
| Files: src/screen.c, src/testdir/test_listlbr.in, |
| src/testdir/test_listlbr.ok |
| |
| |
| |
| |
| |
| *** 4514,4519 **** |
| --- 4514,4524 ---- |
| int i; |
| int saved_nextra = n_extra; |
| |
| + #ifdef FEAT_CONCEAL |
| + if (is_concealing && vcol_off > 0) |
| + /* there are characters to conceal */ |
| + tab_len += vcol_off; |
| + #endif |
| /* 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 */ |
| |
| *** 4539,4544 **** |
| --- 4544,4555 ---- |
| #endif |
| } |
| p_extra = p_extra_free; |
| + #ifdef FEAT_CONCEAL |
| + /* 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; |
| + #endif |
| } |
| #endif |
| #ifdef FEAT_CONCEAL |
| |
| |
| |
| *** 46,51 **** |
| --- 46,61 ---- |
| :redraw! |
| :let line=ScreenChar(winwidth(0)) |
| :call DoRecordScreen() |
| + :let line="_S_\t bla" |
| + :$put =line |
| + :$ |
| + :norm! zt |
| + :let g:test ="Test 5: set linebreak with conceal and set list and tab displayed by different char (line may not be truncated)" |
| + :set cpo&vim list linebreak conceallevel=2 concealcursor=nv listchars=tab:ab |
| + :syn match ConcealVar contained /_/ conceal |
| + :syn match All /.*/ contains=ConcealVar |
| + :let line=ScreenChar(winwidth(0)) |
| + :call DoRecordScreen() |
| :%w! test.out |
| :qa! |
| ENDTEST |
| |
| |
| |
| *** 25,27 **** |
| --- 25,34 ---- |
| +aaaaaaaaaaaaaaaaaa |
| ~ |
| ~ |
| + _S_ bla |
| + |
| + Test 5: set linebreak with conceal and set list and tab displayed by different char (line may not be truncated) |
| + Sabbbbbb bla |
| + ~ |
| + ~ |
| + ~ |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 422, |
| /**/ |
| |
| -- |
| From "know your smileys": |
| ;-0 Can't find shift key |
| ,-9 Kann Umschalttaste nicht finden |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |