]> granicus.if.org Git - vim/commitdiff
patch 8.2.1107: 'imactivatefunc' and 'imstatusfunc' are not used in the GUI v8.2.1107
authorBram Moolenaar <Bram@vim.org>
Wed, 1 Jul 2020 13:12:44 +0000 (15:12 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 1 Jul 2020 13:12:44 +0000 (15:12 +0200)
Problem:    'imactivatefunc' and 'imstatusfunc' are not used in the GUI.
Solution:   Adjust the #ifdefs. (closes #6367)

runtime/doc/options.txt
src/gui_xim.c
src/testdir/test_iminsert.vim
src/version.c

index 4e78a2fa68e76b6f5d702bd08b0083a7bcaff207..bd6cc62d629461e7e3315dd6398a548f3ab8c4fe 100644 (file)
@@ -4133,7 +4133,7 @@ A jump table for the options with a short description can be found at |Q_op|.
                        global
        This option specifies a function that will be called to
        activate or deactivate the Input Method.
-       It is not used in the GUI.
+       It is not used in the MS-Windows GUI version.
        The expression will be evaluated in the |sandbox| when set from a
        modeline, see |sandbox-option|.
 
@@ -4242,7 +4242,7 @@ A jump table for the options with a short description can be found at |Q_op|.
                        global
        This option specifies a function that is called to obtain the status
        of Input Method.  It must return a positive number when IME is active.
-       It is not used in the GUI.
+       It is not used in the MS-Windows GUI version.
 
        Example: >
                function ImStatusFunc()
index b5875ee2cd2dcd29f77344eb4c024444c98c4b70..ee92301337b794464ed7ab1b3651713e9b4fa4f3 100644 (file)
@@ -57,7 +57,7 @@ xim_log(char *s, ...)
 }
 #endif
 
-#ifdef FEAT_GUI
+#if defined(FEAT_GUI_MSWIN)
 # define USE_IMACTIVATEFUNC (!gui.in_use && *p_imaf != NUL)
 # define USE_IMSTATUSFUNC (!gui.in_use && *p_imsf != NUL)
 #else
index 04c8a15995ba7c8f0e1f6b2c8596a0599299ac10..1f194127890d2b329590fae18b91c93bd4eb8347 100644 (file)
@@ -27,7 +27,7 @@ func Test_iminsert2()
   set imactivatefunc=
   set imstatusfunc=
 
-  let expected = has('gui_running') ? 0 : 1
+  let expected = has('gui_win32') ? 0 : 1
   call assert_equal(expected, s:imactivatefunc_called)
   call assert_equal(expected, s:imstatusfunc_called)
 endfunc
@@ -38,10 +38,7 @@ func Test_getimstatus()
   elseif !has('gui_mac')
     CheckFeature xim
   endif
-  if has('gui_running')
-    if !has('win32')
-      throw 'Skipped: running in the GUI, only works on MS-Windows'
-    endif
+  if has('gui_win32')
     set imactivatefunc=
     set imstatusfunc=
   else
index 8f08cc5cf9026d78ec3153fe59eb6bbba8803b68..97c3c4ca621e0f4d4f316745224d0ad2406a8929 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1107,
 /**/
     1106,
 /**/