To: vim_dev@googlegroups.com Subject: Patch 8.1.1780 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1780 Problem: Warning for file no longer available is repeated every time Vim is focused. (Brian Armstrong) Solution: Only give the message once. (closes #4748) Files: src/fileio.c *** ../vim-8.1.1779/src/fileio.c 2019-07-23 22:15:21.307518880 +0200 --- src/fileio.c 2019-07-31 20:20:52.877736390 +0200 *************** *** 6742,6747 **** --- 6742,6749 ---- #endif )) { + long prev_b_mtime = buf->b_mtime; + retval = 1; // set b_mtime to stop further warnings (e.g., when executing *************** *** 6819,6825 **** if (!n) { if (*reason == 'd') ! mesg = _("E211: File \"%s\" no longer available"); else { helpmesg = TRUE; --- 6821,6831 ---- if (!n) { if (*reason == 'd') ! { ! // Only give the message once. ! if (prev_b_mtime != -1) ! mesg = _("E211: File \"%s\" no longer available"); ! } else { helpmesg = TRUE; *** ../vim-8.1.1779/src/version.c 2019-07-30 21:19:21.880063009 +0200 --- src/version.c 2019-07-31 20:19:30.394240015 +0200 *************** *** 779,780 **** --- 779,782 ---- { /* Add new patch number below this line */ + /**/ + 1780, /**/ -- EXPERIENCE - experience is a wonderful thing. It enables you to recognise a mistake when you make it again. /// Bram Moolenaar -- Bram@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 ///