Mercurial > vim
comparison src/mbyte.c @ 5025:322441058afc v7.3.1256
updated for version 7.3.1256
Problem: Can't build without eval or autocmd feature.
Solution: Add #ifdefs.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 28 Jun 2013 20:16:55 +0200 |
parents | 3717d569027d |
children | 28e6f5f88968 |
comparison
equal
deleted
inserted
replaced
5024:7a2ffd685c0e | 5025:322441058afc |
---|---|
5077 im_shutdown(); | 5077 im_shutdown(); |
5078 else | 5078 else |
5079 { | 5079 { |
5080 xim_set_focus(gui.in_focus); | 5080 xim_set_focus(gui.in_focus); |
5081 | 5081 |
5082 # ifdef FEAT_EVAL | |
5082 if (p_imaf[0] != NUL) | 5083 if (p_imaf[0] != NUL) |
5083 { | 5084 { |
5084 char_u *argv[1]; | 5085 char_u *argv[1]; |
5085 | 5086 |
5086 if (im_is_active) | 5087 if (im_is_active) |
5087 argv[0] = (char_u *)"1"; | 5088 argv[0] = (char_u *)"1"; |
5088 else | 5089 else |
5089 argv[0] = (char_u *)"0"; | 5090 argv[0] = (char_u *)"0"; |
5090 (void)call_func_retnr(p_imaf, 1, argv, FALSE); | 5091 (void)call_func_retnr(p_imaf, 1, argv, FALSE); |
5091 } | 5092 } |
5092 else if (im_activatekey_keyval != GDK_VoidSymbol) | 5093 else |
5094 # endif | |
5095 if (im_activatekey_keyval != GDK_VoidSymbol) | |
5093 { | 5096 { |
5094 if (im_is_active) | 5097 if (im_is_active) |
5095 { | 5098 { |
5096 g_signal_handler_block(xic, im_commit_handler_id); | 5099 g_signal_handler_block(xic, im_commit_handler_id); |
5097 im_synthesize_keypress(im_activatekey_keyval, | 5100 im_synthesize_keypress(im_activatekey_keyval, |
5247 } | 5250 } |
5248 | 5251 |
5249 int | 5252 int |
5250 im_get_status(void) | 5253 im_get_status(void) |
5251 { | 5254 { |
5255 # ifdef FEAT_EVAL | |
5252 if (p_imsf[0] != NUL) | 5256 if (p_imsf[0] != NUL) |
5253 { | 5257 { |
5254 int is_active; | 5258 int is_active; |
5255 | 5259 |
5256 /* FIXME: Don't execute user function in unsafe situation. */ | 5260 /* FIXME: Don't execute user function in unsafe situation. */ |
5257 if (exiting || is_autocmd_blocked()) | 5261 if (exiting |
5262 # ifdef FEAT_AUTOCMD | |
5263 || is_autocmd_blocked() | |
5264 # endif | |
5265 ) | |
5258 return FALSE; | 5266 return FALSE; |
5259 /* FIXME: :py print 'xxx' is shown duplicate result. | 5267 /* FIXME: :py print 'xxx' is shown duplicate result. |
5260 * Use silent to avoid it. */ | 5268 * Use silent to avoid it. */ |
5261 ++msg_silent; | 5269 ++msg_silent; |
5262 is_active = call_func_retnr(p_imsf, 0, NULL, FALSE); | 5270 is_active = call_func_retnr(p_imsf, 0, NULL, FALSE); |
5263 --msg_silent; | 5271 --msg_silent; |
5264 return (is_active > 0); | 5272 return (is_active > 0); |
5265 } | 5273 } |
5274 # endif | |
5266 return im_is_active; | 5275 return im_is_active; |
5267 } | 5276 } |
5268 | 5277 |
5269 int | 5278 int |
5270 preedit_get_status(void) | 5279 preedit_get_status(void) |