patch 9.0.1789: too early declaration of variable in pum_set_selected()

Problem:  too early declaration of variable in pum_set_selected()
Solution: Move declaration to where it is actually used

closes: #12915

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: mathew <glephunter@gmail.com>
diff --git a/src/popupmenu.c b/src/popupmenu.c
index 079fe81..7419806 100644
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -835,7 +835,6 @@
 	{
 	    win_T	*curwin_save = curwin;
 	    tabpage_T   *curtab_save = curtab;
-	    int		res = OK;
 # ifdef FEAT_PROP_POPUP
 	    use_popup_T	use_popup;
 # else
@@ -875,6 +874,8 @@
 # endif
 		    )
 	    {
+		int	res = OK;
+
 		if (!resized
 			&& curbuf->b_nwindows == 1
 			&& curbuf->b_fname == NULL