mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.1-104
This commit is contained in:
@@ -1597,12 +1597,13 @@ vgetc()
|
||||
}
|
||||
#endif
|
||||
#ifdef FEAT_GUI
|
||||
/* The caller doesn't need to know that the focus event is delayed
|
||||
* until getting a character. */
|
||||
/* Handle focus event here, so that the caller doesn't need to
|
||||
* know about it. Return K_IGNORE so that we loop once (needed if
|
||||
* 'lazyredraw' is set). */
|
||||
if (c == K_FOCUSGAINED || c == K_FOCUSLOST)
|
||||
{
|
||||
ui_focus_change(c == K_FOCUSGAINED);
|
||||
continue;
|
||||
c = K_IGNORE;
|
||||
}
|
||||
|
||||
/* Translate K_CSI to CSI. The special key is only used to avoid
|
||||
@@ -1747,6 +1748,22 @@ safe_vgetc()
|
||||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
* Like safe_vgetc(), but loop to handle K_IGNORE.
|
||||
* Also ignore scrollbar events.
|
||||
*/
|
||||
int
|
||||
plain_vgetc()
|
||||
{
|
||||
int c;
|
||||
|
||||
do
|
||||
{
|
||||
c = safe_vgetc();
|
||||
} while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
|
||||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if a character is available, such that vgetc() will not block.
|
||||
* If the next character is a special character or multi-byte, the returned
|
||||
|
Reference in New Issue
Block a user