From 900a151bf541c7fa77a56b4881c4836a1cabcde6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 26 Aug 2022 19:04:20 +0800 Subject: vim-patch:9.0.0272: BufReadCmd not triggered when loading a "nofile" buffer Problem: BufReadCmd not triggered when loading a "nofile" buffer. (Maxim Kim) Solution: Call readfile() but bail out before reading a file. (closes vim/vim#10983) https://github.com/vim/vim/commit/b1d2c8116cb5577961ea109651fb888b5e58265f --- src/nvim/fileio.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/fileio.h') diff --git a/src/nvim/fileio.h b/src/nvim/fileio.h index 650977deac..ae3c51f1bc 100644 --- a/src/nvim/fileio.h +++ b/src/nvim/fileio.h @@ -15,6 +15,7 @@ #define READ_KEEP_UNDO 0x20 // keep undo info #define READ_FIFO 0x40 // read from fifo or socket #define READ_NOWINENTER 0x80 // do not trigger BufWinEnter +#define READ_NOFILE 0x100 // do not read a file, do trigger BufReadCmd #define READ_STRING(x, y) (char_u *)read_string((x), (size_t)(y)) -- cgit From 66360675cf4d091b7460e4a8e1435c13216c1929 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 11 Sep 2022 17:12:44 +0200 Subject: build: allow IWYU to fix includes for all .c files Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers. --- src/nvim/fileio.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/fileio.h') diff --git a/src/nvim/fileio.h b/src/nvim/fileio.h index ae3c51f1bc..dabcda5bf2 100644 --- a/src/nvim/fileio.h +++ b/src/nvim/fileio.h @@ -3,6 +3,7 @@ #include "nvim/buffer_defs.h" #include "nvim/eval/typval.h" +#include "nvim/eval/typval_defs.h" #include "nvim/garray.h" #include "nvim/os/os.h" -- cgit