1
0
forked from aniani/vim

patch 8.0.1026: GTK on-the-spot input has problems

Problem:    GTK on-the-spot input has problems. (Gerd Wachsmuth)
Solution:   Support over-the-spot. (Yukihiro Nakadaira, Ketn Takata, closes
            #1215)
This commit is contained in:
Bram Moolenaar
2017-08-30 22:00:20 +02:00
parent 4e83961985
commit 5c6dbcb03f
12 changed files with 303 additions and 118 deletions

View File

@@ -1606,13 +1606,22 @@ static struct vimoption options[] =
#endif
SCRIPTID_INIT},
{"imstatusfunc","imsf",P_STRING|P_VI_DEF|P_SECURE,
# if defined(FEAT_EVAL) && defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
#if defined(FEAT_EVAL) && defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
(char_u *)&p_imsf, PV_NONE,
{(char_u *)"", (char_u *)NULL}
# else
#else
(char_u *)NULL, PV_NONE,
{(char_u *)NULL, (char_u *)0L}
# endif
#endif
SCRIPTID_INIT},
{"imstyle", "imst", P_NUM|P_VI_DEF|P_SECURE,
#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
(char_u *)&p_imst, PV_NONE,
{(char_u *)IM_OVER_THE_SPOT, (char_u *)0L}
#else
(char_u *)NULL, PV_NONE,
{(char_u *)0L, (char_u *)0L}
#endif
SCRIPTID_INIT},
{"include", "inc", P_STRING|P_ALLOCED|P_VI_DEF,
#ifdef FEAT_FIND_ID
@@ -8990,6 +8999,15 @@ set_num_option(
#endif
}
#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
/* 'imstyle' */
else if (pp == &p_imst)
{
if (p_imst != IM_ON_THE_SPOT && p_imst != IM_OVER_THE_SPOT)
errmsg = e_invarg;
}
#endif
else if (pp == &p_window)
{
if (p_window < 1)