diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-11-10 14:35:18 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-11-10 14:35:18 +0100 |
commit | 72f4cc4a987d123c0ed909c85b9a05f65cef7202 (patch) | |
tree | 1bc60bc28234d1b7dd050f8b95bebb577da9b736 /src/gui.c | |
parent | e01f4f86cef7bed3cb99b26f9f57d86f6eb5fe1a (diff) | |
download | vim-git-72f4cc4a987d123c0ed909c85b9a05f65cef7202.tar.gz |
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.c | 31 |
1 files changed, 26 insertions, 5 deletions
@@ -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 |