Mercurial > vim
comparison src/mbyte.c @ 18742:e9b2ade1adbd v8.1.2361
patch 8.1.2361: MS-Windows: test failures related to VIMDLL
Commit: https://github.com/vim/vim/commit/310c32e8920140f0db747c6c6eb06b1ee53cdb5a
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Nov 29 23:15:25 2019 +0100
patch 8.1.2361: MS-Windows: test failures related to VIMDLL
Problem: MS-Windows: test failures related to VIMDLL.
Solution: Adjust code and tests. (Ken Takata, closes https://github.com/vim/vim/issues/5283)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 29 Nov 2019 23:30:04 +0100 |
parents | df141c730008 |
children | f41b55f9357c |
comparison
equal
deleted
inserted
replaced
18741:3f42c89cf06c | 18742:e9b2ade1adbd |
---|---|
4787 #else | 4787 #else |
4788 # define USE_IMACTIVATEFUNC (*p_imaf != NUL) | 4788 # define USE_IMACTIVATEFUNC (*p_imaf != NUL) |
4789 # define USE_IMSTATUSFUNC (*p_imsf != NUL) | 4789 # define USE_IMSTATUSFUNC (*p_imsf != NUL) |
4790 #endif | 4790 #endif |
4791 | 4791 |
4792 #if defined(FEAT_EVAL) && (defined(FEAT_XIM) || defined(IME_WITHOUT_XIM)) | 4792 #if defined(FEAT_EVAL) && \ |
4793 (defined(FEAT_XIM) || defined(IME_WITHOUT_XIM) || defined(VIMDLL)) | |
4793 static void | 4794 static void |
4794 call_imactivatefunc(int active) | 4795 call_imactivatefunc(int active) |
4795 { | 4796 { |
4796 typval_T argv[2]; | 4797 typval_T argv[2]; |
4797 | 4798 |
6452 } | 6453 } |
6453 # endif | 6454 # endif |
6454 | 6455 |
6455 #else /* !defined(FEAT_XIM) */ | 6456 #else /* !defined(FEAT_XIM) */ |
6456 | 6457 |
6457 # ifdef IME_WITHOUT_XIM | 6458 # if defined(IME_WITHOUT_XIM) || defined(VIMDLL) |
6458 static int im_was_set_active = FALSE; | 6459 static int im_was_set_active = FALSE; |
6459 | 6460 |
6460 int | 6461 int |
6462 # ifdef VIMDLL | |
6463 mbyte_im_get_status(void) | |
6464 # else | |
6461 im_get_status(void) | 6465 im_get_status(void) |
6466 # endif | |
6462 { | 6467 { |
6463 # if defined(FEAT_EVAL) | 6468 # if defined(FEAT_EVAL) |
6464 if (USE_IMSTATUSFUNC) | 6469 if (USE_IMSTATUSFUNC) |
6465 return call_imstatusfunc(); | 6470 return call_imstatusfunc(); |
6466 # endif | 6471 # endif |
6467 return im_was_set_active; | 6472 return im_was_set_active; |
6468 } | 6473 } |
6469 | 6474 |
6470 void | 6475 void |
6476 # ifdef VIMDLL | |
6477 mbyte_im_set_active(int active_arg) | |
6478 # else | |
6471 im_set_active(int active_arg) | 6479 im_set_active(int active_arg) |
6480 # endif | |
6472 { | 6481 { |
6473 # if defined(FEAT_EVAL) | 6482 # if defined(FEAT_EVAL) |
6474 int active = !p_imdisable && active_arg; | 6483 int active = !p_imdisable && active_arg; |
6475 | 6484 |
6476 if (USE_IMACTIVATEFUNC && active != im_get_status()) | 6485 if (USE_IMACTIVATEFUNC && active != im_get_status()) |
6479 im_was_set_active = active; | 6488 im_was_set_active = active; |
6480 } | 6489 } |
6481 # endif | 6490 # endif |
6482 } | 6491 } |
6483 | 6492 |
6484 # ifdef FEAT_GUI | 6493 # if defined(FEAT_GUI) && !defined(VIMDLL) |
6485 void | 6494 void |
6486 im_set_position(int row UNUSED, int col UNUSED) | 6495 im_set_position(int row UNUSED, int col UNUSED) |
6487 { | 6496 { |
6488 } | 6497 } |
6489 # endif | 6498 # endif |