Mercurial > vim
comparison src/gui.c @ 18671:df141c730008 v8.1.2327
patch 8.1.2327: cannot build with Hangul input
Commit: https://github.com/vim/vim/commit/546125869f2959480c9a0f6c448c2092d565ec15
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 21 17:13:31 2019 +0100
patch 8.1.2327: cannot build with Hangul input
Problem: Cannot build with Hangul input.
Solution: Remove Hangul input support.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 21 Nov 2019 17:15:04 +0100 |
parents | bbea1f108187 |
children | fd95d4dbeb37 |
comparison
equal
deleted
inserted
replaced
18670:4658aa8e09fc | 18671:df141c730008 |
---|---|
1167 else | 1167 else |
1168 #endif | 1168 #endif |
1169 if (id > 0) | 1169 if (id > 0) |
1170 { | 1170 { |
1171 cattr = syn_id2colors(id, &cfg, &cbg); | 1171 cattr = syn_id2colors(id, &cfg, &cbg); |
1172 #if defined(HAVE_INPUT_METHOD) || defined(FEAT_HANGULIN) | 1172 #if defined(HAVE_INPUT_METHOD) |
1173 { | 1173 { |
1174 static int iid; | 1174 static int iid; |
1175 guicolor_T fg, bg; | 1175 guicolor_T fg, bg; |
1176 | 1176 |
1177 if ( | 1177 if ( |
1178 # if defined(FEAT_GUI_GTK) && defined(FEAT_XIM) && !defined(FEAT_HANGULIN) | 1178 # if defined(FEAT_GUI_GTK) && defined(FEAT_XIM) |
1179 preedit_get_status() | 1179 preedit_get_status() |
1180 # else | 1180 # else |
1181 im_get_status() | 1181 im_get_status() |
1182 # endif | 1182 # endif |
1183 ) | 1183 ) |
1258 gui_mch_draw_hollow_cursor(cbg); | 1258 gui_mch_draw_hollow_cursor(cbg); |
1259 return; | 1259 return; |
1260 } | 1260 } |
1261 | 1261 |
1262 old_hl_mask = gui.highlight_mask; | 1262 old_hl_mask = gui.highlight_mask; |
1263 if (shape->shape == SHAPE_BLOCK | 1263 if (shape->shape == SHAPE_BLOCK) |
1264 #ifdef FEAT_HANGULIN | |
1265 || composing_hangul | |
1266 #endif | |
1267 ) | |
1268 { | 1264 { |
1269 /* | 1265 /* |
1270 * Draw the text character with the cursor colors. Use the | 1266 * Draw the text character with the cursor colors. Use the |
1271 * character attributes plus the cursor attributes. | 1267 * character attributes plus the cursor attributes. |
1272 */ | 1268 */ |
1273 gui.highlight_mask = (cattr | attr); | 1269 gui.highlight_mask = (cattr | attr); |
1274 #ifdef FEAT_HANGULIN | 1270 (void)gui_screenchar(LineOffset[gui.row] + gui.col, |
1275 if (composing_hangul) | |
1276 { | |
1277 char_u *comp_buf; | |
1278 int comp_len; | |
1279 | |
1280 comp_buf = hangul_composing_buffer_get(&comp_len); | |
1281 if (comp_buf) | |
1282 { | |
1283 (void)gui_outstr_nowrap(comp_buf, comp_len, | |
1284 GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR, | |
1285 cfg, cbg, 0); | |
1286 vim_free(comp_buf); | |
1287 } | |
1288 } | |
1289 else | |
1290 #endif | |
1291 (void)gui_screenchar(LineOffset[gui.row] + gui.col, | |
1292 GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR, cfg, cbg, 0); | 1271 GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR, cfg, cbg, 0); |
1293 } | 1272 } |
1294 else | 1273 else |
1295 { | 1274 { |
1296 #if defined(FEAT_RIGHTLEFT) | 1275 #if defined(FEAT_RIGHTLEFT) |
2639 void | 2618 void |
2640 gui_undraw_cursor(void) | 2619 gui_undraw_cursor(void) |
2641 { | 2620 { |
2642 if (gui.cursor_is_valid) | 2621 if (gui.cursor_is_valid) |
2643 { | 2622 { |
2644 #ifdef FEAT_HANGULIN | |
2645 if (composing_hangul | |
2646 && gui.col == gui.cursor_col && gui.row == gui.cursor_row) | |
2647 { | |
2648 char_u *comp_buf; | |
2649 int comp_len; | |
2650 | |
2651 comp_buf = hangul_composing_buffer_get(&comp_len); | |
2652 if (comp_buf) | |
2653 { | |
2654 (void)gui_outstr_nowrap(comp_buf, comp_len, | |
2655 GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR, | |
2656 gui.norm_pixel, gui.back_pixel, 0); | |
2657 vim_free(comp_buf); | |
2658 } | |
2659 } | |
2660 else | |
2661 { | |
2662 #endif | |
2663 if (gui_redraw_block(gui.cursor_row, gui.cursor_col, | 2623 if (gui_redraw_block(gui.cursor_row, gui.cursor_col, |
2664 gui.cursor_row, gui.cursor_col, GUI_MON_NOCLEAR) | 2624 gui.cursor_row, gui.cursor_col, GUI_MON_NOCLEAR) |
2665 && gui.cursor_col > 0) | 2625 && gui.cursor_col > 0) |
2666 (void)gui_redraw_block(gui.cursor_row, gui.cursor_col - 1, | 2626 (void)gui_redraw_block(gui.cursor_row, gui.cursor_col - 1, |
2667 gui.cursor_row, gui.cursor_col - 1, GUI_MON_NOCLEAR); | 2627 gui.cursor_row, gui.cursor_col - 1, GUI_MON_NOCLEAR); |
2668 #ifdef FEAT_HANGULIN | 2628 // Cursor_is_valid is reset when the cursor is undrawn, also reset it |
2669 if (composing_hangul) | 2629 // here in case it wasn't needed to undraw it. |
2670 (void)gui_redraw_block(gui.cursor_row, gui.cursor_col + 1, | |
2671 gui.cursor_row, gui.cursor_col + 1, GUI_MON_NOCLEAR); | |
2672 } | |
2673 #endif | |
2674 /* Cursor_is_valid is reset when the cursor is undrawn, also reset it | |
2675 * here in case it wasn't needed to undraw it. */ | |
2676 gui.cursor_is_valid = FALSE; | 2630 gui.cursor_is_valid = FALSE; |
2677 } | 2631 } |
2678 } | 2632 } |
2679 | 2633 |
2680 void | 2634 void |