diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2021-09-24 05:13:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-24 05:13:55 -0700 |
commit | bc570b00641386f6c60b24bc2207661b7551ca10 (patch) | |
tree | 9bce911896cb8b9f87f61b2a5e4bb704f3204b99 /src/nvim/buffer.c | |
parent | 55d1e630b4d66ecb774824c9839e7f5821d23341 (diff) | |
parent | 03ed72642ddfe6a603673efdc0998a154e581b88 (diff) | |
download | rneovim-bc570b00641386f6c60b24bc2207661b7551ca10.tar.gz rneovim-bc570b00641386f6c60b24bc2207661b7551ca10.tar.bz2 rneovim-bc570b00641386f6c60b24bc2207661b7551ca10.zip |
Merge #15774 fix(pvs): fix warnings, script
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 2b5325a917..c58eb1610e 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -3112,12 +3112,13 @@ void fileinfo(int fullname, // when non-zero print full path (size_t)(IOSIZE - (p - buffer)), true); } + bool dontwrite = bt_dontwrite(curbuf); vim_snprintf_add((char *)buffer, IOSIZE, "\"%s%s%s%s%s%s", curbufIsChanged() ? (shortmess(SHM_MOD) ? " [+]" : _(" [Modified]")) : " ", - (curbuf->b_flags & BF_NOTEDITED) && !bt_dontwrite(curbuf) + (curbuf->b_flags & BF_NOTEDITED) && !dontwrite ? _("[Not edited]") : "", - (curbuf->b_flags & BF_NEW) && !bt_dontwrite(curbuf) + (curbuf->b_flags & BF_NEW) && !dontwrite ? new_file_message() : "", (curbuf->b_flags & BF_READERR) ? _("[Read errors]") : "", |