Skip to content

Commit fadd55b

Browse files
committed
patch 8.2.2348: no check for modified files after focus gained
Problem: No check for modified files after focus gained. (Mathias Stearn) Solution: Call ui_focus_change().
1 parent e1ee58a commit fadd55b

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

src/term.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5708,30 +5708,20 @@ check_termcode(
57085708
&& key_name[0] == KS_EXTRA
57095709
)
57105710
{
5711-
int did_aucmd = FALSE;
5712-
57135711
if (key_name[1] == KE_FOCUSGAINED && !focus_state)
57145712
{
5715-
did_aucmd = apply_autocmds(EVENT_FOCUSGAINED,
5716-
NULL, NULL, FALSE, curbuf);
5713+
ui_focus_change(TRUE);
57175714
did_cursorhold = TRUE;
57185715
focus_state = TRUE;
57195716
key_name[1] = (int)KE_IGNORE;
57205717
}
57215718
else if (key_name[1] == KE_FOCUSLOST && focus_state)
57225719
{
5723-
did_aucmd = apply_autocmds(EVENT_FOCUSLOST,
5724-
NULL, NULL, FALSE, curbuf);
5720+
ui_focus_change(FALSE);
57255721
did_cursorhold = TRUE;
57265722
focus_state = FALSE;
57275723
key_name[1] = (int)KE_IGNORE;
57285724
}
5729-
if (did_aucmd && (State & (NORMAL | INSERT | TERMINAL)))
5730-
{
5731-
// in case a message was displayed: reposition the cursor
5732-
setcursor();
5733-
out_flush();
5734-
}
57355725
}
57365726
#endif
57375727

src/ui.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,6 @@ check_row(int row)
11011101
return row;
11021102
}
11031103

1104-
#if defined(FEAT_GUI) || defined(MSWIN) || defined(PROTO)
11051104
/*
11061105
* Called when focus changed. Used for the GUI or for systems where this can
11071106
* be done in the console (Win32).
@@ -1164,7 +1163,6 @@ ui_focus_change(
11641163
maketitle();
11651164
#endif
11661165
}
1167-
#endif
11681166

11691167
#if defined(HAVE_INPUT_METHOD) || defined(PROTO)
11701168
/*

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2348,
753755
/**/
754756
2347,
755757
/**/

0 commit comments

Comments
 (0)