diff --git a/src/feature.h b/src/feature.h
index 8afa98797..3bca4fb54 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -569,9 +569,6 @@
# define ESC_CHG_TO_ENG_MODE /* if defined, when ESC pressed,
* turn to english mode
*/
-# if defined(FEAT_XIM) && !defined(LINT)
- Error: You should select only ONE of XIM and HANGUL INPUT
-# endif
#endif
#if defined(FEAT_HANGULIN) || defined(FEAT_XIM)
/* # define X_LOCALE */ /* for OS with incomplete locale
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 4940b87e2..e34e9001a 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -1160,6 +1160,9 @@ key_press_event(GtkWidget *widget UNUSED,
#endif
#ifdef FEAT_HANGULIN
+#if defined(FEAT_XIM)
+ if (p_imdisable)
+#endif
if (key_sym == GDK_space && (state & GDK_SHIFT_MASK))
{
hangul_input_state_toggle();
diff --git a/src/gui_x11.c b/src/gui_x11.c
index 3555ffae0..155f0cca5 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -864,6 +864,9 @@ gui_x11_key_hit_cb(
#endif
#ifdef FEAT_HANGULIN
+#if defined(FEAT_XIM)
+ if (p_imdisable)
+#endif
if ((key_sym == XK_space) && (ev_press->state & ShiftMask))
{
hangul_input_state_toggle();
2019-08-27 오전 4:25에 Bram Moolenaar 이(가) 쓴 글:
>
> Namsh wrote:
>
>> 2019-08-25 오후 2:25에 Hongyi Zhao 이(가) 쓴 글:
>>> Hi,
>>>
>>> I try to build vim with the --enable-hangulinput and --enable-xim
>>> confilct at the same time, but failed with error:
>>>
>>> -------------------------
>>> vim.h:1585:63: error: called object 'size_t' is not a function or
>>> function pointer
>>> #define STRNCMP(d, s, n) strncmp((char *)(d), (char *)(s), (size_t)(n))
>>> ^
>>> ex_docmd.c:8459:6: note: in expansion of macro 'STRNCMP'
>>> if (STRNCMP(arg, "FALLBACK ", 9) == 0)
>>> ^~~~~~~
>>> In file included from /usr/include/wchar.h:887:0,
>>> from spell.h:250,
>>> from vim.h:2110,
>>> from ex_docmd.c:14:
>>> /usr/include/x86_64-linux-gnu/bits/wchar2.h:507:20: note: declared here
>>> __fortify_function size_t
>>> ^~~~~~
>>> Makefile:3059: recipe for target 'objects/ex_docmd.o' failed
>>> make[1]: *** [objects/ex_docmd.o] Error 1
>>> make[1]: Leaving directory '/home/werner/software/editor/vim/vim.git/src'
>>> Makefile:26: recipe for target 'first' failed
>>> make: *** [first] Error 2
>>> -----------------------------
>>>
>>> Are these two options conflict?
>>
>> Regardless of compilation error, the hangulin feature is for
>> environments where XIM is not available.
>>
>> You can find next line with ':help hangul'.
>> ./configure --with-x --enable-multibyte --enable-hangulinput \
>> --disable-xim
>
> That's a bit of a disadvantage when someone tries to build a version
> that works with multiple languages. Can we make this a runtime choice
> instead of a compile time choice? No idea how much work that would be.
Here is a minimal patch (no documentation, no indenting to minimize).
If vim supports both xim and hangulinpt and user set 'imdisable',
hangulinput feature is selected.
I tested this patch by adding '--enable-xim --enable-hangulinput' to my
default configure option.
$ auto/configure --enable-perlinterp=no --disable-gpm
--enable-python3interp=dynamic --enable-tclinterp=no --enable-cscope
--with-features=huge --enable-terminal --enable-multibyte --enable-xim
--enable-hangulinput --prefix=/opt/local --with-x --enable-gui=gtk3
While testing this patch, I noticed one glitch.
Though I set 'imdisable' in the vimrc and I confirmed the setting with
':set imdisable?', when I typed S-Space for the first time, vim connects
to XIM. After that, go to english input mode and type S-Space again, vim
enters to hangulinput mode. My system environement may cause this glitch??
Thanks,
namsh
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/47ca13c8-ba84-1334-dea3-b55adceb1029%40gmail.com.
No comments:
Post a Comment