mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00
fix: show autocmd output when F is in shortmess (#18251)
The default value of including F in 'shortmess' has the unfortunate side effect of hiding output from autocommands. This is a common source of confusion and often leads people to think their autocommands are not working when they are. There is a small snippet in the docs for 'shortmess' indicating that the F flag suppresses autocmd output, but it's not easy to find if you don't already know to look for it. This commit removes that behavior of the F flag to make it only suppress file info when opening a new file.
This commit is contained in:
@@ -994,7 +994,7 @@ void ml_recover(bool checkext)
|
||||
*/
|
||||
if (curbuf->b_ffname != NULL) {
|
||||
orig_file_status = readfile(curbuf->b_ffname, NULL, (linenr_T)0,
|
||||
(linenr_T)0, (linenr_T)MAXLNUM, NULL, READ_NEW);
|
||||
(linenr_T)0, (linenr_T)MAXLNUM, NULL, READ_NEW, false);
|
||||
}
|
||||
|
||||
// Use the 'fileformat' and 'fileencoding' as stored in the swap file.
|
||||
@@ -1069,7 +1069,7 @@ void ml_recover(bool checkext)
|
||||
line_count = pp->pb_pointer[idx].pe_line_count;
|
||||
if (readfile(curbuf->b_ffname, NULL, lnum,
|
||||
pp->pb_pointer[idx].pe_old_lnum - 1, line_count,
|
||||
NULL, 0) != OK) {
|
||||
NULL, 0, false) != OK) {
|
||||
cannot_open = true;
|
||||
} else {
|
||||
lnum += line_count;
|
||||
|
Reference in New Issue
Block a user