Mercurial > vim
comparison src/ui.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 |
---|---|
2066 add_to_input_buf(char_u *s, int len) | 2066 add_to_input_buf(char_u *s, int len) |
2067 { | 2067 { |
2068 if (inbufcount + len > INBUFLEN + MAX_KEY_CODE_LEN) | 2068 if (inbufcount + len > INBUFLEN + MAX_KEY_CODE_LEN) |
2069 return; /* Shouldn't ever happen! */ | 2069 return; /* Shouldn't ever happen! */ |
2070 | 2070 |
2071 #ifdef FEAT_HANGULIN | |
2072 if ((State & (INSERT|CMDLINE)) && hangul_input_state_get()) | |
2073 if ((len = hangul_input_process(s, len)) == 0) | |
2074 return; | |
2075 #endif | |
2076 | |
2077 while (len--) | 2071 while (len--) |
2078 inbuf[inbufcount++] = *s++; | 2072 inbuf[inbufcount++] = *s++; |
2079 } | 2073 } |
2080 | 2074 |
2081 /* | 2075 /* |
2097 buf[1] = (int)KE_CSI; | 2091 buf[1] = (int)KE_CSI; |
2098 add_to_input_buf(buf, 2); | 2092 add_to_input_buf(buf, 2); |
2099 } | 2093 } |
2100 } | 2094 } |
2101 } | 2095 } |
2102 | |
2103 #if defined(FEAT_HANGULIN) || defined(PROTO) | |
2104 void | |
2105 push_raw_key(char_u *s, int len) | |
2106 { | |
2107 char_u *tmpbuf; | |
2108 char_u *inp = s; | |
2109 | |
2110 /* use the conversion result if possible */ | |
2111 tmpbuf = hangul_string_convert(s, &len); | |
2112 if (tmpbuf != NULL) | |
2113 inp = tmpbuf; | |
2114 | |
2115 for (; len--; inp++) | |
2116 { | |
2117 inbuf[inbufcount++] = *inp; | |
2118 if (*inp == CSI) | |
2119 { | |
2120 /* Turn CSI into K_CSI. */ | |
2121 inbuf[inbufcount++] = KS_EXTRA; | |
2122 inbuf[inbufcount++] = (int)KE_CSI; | |
2123 } | |
2124 } | |
2125 vim_free(tmpbuf); | |
2126 } | |
2127 #endif | |
2128 | 2096 |
2129 /* Remove everything from the input buffer. Called when ^C is found */ | 2097 /* Remove everything from the input buffer. Called when ^C is found */ |
2130 void | 2098 void |
2131 trash_input_buf(void) | 2099 trash_input_buf(void) |
2132 { | 2100 { |