0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.2000: plugin cannot get the current IME status

Problem:    Plugin cannot get the current IME status.
Solution:   Add the getimstatus() function. (closes #4904)
This commit is contained in:
Bram Moolenaar
2019-09-07 15:08:38 +02:00
parent 1b33bee35e
commit a3a124627d
5 changed files with 52 additions and 1 deletions

View File

@@ -6497,6 +6497,18 @@ im_set_position(int row UNUSED, int col UNUSED)
#endif /* FEAT_XIM */
#if defined(FEAT_EVAL) || defined(PROTO)
/*
* "getimstatus()" function
*/
void
f_getimstatus(typval_T *argvars UNUSED, typval_T *rettv)
{
# if defined(HAVE_INPUT_METHOD)
rettv->vval.v_number = im_get_status();
# endif
}
#endif
/*
* Setup "vcp" for conversion from "from" to "to".