]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1789: too early declaration of variable in pum_set_selected() v9.0.1789
authormathew <glephunter@gmail.com>
Sat, 26 Aug 2023 16:11:02 +0000 (18:11 +0200)
committerChristian Brabandt <cb@256bit.org>
Sat, 26 Aug 2023 16:11:31 +0000 (18:11 +0200)
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>
src/popupmenu.c
src/version.c

index 079fe81e8cc00739583572f61e1224d3f0d47a6c..741980660fcc1e084a8ee8ff9cbd8c8a4c3db4b3 100644 (file)
@@ -835,7 +835,6 @@ pum_set_selected(int n, int repeat UNUSED)
        {
            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 @@ pum_set_selected(int n, int repeat UNUSED)
 # endif
                    )
            {
+               int     res = OK;
+
                if (!resized
                        && curbuf->b_nwindows == 1
                        && curbuf->b_fname == NULL
index d6e259c0140c7f05e3d00fafc75bfa95ecfd1f51..eb7d598eebb50a3a1a03f5162c960704ce9a89a5 100644 (file)
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1789,
 /**/
     1788,
 /**/