diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-30 22:00:20 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-30 22:00:20 +0200 |
commit | 5c6dbcb03fa552d7b0e61c8fcf425147eb6bf7d5 (patch) | |
tree | 13f37aa604997567c63b0e5786ee2625282d8d4b /src/option.c | |
parent | 4e83961985abb78757b135f29ac4ffde675247af (diff) | |
download | vim-git-5c6dbcb03fa552d7b0e61c8fcf425147eb6bf7d5.tar.gz |
patch 8.0.1026: GTK on-the-spot input has problemsv8.0.1026
Problem: GTK on-the-spot input has problems. (Gerd Wachsmuth)
Solution: Support over-the-spot. (Yukihiro Nakadaira, Ketn Takata, closes
#1215)
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/option.c b/src/option.c index 5b50913e1..5f8489fdd 100644 --- a/src/option.c +++ b/src/option.c @@ -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) |