diff options
author | KunMing Xie <qqzz014@gmail.com> | 2018-01-31 03:29:15 +0800 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-01-30 20:29:15 +0100 |
commit | 8728a5d50bc3339db81c7f29d59c55f9f817f06c (patch) | |
tree | e5ecd3e8bc2310d35889731dacf2cbcab38887dd /src/nvim/fileio.c | |
parent | 2a1a624878ec70caf1e61b7440a6b9e4dce6c36f (diff) | |
download | rneovim-8728a5d50bc3339db81c7f29d59c55f9f817f06c.tar.gz rneovim-8728a5d50bc3339db81c7f29d59c55f9f817f06c.tar.bz2 rneovim-8728a5d50bc3339db81c7f29d59c55f9f817f06c.zip |
vim-patch:8.0.0448: some macros are lower case (#7936)
Problem: Some macros are in lower case, which can be confusing.
Solution: Make a few lower case macros upper case.
https://github.com/vim/vim/commit/b5aedf3e228d35821591da9ae8501b61cf2e264c
ref #6297
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 1f4cd22754..44d74c92cd 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -5088,14 +5088,12 @@ void buf_reload(buf_T *buf, int orig_mode) flags |= READ_KEEP_UNDO; } - /* - * To behave like when a new file is edited (matters for - * BufReadPost autocommands) we first need to delete the current - * buffer contents. But if reading the file fails we should keep - * the old contents. Can't use memory only, the file might be - * too big. Use a hidden buffer to move the buffer contents to. - */ - if (bufempty() || saved == FAIL) { + // To behave like when a new file is edited (matters for + // BufReadPost autocommands) we first need to delete the current + // buffer contents. But if reading the file fails we should keep + // the old contents. Can't use memory only, the file might be + // too big. Use a hidden buffer to move the buffer contents to. + if (BUFEMPTY() || saved == FAIL) { savebuf = NULL; } else { // Allocate a buffer without putting it in the buffer list. @@ -5128,7 +5126,7 @@ void buf_reload(buf_T *buf, int orig_mode) if (savebuf != NULL && bufref_valid(&bufref) && buf == curbuf) { // Put the text back from the save buffer. First // delete any lines that readfile() added. - while (!bufempty()) { + while (!BUFEMPTY()) { if (ml_delete(buf->b_ml.ml_line_count, false) == FAIL) { break; } |