Hi, On Wed, Aug 1, 2018 at 4:36 PM, Nobuhiro Takasaki <[email protected]> wrote: > I forgot the importaht thing. This is reproduced. > > compiler! msvc > function! QFMakeConv() > let q = getqflist() > call filter(q, "v:val.text !~ 'Microsoft'") > call filter(q, "v:val.text !~ 'Copyright'") > call filter(q, "v:val.text !~ 'NMAKE'") > call filter(q, "v:val.text !~ '^$'") > call setqflist(q, 'r') > endfunction > autocmd! QuickFixCmdPost make call QFMakeConv() > > In call setqflist([], 'r'), the empty list does not include a line break. > In my vimrc, I erased the line breaks with call filter(q, "v:val.text !~ > '^$'). > ":make" reads a file containing one or more newlines. > That is, if "qflist" is truly zero row, "E42" is output. > This behavior has been added from patch 8.1.0141. >
Thanks for sending the steps to reproduce the problem. Your patch does fix this problem. I am attaching a patch that adds a function to check whether the quickfix list is empty or not. This can be used to simplify the code. I have also added a test to check for this. - Yegappan -- -- 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.
qfempty.diff
Description: Binary data
