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 -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202101142058.10EKwN6I1690747%40masaka.moolenaar.net.