Patch 8.2.2352

5 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 14, 2021, 3:58:30 PM1/14/21
to vim...@googlegroups.com

Patch 8.2.2352
Problem: If the focus lost/gained escape sequence is received twice it is
not ignored. (Christ van Willigen)
Solution: Adjust the logic to ignore the escape code.
Files: src/term.c


*** ../vim-8.2.2351/src/term.c 2021-01-14 19:19:14.927885317 +0100
--- src/term.c 2021-01-14 21:55:00.774317036 +0100
***************
*** 5708,5725 ****
&& key_name[0] == KS_EXTRA
)
{
! if (key_name[1] == KE_FOCUSGAINED && !focus_state)
{
! ui_focus_change(TRUE);
! did_cursorhold = TRUE;
! focus_state = TRUE;
key_name[1] = (int)KE_IGNORE;
}
! else if (key_name[1] == KE_FOCUSLOST && focus_state)
{
! ui_focus_change(FALSE);
! did_cursorhold = TRUE;
! focus_state = FALSE;
key_name[1] = (int)KE_IGNORE;
}
}
--- 5708,5731 ----
&& key_name[0] == KS_EXTRA
)
{
! if (key_name[1] == KE_FOCUSGAINED)
{
! if (!focus_state)
! {
! ui_focus_change(TRUE);
! did_cursorhold = TRUE;
! focus_state = TRUE;
! }
key_name[1] = (int)KE_IGNORE;
}
! else if (key_name[1] == KE_FOCUSLOST)
{
! if (focus_state)
! {
! ui_focus_change(FALSE);
! did_cursorhold = TRUE;
! focus_state = FALSE;
! }
key_name[1] = (int)KE_IGNORE;
}
}
*** ../vim-8.2.2351/src/version.c 2021-01-14 21:47:03.171554574 +0100
--- src/version.c 2021-01-14 21:57:41.269897719 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2352,
/**/

--
You are not really successful until someone claims he sat
beside you in school.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages