aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c48
1 files changed, 8 insertions, 40 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 5feff4d456..70db2dc479 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -265,14 +265,7 @@ getcmdline (
b_im_ptr = &curbuf->b_p_imsearch;
if (*b_im_ptr == B_IMODE_LMAP)
State |= LANGMAP;
-#ifdef USE_IM_CONTROL
- im_set_active(*b_im_ptr == B_IMODE_IM);
-#endif
}
-#ifdef USE_IM_CONTROL
- else if (p_imcmdline)
- im_set_active(TRUE);
-#endif
setmouse();
ui_cursor_shape(); /* may show different cursor shape */
@@ -311,9 +304,16 @@ getcmdline (
/* Get a character. Ignore K_IGNORE, it should not do anything, such
* as stop completion. */
+ event_enable_deferred();
do {
c = safe_vgetc();
} while (c == K_IGNORE);
+ event_disable_deferred();
+
+ if (c == K_EVENT) {
+ event_process();
+ continue;
+ }
if (KeyTyped) {
some_key_typed = TRUE;
@@ -769,11 +769,6 @@ getcmdline (
* Big switch for a typed command line character.
*/
switch (c) {
- case K_EVENT:
- event_process();
- // Force a redraw even though the command line didn't change
- shell_resized();
- goto cmdline_not_changed;
case K_BS:
case Ctrl_H:
case K_DEL:
@@ -865,9 +860,6 @@ getcmdline (
if (map_to_exists_mode((char_u *)"", LANGMAP, FALSE)) {
/* ":lmap" mappings exists, toggle use of mappings. */
State ^= LANGMAP;
-#ifdef USE_IM_CONTROL
- im_set_active(FALSE); /* Disable input method */
-#endif
if (b_im_ptr != NULL) {
if (State & LANGMAP)
*b_im_ptr = B_IMODE_LMAP;
@@ -875,23 +867,6 @@ getcmdline (
*b_im_ptr = B_IMODE_NONE;
}
}
-#ifdef USE_IM_CONTROL
- else {
- /* There are no ":lmap" mappings, toggle IM. When
- * 'imdisable' is set don't try getting the status, it's
- * always off. */
- if ((p_imdisable && b_im_ptr != NULL)
- ? *b_im_ptr == B_IMODE_IM : im_get_status()) {
- im_set_active(FALSE); /* Disable input method */
- if (b_im_ptr != NULL)
- *b_im_ptr = B_IMODE_NONE;
- } else {
- im_set_active(TRUE); /* Enable input method */
- if (b_im_ptr != NULL)
- *b_im_ptr = B_IMODE_IM;
- }
- }
-#endif
if (b_im_ptr != NULL) {
if (b_im_ptr == &curbuf->b_p_iminsert)
set_iminsert_global();
@@ -1540,11 +1515,6 @@ returncmd:
need_wait_return = FALSE;
State = save_State;
-#ifdef USE_IM_CONTROL
- if (b_im_ptr != NULL && *b_im_ptr != B_IMODE_LMAP)
- im_save_status(b_im_ptr);
- im_set_active(FALSE);
-#endif
setmouse();
ui_cursor_shape(); /* may show different cursor shape */
@@ -1885,8 +1855,6 @@ redraw:
}
if (IS_SPECIAL(c1)) {
- // Process deferred events
- event_process();
// Ignore other special key codes
continue;
}
@@ -1946,7 +1914,7 @@ redraw:
msg_col = 0;
if (msg_row < Rows - 1)
++msg_row;
- emsg_on_display = FALSE; /* don't want ui_delay() */
+ emsg_on_display = FALSE; /* don't want os_delay() */
if (got_int)
ga_clear(&line_ga);