0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.0.1338: USE_IM_CONTROL is confusing and incomplete

Problem:    USE_IM_CONTROL is confusing and incomplete.
Solution:   Just use FEAT_MBYTE.  Call 'imactivatefunc' also without GUI.
This commit is contained in:
Bram Moolenaar
2017-11-25 17:14:33 +01:00
parent 50d43153a7
commit 819edbe078
14 changed files with 124 additions and 124 deletions

View File

@@ -516,7 +516,7 @@ edit(
*/
if (curbuf->b_p_iminsert == B_IMODE_LMAP)
State |= LANGMAP;
#ifdef USE_IM_CONTROL
#ifdef FEAT_MBYTE
im_set_active(curbuf->b_p_iminsert == B_IMODE_IM);
#endif
@@ -8372,7 +8372,7 @@ ins_reg(void)
++no_u_sync;
if (regname == '=')
{
# ifdef USE_IM_CONTROL
# ifdef FEAT_MBYTE
int im_on = im_get_status();
# endif
/* Sync undo when evaluating the expression calls setline() or
@@ -8380,7 +8380,7 @@ ins_reg(void)
u_sync_once = 2;
regname = get_expr_register();
# ifdef USE_IM_CONTROL
# ifdef FEAT_MBYTE
/* Restore the Input Method. */
if (im_on)
im_set_active(TRUE);
@@ -8509,12 +8509,12 @@ ins_ctrl_hat(void)
{
curbuf->b_p_iminsert = B_IMODE_LMAP;
State |= LANGMAP;
#ifdef USE_IM_CONTROL
#ifdef FEAT_MBYTE
im_set_active(FALSE);
#endif
}
}
#ifdef USE_IM_CONTROL
#ifdef FEAT_MBYTE
else
{
/* There are no ":lmap" mappings, toggle IM */
@@ -8661,7 +8661,7 @@ ins_esc(
}
}
#ifdef USE_IM_CONTROL
#ifdef FEAT_MBYTE
/* Disable IM to allow typing English directly for Normal mode commands.
* When ":lmap" is enabled don't change 'iminsert' (IM can be enabled as
* well). */