Patch 8.2.2348 (after 8.2.2345)
Problem: No check for modified files after focus gained. (Mathias Stearn)
Solution: Call ui_focus_change().
Files: src/term.c, src/ui.c
*** ../vim-8.2.2347/src/term.c 2021-01-14 19:04:41.694319937 +0100
--- src/term.c 2021-01-14 19:13:47.172539742 +0100
***************
*** 5708,5737 ****
&& key_name[0] == KS_EXTRA
)
{
- int did_aucmd = FALSE;
-
if (key_name[1] == KE_FOCUSGAINED && !focus_state)
{
! did_aucmd = apply_autocmds(EVENT_FOCUSGAINED,
! NULL, NULL, FALSE, curbuf);
did_cursorhold = TRUE;
focus_state = TRUE;
key_name[1] = (int)KE_IGNORE;
}
else if (key_name[1] == KE_FOCUSLOST && focus_state)
{
! did_aucmd = apply_autocmds(EVENT_FOCUSLOST,
! NULL, NULL, FALSE, curbuf);
did_cursorhold = TRUE;
focus_state = FALSE;
key_name[1] = (int)KE_IGNORE;
}
- if (did_aucmd && (State & (NORMAL | INSERT | TERMINAL)))
- {
- // in case a message was displayed: reposition the cursor
- setcursor();
- out_flush();
- }
}
#endif
--- 5708,5727 ----
&& 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;
}
}
#endif
*** ../vim-8.2.2347/src/ui.c 2021-01-02 20:14:20.139734642 +0100
--- src/ui.c 2021-01-14 19:15:17.692380625 +0100
***************
*** 1101,1107 ****
return row;
}
- #if defined(FEAT_GUI) || defined(MSWIN) || defined(PROTO)
/*
* Called when focus changed. Used for the GUI or for systems where this can
* be done in the console (Win32).
--- 1101,1106 ----
***************
*** 1164,1170 ****
maketitle();
#endif
}
- #endif
#if defined(HAVE_INPUT_METHOD) || defined(PROTO)
/*
--- 1163,1168 ----
*** ../vim-8.2.2347/src/version.c 2021-01-14 19:04:41.694319937 +0100
--- src/version.c 2021-01-14 19:16:26.164248081 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2348,
/**/
--
hundred-and-one symptoms of being an internet addict:
145. You e-mail your boss, informing him you'll be late.
/// 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/202101141819.10EIJiva1647715%40masaka.moolenaar.net.