forked from aniani/vim
patch 8.2.1107: 'imactivatefunc' and 'imstatusfunc' are not used in the GUI
Problem: 'imactivatefunc' and 'imstatusfunc' are not used in the GUI. Solution: Adjust the #ifdefs. (closes #6367)
This commit is contained in:
@@ -4133,7 +4133,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
global
|
global
|
||||||
This option specifies a function that will be called to
|
This option specifies a function that will be called to
|
||||||
activate or deactivate the Input Method.
|
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
|
The expression will be evaluated in the |sandbox| when set from a
|
||||||
modeline, see |sandbox-option|.
|
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
|
global
|
||||||
This option specifies a function that is called to obtain the status
|
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.
|
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: >
|
Example: >
|
||||||
function ImStatusFunc()
|
function ImStatusFunc()
|
||||||
|
@@ -57,7 +57,7 @@ xim_log(char *s, ...)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_GUI
|
#if defined(FEAT_GUI_MSWIN)
|
||||||
# define USE_IMACTIVATEFUNC (!gui.in_use && *p_imaf != NUL)
|
# define USE_IMACTIVATEFUNC (!gui.in_use && *p_imaf != NUL)
|
||||||
# define USE_IMSTATUSFUNC (!gui.in_use && *p_imsf != NUL)
|
# define USE_IMSTATUSFUNC (!gui.in_use && *p_imsf != NUL)
|
||||||
#else
|
#else
|
||||||
|
@@ -27,7 +27,7 @@ func Test_iminsert2()
|
|||||||
set imactivatefunc=
|
set imactivatefunc=
|
||||||
set imstatusfunc=
|
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:imactivatefunc_called)
|
||||||
call assert_equal(expected, s:imstatusfunc_called)
|
call assert_equal(expected, s:imstatusfunc_called)
|
||||||
endfunc
|
endfunc
|
||||||
@@ -38,10 +38,7 @@ func Test_getimstatus()
|
|||||||
elseif !has('gui_mac')
|
elseif !has('gui_mac')
|
||||||
CheckFeature xim
|
CheckFeature xim
|
||||||
endif
|
endif
|
||||||
if has('gui_running')
|
if has('gui_win32')
|
||||||
if !has('win32')
|
|
||||||
throw 'Skipped: running in the GUI, only works on MS-Windows'
|
|
||||||
endif
|
|
||||||
set imactivatefunc=
|
set imactivatefunc=
|
||||||
set imstatusfunc=
|
set imstatusfunc=
|
||||||
else
|
else
|
||||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1107,
|
||||||
/**/
|
/**/
|
||||||
1106,
|
1106,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user