diff src/quickfix.c @ 11390:73cfcf11d983 v8.0.0580

patch 8.0.0580: cannot set the valid flag with setqflist() commit https://github.com/vim/vim/commit/f1d21c8cc83f40c815b6bf13cd2043152db533ee Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 22 21:20:46 2017 +0200 patch 8.0.0580: cannot set the valid flag with setqflist() Problem: Cannot set the valid flag with setqflist(). Solution: Add the "valid" argument. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/1642)
author Christian Brabandt <cb@256bit.org>
date Sat, 22 Apr 2017 21:30:03 +0200
parents 2ed7a34ecc54
children 30af33f4d353
line wrap: on
line diff
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4779,6 +4779,10 @@ qf_add_entries(
 	    bufnum = 0;
 	}
 
+	/* If the 'valid' field is present it overrules the detected value. */
+	if ((dict_find(d, (char_u *)"valid", -1)) != NULL)
+	    valid = (int)get_dict_number(d, (char_u *)"valid");
+
 	status =  qf_add_entry(qi,
 			       NULL,	    /* dir */
 			       filename,