forked from aniani/vim
patch 8.1.1780: warning for file no longer available is repeated
Problem: Warning for file no longer available is repeated every time Vim is focused. (Brian Armstrong) Solution: Only give the message once. (closes #4748)
This commit is contained in:
@@ -6742,6 +6742,8 @@ buf_check_timestamp(
|
|||||||
#endif
|
#endif
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
|
long prev_b_mtime = buf->b_mtime;
|
||||||
|
|
||||||
retval = 1;
|
retval = 1;
|
||||||
|
|
||||||
// set b_mtime to stop further warnings (e.g., when executing
|
// set b_mtime to stop further warnings (e.g., when executing
|
||||||
@@ -6819,7 +6821,11 @@ buf_check_timestamp(
|
|||||||
if (!n)
|
if (!n)
|
||||||
{
|
{
|
||||||
if (*reason == 'd')
|
if (*reason == 'd')
|
||||||
|
{
|
||||||
|
// Only give the message once.
|
||||||
|
if (prev_b_mtime != -1)
|
||||||
mesg = _("E211: File \"%s\" no longer available");
|
mesg = _("E211: File \"%s\" no longer available");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
helpmesg = TRUE;
|
helpmesg = TRUE;
|
||||||
|
@@ -777,6 +777,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1780,
|
||||||
/**/
|
/**/
|
||||||
1779,
|
1779,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user