Patch 8.2.0836
Problem: Not all :cdo output is visible.
Solution: Reset 'shortmess' temporarily. (Yegappan Lakshmanan, closes #6155)
Files: src/ex_cmds2.c, src/testdir/test_cdo.vim
*** ../vim-8.2.0835/src/ex_cmds2.c 2020-04-12 19:37:13.510297280 +0200
--- src/ex_cmds2.c 2020-05-28 21:29:27.083425946 +0200
***************
*** 643,649 ****
--- 643,655 ----
qf_idx = qf_get_cur_idx(eap);
+ // Clear 'shm' to avoid that the file message overwrites
+ // any output from the command.
+ p_shm_save = vim_strsave(p_shm);
+ set_option_value((char_u *)"shm", 0L, (char_u *)"", 0);
ex_cnext(eap);
+ set_option_value((char_u *)"shm", 0L, p_shm_save, 0);
+ vim_free(p_shm_save);
// If jumping to the next quickfix entry fails, quit here
if (qf_get_cur_idx(eap) == qf_idx)
*** ../vim-8.2.0835/src/testdir/test_cdo.vim 2020-04-12 17:52:49.429492390 +0200
--- src/testdir/test_cdo.vim 2020-05-28 21:22:22.648823173 +0200
***************
*** 8,29 ****
call writefile(["Line1", "Line2", "Line3"], 'Xtestfile1')
call writefile(["Line1", "Line2", "Line3"], 'Xtestfile2')
call writefile(["Line1", "Line2", "Line3"], 'Xtestfile3')
! endfunction
" Remove the files used by the tests
! function TearDown()
call delete('Xtestfile1')
call delete('Xtestfile2')
call delete('Xtestfile3')
! endfunction
" Returns the current line in '<filename> <linenum>L <column>C' format
! function GetRuler()
return expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C'
! endfunction
" Tests for the :cdo and :ldo commands
! function XdoTests(cchar)
enew
" Shortcuts for calling the cdo and ldo commands
--- 8,29 ----
call writefile(["Line1", "Line2", "Line3"], 'Xtestfile1')
call writefile(["Line1", "Line2", "Line3"], 'Xtestfile2')
call writefile(["Line1", "Line2", "Line3"], 'Xtestfile3')
! endfunc
" Remove the files used by the tests
! func TearDown()
call delete('Xtestfile1')
call delete('Xtestfile2')
call delete('Xtestfile3')
! endfunc
" Returns the current line in '<filename> <linenum>L <column>C' format
! func GetRuler()
return expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C'
! endfunc
" Tests for the :cdo and :ldo commands
! func XdoTests(cchar)
enew
" Shortcuts for calling the cdo and ldo commands
***************
*** 132,141 ****
exe XdoCmd
call assert_equal(['Xtestfile3 3L 1C'], l)
! endfunction
" Tests for the :cfdo and :lfdo commands
! function XfdoTests(cchar)
enew
" Shortcuts for calling the cfdo and lfdo commands
--- 132,141 ----
exe XdoCmd
call assert_equal(['Xtestfile3 3L 1C'], l)
! endfunc
" Tests for the :cfdo and :lfdo commands
! func XfdoTests(cchar)
enew
" Shortcuts for calling the cfdo and lfdo commands
***************
*** 189,204 ****
exe XfdoCmd
call assert_equal(['Xtestfile2 2L 5C'], l)
! endfunction
" Tests for cdo and cfdo
! function Test_cdo()
call XdoTests('c')
call XfdoTests('c')
! endfunction
" Tests for ldo and lfdo
! function Test_ldo()
call XdoTests('l')
call XfdoTests('l')
! endfunction
--- 189,216 ----
exe XfdoCmd
call assert_equal(['Xtestfile2 2L 5C'], l)
! endfunc
" Tests for cdo and cfdo
! func Test_cdo()
call XdoTests('c')
call XfdoTests('c')
! endfunc
" Tests for ldo and lfdo
! func Test_ldo()
call XdoTests('l')
call XfdoTests('l')
! endfunc
!
! " Test for making 'shm' doesn't interfere with the output.
! func Test_cdo_print()
! enew | only!
! cgetexpr ["Xtestfile1:1:Line1", "Xtestfile2:1:Line1", "Xtestfile3:1:Line1"]
! cdo print
! call assert_equal('Line1', Screenline(&lines))
! call assert_equal('Line1', Screenline(&lines - 3))
! call assert_equal('Line1', Screenline(&lines - 6))
! endfunc
!
! " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.0835/src/version.c 2020-05-28 21:03:49.505375147 +0200
--- src/version.c 2020-05-28 21:22:00.480898797 +0200
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 836,
/**/
--
hundred-and-one symptoms of being an internet addict:
199. You read this entire list of symptoms, looking for something
that doesn't describe you.
/// Bram Moolenaar -- Br...@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 ///