summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-11-10 14:35:18 +0100
committerBram Moolenaar <Bram@vim.org>2015-11-10 14:35:18 +0100
commit72f4cc4a987d123c0ed909c85b9a05f65cef7202 (patch)
tree1bc60bc28234d1b7dd050f8b95bebb577da9b736 /src/gui.c
parente01f4f86cef7bed3cb99b26f9f57d86f6eb5fe1a (diff)
patch 7.4.913v7.4.913
Problem: No utf-8 support for the hangul input feature. Solution: Add utf-8 support. (Namsh)
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/gui.c b/src/gui.c
index fc2981c6ca..07365224d3 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -1223,8 +1223,19 @@ gui_update_cursor(force, clear_selection)
gui.highlight_mask = (cattr | attr);
#ifdef FEAT_HANGULIN
if (composing_hangul)
- (void)gui_outstr_nowrap(composing_hangul_buffer, 2,
- GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR, cfg, cbg, 0);
+ {
+ 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,
@@ -2572,9 +2583,19 @@ gui_undraw_cursor()
#ifdef FEAT_HANGULIN
if (composing_hangul
&& gui.col == gui.cursor_col && gui.row == gui.cursor_row)
- (void)gui_outstr_nowrap(composing_hangul_buffer, 2,
- GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR,
- gui.norm_pixel, gui.back_pixel, 0);
+ {
+ 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