Patch 8.0.0126
Problem: Display problem with 'foldcolumn' and a wide character.
(esiegerman)
Solution: Don't use "extra" but an allocated buffer. (Christian Brabandt,
closes #1310)
Files: src/screen.c, src/testdir/Make_all.mak, src/Makefile,
src/testdir/test_display.vim
*** ../vim-8.0.0125/src/screen.c 2016-11-17 19:32:17.897024245 +0100
--- src/screen.c 2016-12-09 19:25:26.466245177 +0100
***************
*** 3649,3661 ****
draw_state = WL_FOLD;
if (fdc > 0)
{
! /* Draw the 'foldcolumn'. */
! fill_foldcolumn(extra, wp, FALSE, lnum);
! n_extra = fdc;
! p_extra = extra;
! p_extra[n_extra] = NUL;
! c_extra = NUL;
! char_attr = hl_attr(HLF_FC);
}
}
#endif
--- 3649,3667 ----
draw_state = WL_FOLD;
if (fdc > 0)
{
! /* Draw the 'foldcolumn'. Allocate a buffer, "extra" may
! * already be in used. */
! p_extra_free = alloc(12 + 1);
!
! if (p_extra_free != NULL)
! {
! fill_foldcolumn(p_extra_free, wp, FALSE, lnum);
! n_extra = fdc;
! p_extra_free[n_extra] = NUL;
! p_extra = p_extra_free;
! c_extra = NUL;
! char_attr = hl_attr(HLF_FC);
! }
}
}
#endif
*** ../vim-8.0.0125/src/testdir/Make_all.mak 2016-12-01 18:47:06.595684409
+0100
--- src/testdir/Make_all.mak 2016-12-09 19:14:49.522481488 +0100
***************
*** 148,153 ****
--- 148,154 ----
test_cscope.res \
test_diffmode.res \
test_digraph.res \
+ test_display.res \
test_farsi.res \
test_fnameescape.res \
test_gf.res \
*** ../vim-8.0.0125/src/Makefile 2016-12-01 21:46:09.860509973 +0100
--- src/Makefile 2016-12-09 19:16:20.617879697 +0100
***************
*** 2085,2090 ****
--- 2091,2097 ----
test_delete \
test_diffmode \
test_digraph \
+ test_display \
test_ex_undo \
test_execute_func \
test_expand \
*** ../vim-8.0.0125/src/testdir/test_display.vim 2016-12-09
19:27:38.997358330 +0100
--- src/testdir/test_display.vim 2016-12-09 19:14:49.522481488 +0100
***************
*** 0 ****
--- 1,37 ----
+ " Test for displaying stuff
+ if !has('gui_running') && has('unix')
+ set term=ansi
+ endif
+
+ function! s:screenline(lnum, nr) abort
+ let line = []
+ for j in range(a:nr)
+ for c in range(1, winwidth(0))
+ call add(line, nr2char(screenchar(a:lnum+j, c)))
+ endfor
+ call add(line, "\n")
+ endfor
+ return join(line, '')
+ endfunction
+
+ function! Test_display_foldcolumn()
+ new
+ vnew
+ vert resize 25
+
+ 1put='e more noise blah blah‚ more stuff here'
+
+ let expect = "e more noise blah blah<82\n> more stuff here \n"
+
+ call cursor(2, 1)
+ norm! zt
+ redraw!
+ call assert_equal(expect, s:screenline(1,2))
+ set fdc=2
+ redraw!
+ let expect = " e more noise blah blah<\n 82> more stuff here \n"
+ call assert_equal(expect, s:screenline(1,2))
+
+ quit!
+ quit!
+ endfunction
*** ../vim-8.0.0125/src/version.c 2016-12-09 18:42:16.415395684 +0100
--- src/version.c 2016-12-09 19:25:37.470171530 +0100
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 126,
/**/
--
>From "know your smileys":
8<}} Glasses, big nose, beard
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.