patch 8.1.0716: get warning message when 'completefunc' returns nothing

Problem:    Get warning message when 'completefunc' returns nothing.
Solution:   Allow for returning v:none to suppress the warning message.
            (Yasuhiro Matsumoto, closes #3789)
diff --git a/src/edit.c b/src/edit.c
index bd840d1..bd6f606 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -150,6 +150,7 @@
 static expand_T	  compl_xp;
 
 static int	  compl_opt_refresh_always = FALSE;
+static int	  compl_opt_suppress_empty = FALSE;
 
 static void ins_ctrl_x(void);
 static int  has_compl_option(int dict_opt);
@@ -4247,8 +4248,12 @@
 	    case VAR_DICT:
 		matchdict = rettv.vval.v_dict;
 		break;
+	    case VAR_SPECIAL:
+		if (rettv.vval.v_number == VVAL_NONE)
+		    compl_opt_suppress_empty = TRUE;
+		// FALLTHROUGH
 	    default:
-		/* TODO: Give error message? */
+		// TODO: Give error message?
 		clear_tv(&rettv);
 		break;
 	}
@@ -5611,6 +5616,7 @@
 	     * completion.
 	     */
 	    compl_opt_refresh_always = FALSE;
+	    compl_opt_suppress_empty = FALSE;
 
 	    if (col < 0)
 		col = curs_col;
@@ -5860,19 +5866,22 @@
 	}
     }
 
-    /* Show a message about what (completion) mode we're in. */
-    showmode();
-    if (!shortmess(SHM_COMPLETIONMENU))
+    // Show a message about what (completion) mode we're in.
+    if (!compl_opt_suppress_empty)
     {
-	if (edit_submode_extra != NULL)
+	showmode();
+	if (!shortmess(SHM_COMPLETIONMENU))
 	{
-	    if (!p_smd)
-		msg_attr(edit_submode_extra,
-			edit_submode_highl < HLF_COUNT
-			? HL_ATTR(edit_submode_highl) : 0);
+	    if (edit_submode_extra != NULL)
+	    {
+		if (!p_smd)
+		    msg_attr(edit_submode_extra,
+			    edit_submode_highl < HLF_COUNT
+			    ? HL_ATTR(edit_submode_highl) : 0);
+	    }
+	    else
+		msg_clr_cmdline();	// necessary for "noshowmode"
 	}
-	else
-	    msg_clr_cmdline();	/* necessary for "noshowmode" */
     }
 
     /* Show the popup menu, unless we got interrupted. */