forked from aniani/vim
patch 8.1.2327: cannot build with Hangul input
Problem: Cannot build with Hangul input. Solution: Remove Hangul input support.
This commit is contained in:
2
Filelist
2
Filelist
@@ -401,7 +401,6 @@ SRC_UNIX = \
|
|||||||
src/gui_xmebwp.h \
|
src/gui_xmebwp.h \
|
||||||
src/gui_x11.c \
|
src/gui_x11.c \
|
||||||
src/gui_x11_pm.h \
|
src/gui_x11_pm.h \
|
||||||
src/hangulin.c \
|
|
||||||
src/if_xcmdsrv.c \
|
src/if_xcmdsrv.c \
|
||||||
src/link.sh \
|
src/link.sh \
|
||||||
src/installman.sh \
|
src/installman.sh \
|
||||||
@@ -421,7 +420,6 @@ SRC_UNIX = \
|
|||||||
src/proto/gui_motif.pro \
|
src/proto/gui_motif.pro \
|
||||||
src/proto/gui_xmdlg.pro \
|
src/proto/gui_xmdlg.pro \
|
||||||
src/proto/gui_x11.pro \
|
src/proto/gui_x11.pro \
|
||||||
src/proto/hangulin.pro \
|
|
||||||
src/proto/if_xcmdsrv.pro \
|
src/proto/if_xcmdsrv.pro \
|
||||||
src/proto/os_unix.pro \
|
src/proto/os_unix.pro \
|
||||||
src/proto/pty.pro \
|
src/proto/pty.pro \
|
||||||
|
@@ -1,112 +1,17 @@
|
|||||||
*hangulin.txt* For Vim version 8.1. Last change: 2015 Nov 24
|
*hangulin.txt* For Vim version 8.1. Last change: 2019 Nov 21
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
|
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
|
||||||
|
|
||||||
|
*hangul*
|
||||||
|
Vim had built-in support for hangul, the Korean language, for users without
|
||||||
|
XIM (X Input Method). Since it didn't work well and was not maintained it was
|
||||||
|
removed in Vim 8.1.2327.
|
||||||
|
|
||||||
Introduction *hangul*
|
If you want this hangul input mehod you can go back to Vim 8.1.2326 or
|
||||||
------------
|
earlier. If you think this code is still useful and want to maintain it, make
|
||||||
It is to input hangul, the Korean language, with Vim GUI version.
|
a patch to add it back. However, making it work with UTF-8 encoding would be
|
||||||
If you have a XIM program, you can use another |+xim| feature.
|
best.
|
||||||
Basically, it is for anybody who has no XIM program.
|
|
||||||
|
|
||||||
Compile
|
|
||||||
-------
|
|
||||||
Next is a basic option. You can add any other configure option. >
|
|
||||||
|
|
||||||
./configure --with-x --enable-multibyte --enable-hangulinput \
|
|
||||||
--disable-xim
|
|
||||||
|
|
||||||
And you should check feature.h. If |+hangul_input| feature is enabled
|
|
||||||
by configure, you can select more options such as keyboard type, 2 bulsik
|
|
||||||
or 3 bulsik. You can find keywords like next in there. >
|
|
||||||
|
|
||||||
#define HANGUL_DEFAULT_KEYBOARD 2
|
|
||||||
#define ESC_CHG_TO_ENG_MODE
|
|
||||||
/* #define X_LOCALE */
|
|
||||||
|
|
||||||
Environment variables
|
|
||||||
---------------------
|
|
||||||
You should set LANG variable to Korean locale such as ko, ko_KR.eucKR
|
|
||||||
or ko_KR.UTF-8.
|
|
||||||
If you set LC_ALL variable, it should be set to Korean locale also.
|
|
||||||
|
|
||||||
Vim resource
|
|
||||||
------------
|
|
||||||
You may want to set 'encoding' and 'fileencodings'.
|
|
||||||
Next are examples: >
|
|
||||||
|
|
||||||
:set encoding=euc-kr
|
|
||||||
:set encoding=utf-8
|
|
||||||
:set fileencodings=ucs-bom,utf-8,cp949,euc-kr,latin1
|
|
||||||
|
|
||||||
Keyboard
|
|
||||||
--------
|
|
||||||
You can change keyboard type (2 bulsik or 3 bulsik) using VIM_KEYBOARD
|
|
||||||
or HANGUL_KEYBOARD_TYPE environment variables. For sh, just do (2 bulsik): >
|
|
||||||
|
|
||||||
export VIM_KEYBOARD="2"
|
|
||||||
or >
|
|
||||||
export HANGUL_KEYBOARD_TYPE="2"
|
|
||||||
|
|
||||||
If both are set, VIM_KEYBOARD has higher priority.
|
|
||||||
|
|
||||||
Hangul Fonts
|
|
||||||
------------
|
|
||||||
If you use GTK version of gvim, you should set 'guifont' and 'guifontwide'.
|
|
||||||
For example: >
|
|
||||||
set guifont=Courier\ 12
|
|
||||||
set guifontwide=NanumGothicCoding\ 12
|
|
||||||
|
|
||||||
If you use Motif or Athena version of gvim, you should set 'guifontset' in
|
|
||||||
your vimrc. You can set fontset in the .Xdefaults file.
|
|
||||||
|
|
||||||
$HOME/.gvimrc: >
|
|
||||||
set guifontset=english_font,hangul_font
|
|
||||||
|
|
||||||
$HOME/.Xdefaults: >
|
|
||||||
Vim.font: english_font
|
|
||||||
|
|
||||||
! Nexts are for hangul menu with Athena
|
|
||||||
*international: True
|
|
||||||
Vim*fontSet: english_font,hangul_font
|
|
||||||
|
|
||||||
! Nexts are for hangul menu with Motif
|
|
||||||
*international: True
|
|
||||||
Vim*fontList: english_font;hangul_font:
|
|
||||||
|
|
||||||
attention! the , (comma) or ; (semicolon)
|
|
||||||
|
|
||||||
And there should be no ':set guifont'. If it exists, then gvim ignores
|
|
||||||
':set guifontset'. It means Vim runs without fontset supporting.
|
|
||||||
So, you can see only English. Hangul does not be correctly displayed.
|
|
||||||
|
|
||||||
After "fontset" feature is enabled, Vim does not allow using english
|
|
||||||
font only in "font" setting for syntax.
|
|
||||||
For example, if you use >
|
|
||||||
:set guifontset=eng_font,your_font
|
|
||||||
in your .gvimrc, then you should do for syntax >
|
|
||||||
:hi Comment guifg=Cyan font=another_eng_font,another_your_font
|
|
||||||
If you just do >
|
|
||||||
:hi Comment font=another_eng_font
|
|
||||||
then you can see a error message. Be careful!
|
|
||||||
|
|
||||||
hangul_font width should be twice than english_font width.
|
|
||||||
|
|
||||||
Unsupported Feature
|
|
||||||
-------------------
|
|
||||||
We don't support Johab font.
|
|
||||||
We don't support Hanja input.
|
|
||||||
And We don't have any plan to support them.
|
|
||||||
|
|
||||||
If you really need such features, you can use console version of Vim with a
|
|
||||||
capable terminal emulator.
|
|
||||||
|
|
||||||
Bug or Comment
|
|
||||||
--------------
|
|
||||||
Send comments, patches and suggestions to:
|
|
||||||
|
|
||||||
SungHyun Nam <goweol@gmail.com>
|
|
||||||
Chi-Deok Hwang <...>
|
|
||||||
|
|
||||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||||
|
19
src/Makefile
19
src/Makefile
@@ -504,11 +504,8 @@ CClink = $(CC)
|
|||||||
# XIM - X Input Method. Special character input support for X11 (Chinese,
|
# XIM - X Input Method. Special character input support for X11 (Chinese,
|
||||||
# Japanese, special symbols, etc). Also needed for dead-key support.
|
# Japanese, special symbols, etc). Also needed for dead-key support.
|
||||||
# When omitted it's automatically enabled for the X-windows GUI.
|
# When omitted it's automatically enabled for the X-windows GUI.
|
||||||
# HANGUL - Input Hangul (Korean) language using internal routines.
|
|
||||||
# Uncomment one of these when you want to input a multibyte language.
|
|
||||||
#CONF_OPT_INPUT = --enable-xim
|
#CONF_OPT_INPUT = --enable-xim
|
||||||
#CONF_OPT_INPUT = --disable-xim
|
#CONF_OPT_INPUT = --disable-xim
|
||||||
#CONF_OPT_INPUT = --enable-hangulinput
|
|
||||||
|
|
||||||
# FONTSET - X fontset support for output of languages with many characters.
|
# FONTSET - X fontset support for output of languages with many characters.
|
||||||
# Uncomment this when you want to output a multibyte language.
|
# Uncomment this when you want to output a multibyte language.
|
||||||
@@ -1488,7 +1485,7 @@ LINT_CFLAGS = -DLINT -I. $(PRE_DEFS) $(POST_DEFS) \
|
|||||||
$(PYTHON3_CFLAGS) $(TCL_CFLAGS) $(VTERM_CFLAGS) \
|
$(PYTHON3_CFLAGS) $(TCL_CFLAGS) $(VTERM_CFLAGS) \
|
||||||
-Dinline= -D__extension__= -Dalloca=alloca
|
-Dinline= -D__extension__= -Dalloca=alloca
|
||||||
|
|
||||||
LINT_EXTRA = -DHANGUL_INPUT -D"__attribute__(x)="
|
LINT_EXTRA = -D"__attribute__(x)="
|
||||||
|
|
||||||
DEPEND_CFLAGS = -DPROTO -DDEPEND -DFEAT_GUI $(LINT_CFLAGS)
|
DEPEND_CFLAGS = -DPROTO -DDEPEND -DFEAT_GUI $(LINT_CFLAGS)
|
||||||
|
|
||||||
@@ -1676,7 +1673,6 @@ SRC = $(BASIC_SRC) \
|
|||||||
$(GUI_SRC) \
|
$(GUI_SRC) \
|
||||||
$(TERM_SRC) \
|
$(TERM_SRC) \
|
||||||
$(XDIFF_SRC) \
|
$(XDIFF_SRC) \
|
||||||
$(HANGULIN_SRC) \
|
|
||||||
$(LUA_SRC) \
|
$(LUA_SRC) \
|
||||||
$(MZSCHEME_SRC) \
|
$(MZSCHEME_SRC) \
|
||||||
$(PERL_SRC) \
|
$(PERL_SRC) \
|
||||||
@@ -1684,7 +1680,7 @@ SRC = $(BASIC_SRC) \
|
|||||||
$(TCL_SRC) \
|
$(TCL_SRC) \
|
||||||
$(RUBY_SRC)
|
$(RUBY_SRC)
|
||||||
|
|
||||||
EXTRA_SRC = hangulin.c if_lua.c if_mzsch.c auto/if_perl.c if_perlsfio.c \
|
EXTRA_SRC = if_lua.c if_mzsch.c auto/if_perl.c if_perlsfio.c \
|
||||||
if_python.c if_python3.c if_tcl.c if_ruby.c \
|
if_python.c if_python3.c if_tcl.c if_ruby.c \
|
||||||
gui_beval.c netbeans.c channel.c \
|
gui_beval.c netbeans.c channel.c \
|
||||||
$(GRESOURCE_SRC)
|
$(GRESOURCE_SRC)
|
||||||
@@ -1710,7 +1706,7 @@ ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(UNITTEST_SRC) \
|
|||||||
# Which files to check with lint. Select one of these three lines. ALL_SRC
|
# Which files to check with lint. Select one of these three lines. ALL_SRC
|
||||||
# checks more, but may not work well for checking a GUI that wasn't configured.
|
# checks more, but may not work well for checking a GUI that wasn't configured.
|
||||||
# The perl sources also don't work well with lint.
|
# The perl sources also don't work well with lint.
|
||||||
LINT_SRC = $(BASIC_SRC) $(GUI_SRC) $(HANGULIN_SRC) \
|
LINT_SRC = $(BASIC_SRC) $(GUI_SRC) \
|
||||||
$(PYTHON_SRC) $(PYTHON3_SRC) $(TCL_SRC) \
|
$(PYTHON_SRC) $(PYTHON3_SRC) $(TCL_SRC) \
|
||||||
$(NETBEANS_SRC) $(CHANNEL_SRC) $(TERM_SRC)
|
$(NETBEANS_SRC) $(CHANNEL_SRC) $(TERM_SRC)
|
||||||
#LINT_SRC = $(SRC)
|
#LINT_SRC = $(SRC)
|
||||||
@@ -1756,7 +1752,6 @@ OBJ_COMMON = \
|
|||||||
objects/hardcopy.o \
|
objects/hardcopy.o \
|
||||||
objects/hashtab.o \
|
objects/hashtab.o \
|
||||||
objects/highlight.o \
|
objects/highlight.o \
|
||||||
$(HANGULIN_OBJ) \
|
|
||||||
objects/if_cscope.o \
|
objects/if_cscope.o \
|
||||||
objects/if_xcmdsrv.o \
|
objects/if_xcmdsrv.o \
|
||||||
objects/indent.o \
|
objects/indent.o \
|
||||||
@@ -1909,7 +1904,6 @@ PRO_AUTO = \
|
|||||||
getchar.pro \
|
getchar.pro \
|
||||||
hardcopy.pro \
|
hardcopy.pro \
|
||||||
hashtab.pro \
|
hashtab.pro \
|
||||||
hangulin.pro \
|
|
||||||
highlight.pro \
|
highlight.pro \
|
||||||
if_cscope.pro \
|
if_cscope.pro \
|
||||||
if_lua.pro \
|
if_lua.pro \
|
||||||
@@ -3220,9 +3214,6 @@ objects/gui_photon.o: gui_photon.c
|
|||||||
objects/gui_mac.o: gui_mac.c
|
objects/gui_mac.o: gui_mac.c
|
||||||
$(CCC) -o $@ gui_mac.c
|
$(CCC) -o $@ gui_mac.c
|
||||||
|
|
||||||
objects/hangulin.o: hangulin.c
|
|
||||||
$(CCC) -o $@ hangulin.c
|
|
||||||
|
|
||||||
objects/highlight.o: highlight.c
|
objects/highlight.o: highlight.c
|
||||||
$(CCC) -o $@ highlight.c
|
$(CCC) -o $@ highlight.c
|
||||||
|
|
||||||
@@ -4066,10 +4057,6 @@ objects/message_test.o: message_test.c main.c vim.h protodef.h auto/config.h \
|
|||||||
feature.h os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h \
|
feature.h os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h \
|
||||||
option.h beval.h proto/gui_beval.pro structs.h regexp.h gui.h alloc.h \
|
option.h beval.h proto/gui_beval.pro structs.h regexp.h gui.h alloc.h \
|
||||||
ex_cmds.h spell.h proto.h globals.h message.c
|
ex_cmds.h spell.h proto.h globals.h message.c
|
||||||
objects/hangulin.o: hangulin.c vim.h protodef.h auto/config.h feature.h os_unix.h \
|
|
||||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
|
|
||||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
|
||||||
proto.h globals.h
|
|
||||||
objects/if_lua.o: if_lua.c vim.h protodef.h auto/config.h feature.h os_unix.h \
|
objects/if_lua.o: if_lua.c vim.h protodef.h auto/config.h feature.h os_unix.h \
|
||||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
|
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
|
||||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||||
|
34
src/auto/configure
vendored
34
src/auto/configure
vendored
@@ -629,8 +629,6 @@ MSGFMT
|
|||||||
INSTALL_TOOL_LANGS
|
INSTALL_TOOL_LANGS
|
||||||
INSTALL_LANGS
|
INSTALL_LANGS
|
||||||
TAGPRG
|
TAGPRG
|
||||||
HANGULIN_OBJ
|
|
||||||
HANGULIN_SRC
|
|
||||||
GUI_X_LIBS
|
GUI_X_LIBS
|
||||||
GUITYPE
|
GUITYPE
|
||||||
GUI_LIB_LOC
|
GUI_LIB_LOC
|
||||||
@@ -820,7 +818,6 @@ enable_multibyte
|
|||||||
enable_rightleft
|
enable_rightleft
|
||||||
enable_arabic
|
enable_arabic
|
||||||
enable_farsi
|
enable_farsi
|
||||||
enable_hangulinput
|
|
||||||
enable_xim
|
enable_xim
|
||||||
enable_fontset
|
enable_fontset
|
||||||
with_x
|
with_x
|
||||||
@@ -1502,7 +1499,6 @@ Optional Features:
|
|||||||
--disable-rightleft Do not include Right-to-Left language support.
|
--disable-rightleft Do not include Right-to-Left language support.
|
||||||
--disable-arabic Do not include Arabic language support.
|
--disable-arabic Do not include Arabic language support.
|
||||||
--disable-farsi Deprecated.
|
--disable-farsi Deprecated.
|
||||||
--enable-hangulinput Include Hangul input support.
|
|
||||||
--enable-xim Include XIM input support.
|
--enable-xim Include XIM input support.
|
||||||
--enable-fontset Include X fontset output support.
|
--enable-fontset Include X fontset output support.
|
||||||
--enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon
|
--enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon
|
||||||
@@ -7992,18 +7988,6 @@ if test "${enable_farsi+set}" = set; then :
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-hangulinput argument" >&5
|
|
||||||
$as_echo_n "checking --enable-hangulinput argument... " >&6; }
|
|
||||||
# Check whether --enable-hangulinput was given.
|
|
||||||
if test "${enable_hangulinput+set}" = set; then :
|
|
||||||
enableval=$enable_hangulinput;
|
|
||||||
else
|
|
||||||
enable_hangulinput="no"
|
|
||||||
fi
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_hangulinput" >&5
|
|
||||||
$as_echo "$enable_hangulinput" >&6; }
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
|
||||||
$as_echo_n "checking --enable-xim argument... " >&6; }
|
$as_echo_n "checking --enable-xim argument... " >&6; }
|
||||||
# Check whether --enable-xim was given.
|
# Check whether --enable-xim was given.
|
||||||
@@ -10496,8 +10480,7 @@ rm -f conftest*
|
|||||||
fi
|
fi
|
||||||
CPPFLAGS=$cppflags_save
|
CPPFLAGS=$cppflags_save
|
||||||
|
|
||||||
if test "$enable_xim" = "auto" -a "$enable_hangulinput" != "yes" \
|
if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
|
||||||
-a "x$GUITYPE" != "xNONE" ; then
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
|
||||||
$as_echo "X GUI selected; xim has been enabled" >&6; }
|
$as_echo "X GUI selected; xim has been enabled" >&6; }
|
||||||
enable_xim="yes"
|
enable_xim="yes"
|
||||||
@@ -10674,21 +10657,6 @@ $as_echo "no - using X11" >&6; }
|
|||||||
$as_echo "no" >&6; };;
|
$as_echo "no" >&6; };;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test "$enable_hangulinput" = "yes"; then
|
|
||||||
if test "x$GUITYPE" = "xNONE"; then
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI selected; hangul input has been disabled" >&5
|
|
||||||
$as_echo "no GUI selected; hangul input has been disabled" >&6; }
|
|
||||||
enable_hangulinput=no
|
|
||||||
else
|
|
||||||
$as_echo "#define FEAT_HANGULIN 1" >>confdefs.h
|
|
||||||
|
|
||||||
HANGULIN_SRC=hangulin.c
|
|
||||||
|
|
||||||
HANGULIN_OBJ=objects/hangulin.o
|
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
|
||||||
$as_echo_n "checking whether toupper is broken... " >&6; }
|
$as_echo_n "checking whether toupper is broken... " >&6; }
|
||||||
|
@@ -408,9 +408,6 @@
|
|||||||
/* Define if you want to include XIM support. */
|
/* Define if you want to include XIM support. */
|
||||||
#undef FEAT_XIM
|
#undef FEAT_XIM
|
||||||
|
|
||||||
/* Define if you want to include Hangul input support. */
|
|
||||||
#undef FEAT_HANGULIN
|
|
||||||
|
|
||||||
/* Define if you use GTK and want GNOME support. */
|
/* Define if you use GTK and want GNOME support. */
|
||||||
#undef FEAT_GUI_GNOME
|
#undef FEAT_GUI_GNOME
|
||||||
|
|
||||||
|
@@ -78,9 +78,6 @@ TCL_PRO = @TCL_PRO@
|
|||||||
TCL_CFLAGS = @TCL_CFLAGS@
|
TCL_CFLAGS = @TCL_CFLAGS@
|
||||||
TCL_LIBS = @TCL_LIBS@
|
TCL_LIBS = @TCL_LIBS@
|
||||||
|
|
||||||
HANGULIN_SRC = @HANGULIN_SRC@
|
|
||||||
HANGULIN_OBJ = @HANGULIN_OBJ@
|
|
||||||
|
|
||||||
NETBEANS_SRC = @NETBEANS_SRC@
|
NETBEANS_SRC = @NETBEANS_SRC@
|
||||||
NETBEANS_OBJ = @NETBEANS_OBJ@
|
NETBEANS_OBJ = @NETBEANS_OBJ@
|
||||||
CHANNEL_SRC = @CHANNEL_SRC@
|
CHANNEL_SRC = @CHANNEL_SRC@
|
||||||
|
@@ -2161,12 +2161,6 @@ dnl Farsi language support has been removed, ignore --disable-farsi
|
|||||||
AC_ARG_ENABLE(farsi,
|
AC_ARG_ENABLE(farsi,
|
||||||
[ --disable-farsi Deprecated.],,)
|
[ --disable-farsi Deprecated.],,)
|
||||||
|
|
||||||
AC_MSG_CHECKING(--enable-hangulinput argument)
|
|
||||||
AC_ARG_ENABLE(hangulinput,
|
|
||||||
[ --enable-hangulinput Include Hangul input support.], ,
|
|
||||||
[enable_hangulinput="no"])
|
|
||||||
AC_MSG_RESULT($enable_hangulinput)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(--enable-xim argument)
|
AC_MSG_CHECKING(--enable-xim argument)
|
||||||
AC_ARG_ENABLE(xim,
|
AC_ARG_ENABLE(xim,
|
||||||
[ --enable-xim Include XIM input support.],
|
[ --enable-xim Include XIM input support.],
|
||||||
@@ -3058,9 +3052,8 @@ if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_
|
|||||||
fi
|
fi
|
||||||
CPPFLAGS=$cppflags_save
|
CPPFLAGS=$cppflags_save
|
||||||
|
|
||||||
dnl automatically enable XIM when hangul input isn't enabled
|
dnl automatically enable XIM in the GUI
|
||||||
if test "$enable_xim" = "auto" -a "$enable_hangulinput" != "yes" \
|
if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
|
||||||
-a "x$GUITYPE" != "xNONE" ; then
|
|
||||||
AC_MSG_RESULT(X GUI selected; xim has been enabled)
|
AC_MSG_RESULT(X GUI selected; xim has been enabled)
|
||||||
enable_xim="yes"
|
enable_xim="yes"
|
||||||
fi
|
fi
|
||||||
@@ -3178,20 +3171,6 @@ case `uname` in
|
|||||||
*) CYGWIN=no; AC_MSG_RESULT(no);;
|
*) CYGWIN=no; AC_MSG_RESULT(no);;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
dnl Only really enable hangul input when GUI and XFONTSET are available
|
|
||||||
if test "$enable_hangulinput" = "yes"; then
|
|
||||||
if test "x$GUITYPE" = "xNONE"; then
|
|
||||||
AC_MSG_RESULT(no GUI selected; hangul input has been disabled)
|
|
||||||
enable_hangulinput=no
|
|
||||||
else
|
|
||||||
AC_DEFINE(FEAT_HANGULIN)
|
|
||||||
HANGULIN_SRC=hangulin.c
|
|
||||||
AC_SUBST(HANGULIN_SRC)
|
|
||||||
HANGULIN_OBJ=objects/hangulin.o
|
|
||||||
AC_SUBST(HANGULIN_OBJ)
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Checks for libraries and include files.
|
dnl Checks for libraries and include files.
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether toupper is broken], [vim_cv_toupper_broken],
|
AC_CACHE_CHECK([whether toupper is broken], [vim_cv_toupper_broken],
|
||||||
|
10
src/edit.c
10
src/edit.c
@@ -4118,16 +4118,6 @@ ins_esc(
|
|||||||
#ifdef FEAT_SPELL
|
#ifdef FEAT_SPELL
|
||||||
check_spell_redraw();
|
check_spell_redraw();
|
||||||
#endif
|
#endif
|
||||||
#if defined(FEAT_HANGULIN)
|
|
||||||
# if defined(ESC_CHG_TO_ENG_MODE)
|
|
||||||
hangul_input_state_set(0);
|
|
||||||
# endif
|
|
||||||
if (composing_hangul)
|
|
||||||
{
|
|
||||||
push_raw_key(composing_hangul_buffer, 2);
|
|
||||||
composing_hangul = 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
temp = curwin->w_cursor.col;
|
temp = curwin->w_cursor.col;
|
||||||
if (disabled_redraw)
|
if (disabled_redraw)
|
||||||
|
@@ -3401,9 +3401,6 @@ f_has(typval_T *argvars, typval_T *rettv)
|
|||||||
#ifdef FEAT_GUI_MSWIN
|
#ifdef FEAT_GUI_MSWIN
|
||||||
"gui_win32",
|
"gui_win32",
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_HANGULIN
|
|
||||||
"hangul_input",
|
|
||||||
#endif
|
|
||||||
#if defined(HAVE_ICONV_H) && defined(USE_ICONV)
|
#if defined(HAVE_ICONV_H) && defined(USE_ICONV)
|
||||||
"iconv",
|
"iconv",
|
||||||
#endif
|
#endif
|
||||||
|
@@ -528,9 +528,7 @@
|
|||||||
/*
|
/*
|
||||||
* +xim X Input Method. For entering special languages like
|
* +xim X Input Method. For entering special languages like
|
||||||
* chinese and Japanese.
|
* chinese and Japanese.
|
||||||
* +hangul_input Internal Hangul input method. Must be included
|
* this is for Unix and VMS only.
|
||||||
* through configure: "--enable-hangulin"
|
|
||||||
* Both are for Unix and VMS only.
|
|
||||||
*/
|
*/
|
||||||
#ifndef FEAT_XIM
|
#ifndef FEAT_XIM
|
||||||
/* #define FEAT_XIM */
|
/* #define FEAT_XIM */
|
||||||
@@ -540,18 +538,9 @@
|
|||||||
# define USE_XIM 1 /* needed for GTK include files */
|
# define USE_XIM 1 /* needed for GTK include files */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_HANGULIN
|
#if defined(FEAT_XIM)
|
||||||
# define HANGUL_DEFAULT_KEYBOARD 2 /* 2 or 3 bulsik keyboard */
|
// # define X_LOCALE // for OS with incomplete locale
|
||||||
# define ESC_CHG_TO_ENG_MODE /* if defined, when ESC pressed,
|
// support, like old linux versions.
|
||||||
* 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
|
|
||||||
support, like old linux versions. */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -965,11 +965,6 @@ EXTERN guicolor_T xim_bg_color INIT(= INVALCOLOR);
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_HANGULIN
|
|
||||||
EXTERN int composing_hangul INIT(= 0);
|
|
||||||
EXTERN char_u composing_hangul_buffer[5];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "State" is the main state of Vim.
|
* "State" is the main state of Vim.
|
||||||
* There are other variables that modify the state:
|
* There are other variables that modify the state:
|
||||||
|
58
src/gui.c
58
src/gui.c
@@ -1169,13 +1169,13 @@ gui_update_cursor(
|
|||||||
if (id > 0)
|
if (id > 0)
|
||||||
{
|
{
|
||||||
cattr = syn_id2colors(id, &cfg, &cbg);
|
cattr = syn_id2colors(id, &cfg, &cbg);
|
||||||
#if defined(HAVE_INPUT_METHOD) || defined(FEAT_HANGULIN)
|
#if defined(HAVE_INPUT_METHOD)
|
||||||
{
|
{
|
||||||
static int iid;
|
static int iid;
|
||||||
guicolor_T fg, bg;
|
guicolor_T fg, bg;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
# if defined(FEAT_GUI_GTK) && defined(FEAT_XIM) && !defined(FEAT_HANGULIN)
|
# if defined(FEAT_GUI_GTK) && defined(FEAT_XIM)
|
||||||
preedit_get_status()
|
preedit_get_status()
|
||||||
# else
|
# else
|
||||||
im_get_status()
|
im_get_status()
|
||||||
@@ -1260,35 +1260,14 @@ gui_update_cursor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
old_hl_mask = gui.highlight_mask;
|
old_hl_mask = gui.highlight_mask;
|
||||||
if (shape->shape == SHAPE_BLOCK
|
if (shape->shape == SHAPE_BLOCK)
|
||||||
#ifdef FEAT_HANGULIN
|
|
||||||
|| composing_hangul
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Draw the text character with the cursor colors. Use the
|
* Draw the text character with the cursor colors. Use the
|
||||||
* character attributes plus the cursor attributes.
|
* character attributes plus the cursor attributes.
|
||||||
*/
|
*/
|
||||||
gui.highlight_mask = (cattr | attr);
|
gui.highlight_mask = (cattr | attr);
|
||||||
#ifdef FEAT_HANGULIN
|
(void)gui_screenchar(LineOffset[gui.row] + gui.col,
|
||||||
if (composing_hangul)
|
|
||||||
{
|
|
||||||
char_u *comp_buf;
|
|
||||||
int comp_len;
|
|
||||||
|
|
||||||
comp_buf = hangul_composing_buffer_get(&comp_len);
|
|
||||||
if (comp_buf)
|
|
||||||
{
|
|
||||||
(void)gui_outstr_nowrap(comp_buf, comp_len,
|
|
||||||
GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR,
|
|
||||||
cfg, cbg, 0);
|
|
||||||
vim_free(comp_buf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
(void)gui_screenchar(LineOffset[gui.row] + gui.col,
|
|
||||||
GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR, cfg, cbg, 0);
|
GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR, cfg, cbg, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2641,38 +2620,13 @@ gui_undraw_cursor(void)
|
|||||||
{
|
{
|
||||||
if (gui.cursor_is_valid)
|
if (gui.cursor_is_valid)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_HANGULIN
|
|
||||||
if (composing_hangul
|
|
||||||
&& gui.col == gui.cursor_col && gui.row == gui.cursor_row)
|
|
||||||
{
|
|
||||||
char_u *comp_buf;
|
|
||||||
int comp_len;
|
|
||||||
|
|
||||||
comp_buf = hangul_composing_buffer_get(&comp_len);
|
|
||||||
if (comp_buf)
|
|
||||||
{
|
|
||||||
(void)gui_outstr_nowrap(comp_buf, comp_len,
|
|
||||||
GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR,
|
|
||||||
gui.norm_pixel, gui.back_pixel, 0);
|
|
||||||
vim_free(comp_buf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
if (gui_redraw_block(gui.cursor_row, gui.cursor_col,
|
if (gui_redraw_block(gui.cursor_row, gui.cursor_col,
|
||||||
gui.cursor_row, gui.cursor_col, GUI_MON_NOCLEAR)
|
gui.cursor_row, gui.cursor_col, GUI_MON_NOCLEAR)
|
||||||
&& gui.cursor_col > 0)
|
&& gui.cursor_col > 0)
|
||||||
(void)gui_redraw_block(gui.cursor_row, gui.cursor_col - 1,
|
(void)gui_redraw_block(gui.cursor_row, gui.cursor_col - 1,
|
||||||
gui.cursor_row, gui.cursor_col - 1, GUI_MON_NOCLEAR);
|
gui.cursor_row, gui.cursor_col - 1, GUI_MON_NOCLEAR);
|
||||||
#ifdef FEAT_HANGULIN
|
// Cursor_is_valid is reset when the cursor is undrawn, also reset it
|
||||||
if (composing_hangul)
|
// here in case it wasn't needed to undraw it.
|
||||||
(void)gui_redraw_block(gui.cursor_row, gui.cursor_col + 1,
|
|
||||||
gui.cursor_row, gui.cursor_col + 1, GUI_MON_NOCLEAR);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/* Cursor_is_valid is reset when the cursor is undrawn, also reset it
|
|
||||||
* here in case it wasn't needed to undraw it. */
|
|
||||||
gui.cursor_is_valid = FALSE;
|
gui.cursor_is_valid = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1159,14 +1159,6 @@ key_press_event(GtkWidget *widget UNUSED,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_HANGULIN
|
|
||||||
if (key_sym == GDK_space && (state & GDK_SHIFT_MASK))
|
|
||||||
{
|
|
||||||
hangul_input_state_toggle();
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SunXK_F36
|
#ifdef SunXK_F36
|
||||||
/*
|
/*
|
||||||
* These keys have bogus lookup strings, and trapping them here is
|
* These keys have bogus lookup strings, and trapping them here is
|
||||||
@@ -4388,10 +4380,6 @@ gui_mch_open(void)
|
|||||||
g_signal_connect(G_OBJECT(gui.mainwin), "destroy",
|
g_signal_connect(G_OBJECT(gui.mainwin), "destroy",
|
||||||
G_CALLBACK(mainwin_destroy_cb), NULL);
|
G_CALLBACK(mainwin_destroy_cb), NULL);
|
||||||
|
|
||||||
#ifdef FEAT_HANGULIN
|
|
||||||
hangul_keyboard_set();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Notify the fixed area about the need to resize the contents of the
|
* Notify the fixed area about the need to resize the contents of the
|
||||||
* gui.formwin, which we use for random positioning of the included
|
* gui.formwin, which we use for random positioning of the included
|
||||||
|
@@ -863,14 +863,6 @@ gui_x11_key_hit_cb(
|
|||||||
len = 0;
|
len = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_HANGULIN
|
|
||||||
if ((key_sym == XK_space) && (ev_press->state & ShiftMask))
|
|
||||||
{
|
|
||||||
hangul_input_state_toggle();
|
|
||||||
goto theend;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (key_sym == XK_space)
|
if (key_sym == XK_space)
|
||||||
string[0] = ' '; /* Otherwise Ctrl-Space doesn't work */
|
string[0] = ' '; /* Otherwise Ctrl-Space doesn't work */
|
||||||
|
|
||||||
@@ -1638,9 +1630,6 @@ gui_mch_open(void)
|
|||||||
* changed them) */
|
* changed them) */
|
||||||
highlight_gui_started(); /* re-init colors and fonts */
|
highlight_gui_started(); /* re-init colors and fonts */
|
||||||
|
|
||||||
#ifdef FEAT_HANGULIN
|
|
||||||
hangul_keyboard_set();
|
|
||||||
#endif
|
|
||||||
#ifdef FEAT_XIM
|
#ifdef FEAT_XIM
|
||||||
xim_init();
|
xim_init();
|
||||||
#endif
|
#endif
|
||||||
|
1643
src/hangulin.c
1643
src/hangulin.c
File diff suppressed because it is too large
Load Diff
@@ -4252,10 +4252,6 @@ mb_unescape(char_u **pp)
|
|||||||
int
|
int
|
||||||
mb_lefthalve(int row, int col)
|
mb_lefthalve(int row, int col)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_HANGULIN
|
|
||||||
if (composing_hangul)
|
|
||||||
return TRUE;
|
|
||||||
#endif
|
|
||||||
return (*mb_off2cells)(LineOffset[row] + col,
|
return (*mb_off2cells)(LineOffset[row] + col,
|
||||||
LineOffset[row] + screen_Columns) > 1;
|
LineOffset[row] + screen_Columns) > 1;
|
||||||
}
|
}
|
||||||
@@ -5855,11 +5851,6 @@ xim_queue_key_press_event(GdkEventKey *event, int down)
|
|||||||
int
|
int
|
||||||
im_get_status(void)
|
im_get_status(void)
|
||||||
{
|
{
|
||||||
# ifdef FEAT_HANGULIN
|
|
||||||
if (hangul_input_state_get())
|
|
||||||
return TRUE;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifdef FEAT_EVAL
|
# ifdef FEAT_EVAL
|
||||||
if (USE_IMSTATUSFUNC)
|
if (USE_IMSTATUSFUNC)
|
||||||
return call_imstatusfunc();
|
return call_imstatusfunc();
|
||||||
|
@@ -93,9 +93,6 @@ extern int _stricoll(char *a, char *b);
|
|||||||
# include "findfile.pro"
|
# include "findfile.pro"
|
||||||
# include "fold.pro"
|
# include "fold.pro"
|
||||||
# include "getchar.pro"
|
# include "getchar.pro"
|
||||||
# ifdef FEAT_HANGULIN
|
|
||||||
# include "hangulin.pro"
|
|
||||||
# endif
|
|
||||||
# include "hardcopy.pro"
|
# include "hardcopy.pro"
|
||||||
# include "hashtab.pro"
|
# include "hashtab.pro"
|
||||||
# include "highlight.pro"
|
# include "highlight.pro"
|
||||||
|
@@ -1,10 +0,0 @@
|
|||||||
/* hangulin.c */
|
|
||||||
int hangul_input_state_get(void);
|
|
||||||
void hangul_input_state_set(int state);
|
|
||||||
int im_get_status(void);
|
|
||||||
void hangul_input_state_toggle(void);
|
|
||||||
void hangul_keyboard_set(void);
|
|
||||||
int hangul_input_process(char_u *s, int len);
|
|
||||||
char_u *hangul_string_convert(char_u *buf, int *p_len);
|
|
||||||
char_u *hangul_composing_buffer_get(int *p_len);
|
|
||||||
/* vim: set ft=c : */
|
|
13
src/screen.c
13
src/screen.c
@@ -4040,19 +4040,6 @@ showmode(void)
|
|||||||
# else
|
# else
|
||||||
msg_puts_attr(" XIM", attr);
|
msg_puts_attr(" XIM", attr);
|
||||||
# endif
|
# endif
|
||||||
#endif
|
|
||||||
#if defined(FEAT_HANGULIN) && defined(FEAT_GUI)
|
|
||||||
if (gui.in_use)
|
|
||||||
{
|
|
||||||
if (hangul_input_state_get())
|
|
||||||
{
|
|
||||||
/* HANGUL */
|
|
||||||
if (enc_utf8)
|
|
||||||
msg_puts_attr(" \355\225\234\352\270\200", attr);
|
|
||||||
else
|
|
||||||
msg_puts_attr(" \307\321\261\333", attr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
/* CTRL-X in Insert mode */
|
/* CTRL-X in Insert mode */
|
||||||
if (edit_submode != NULL && !shortmess(SHM_COMPLETIONMENU))
|
if (edit_submode != NULL && !shortmess(SHM_COMPLETIONMENU))
|
||||||
|
32
src/ui.c
32
src/ui.c
@@ -2068,12 +2068,6 @@ add_to_input_buf(char_u *s, int len)
|
|||||||
if (inbufcount + len > INBUFLEN + MAX_KEY_CODE_LEN)
|
if (inbufcount + len > INBUFLEN + MAX_KEY_CODE_LEN)
|
||||||
return; /* Shouldn't ever happen! */
|
return; /* Shouldn't ever happen! */
|
||||||
|
|
||||||
#ifdef FEAT_HANGULIN
|
|
||||||
if ((State & (INSERT|CMDLINE)) && hangul_input_state_get())
|
|
||||||
if ((len = hangul_input_process(s, len)) == 0)
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
while (len--)
|
while (len--)
|
||||||
inbuf[inbufcount++] = *s++;
|
inbuf[inbufcount++] = *s++;
|
||||||
}
|
}
|
||||||
@@ -2100,32 +2094,6 @@ add_to_input_buf_csi(char_u *str, int len)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(FEAT_HANGULIN) || defined(PROTO)
|
|
||||||
void
|
|
||||||
push_raw_key(char_u *s, int len)
|
|
||||||
{
|
|
||||||
char_u *tmpbuf;
|
|
||||||
char_u *inp = s;
|
|
||||||
|
|
||||||
/* use the conversion result if possible */
|
|
||||||
tmpbuf = hangul_string_convert(s, &len);
|
|
||||||
if (tmpbuf != NULL)
|
|
||||||
inp = tmpbuf;
|
|
||||||
|
|
||||||
for (; len--; inp++)
|
|
||||||
{
|
|
||||||
inbuf[inbufcount++] = *inp;
|
|
||||||
if (*inp == CSI)
|
|
||||||
{
|
|
||||||
/* Turn CSI into K_CSI. */
|
|
||||||
inbuf[inbufcount++] = KS_EXTRA;
|
|
||||||
inbuf[inbufcount++] = (int)KE_CSI;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
vim_free(tmpbuf);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Remove everything from the input buffer. Called when ^C is found */
|
/* Remove everything from the input buffer. Called when ^C is found */
|
||||||
void
|
void
|
||||||
trash_input_buf(void)
|
trash_input_buf(void)
|
||||||
|
@@ -282,11 +282,7 @@ static char *(features[]) =
|
|||||||
#else
|
#else
|
||||||
"-gettext",
|
"-gettext",
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_HANGULIN
|
|
||||||
"+hangul_input",
|
|
||||||
#else
|
|
||||||
"-hangul_input",
|
"-hangul_input",
|
||||||
#endif
|
|
||||||
#if (defined(HAVE_ICONV_H) && defined(USE_ICONV)) || defined(DYNAMIC_ICONV)
|
#if (defined(HAVE_ICONV_H) && defined(USE_ICONV)) || defined(DYNAMIC_ICONV)
|
||||||
# ifdef DYNAMIC_ICONV
|
# ifdef DYNAMIC_ICONV
|
||||||
"+iconv/dyn",
|
"+iconv/dyn",
|
||||||
@@ -741,6 +737,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 */
|
||||||
|
/**/
|
||||||
|
2327,
|
||||||
/**/
|
/**/
|
||||||
2326,
|
2326,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user