diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-04 17:03:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-04 17:03:57 -0700 |
commit | 632ee8d2ed6e307cc4d9ca2cf9e3ba0531a8af51 (patch) | |
tree | dfa1d1f1173fff6ac0e069f458b6e5956f31214e /src/nvim/buffer.c | |
parent | d7aea13fee879a5e7854f2ebe9b7321cd8daf84f (diff) | |
parent | d401539012f8222144b6873fd591baa232e8877c (diff) | |
download | rneovim-632ee8d2ed6e307cc4d9ca2cf9e3ba0531a8af51.tar.gz rneovim-632ee8d2ed6e307cc4d9ca2cf9e3ba0531a8af51.tar.bz2 rneovim-632ee8d2ed6e307cc4d9ca2cf9e3ba0531a8af51.zip |
Merge #10946 from justinmk/vim-patchhhh
vim-patch:8.1.1498,8.1.1501: b:changedtick
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 382b4c45c1..6cb1da04be 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -144,7 +144,7 @@ read_buffer( if (!readonlymode && !BUFEMPTY()) { changed(); } else if (retval != FAIL) { - unchanged(curbuf, false); + unchanged(curbuf, false, true); } apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, false, @@ -299,7 +299,7 @@ int open_buffer( || (aborting() && vim_strchr(p_cpo, CPO_INTMOD) != NULL)) { changed(); } else if (retval != FAIL && !read_stdin && !read_fifo) { - unchanged(curbuf, false); + unchanged(curbuf, false, true); } save_file_ff(curbuf); // keep this fileformat @@ -641,13 +641,11 @@ void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last) } } -/* - * Make buffer not contain a file. - */ +/// Make buffer not contain a file. void buf_clear_file(buf_T *buf) { buf->b_ml.ml_line_count = 1; - unchanged(buf, true); + unchanged(buf, true, true); buf->b_p_eol = true; buf->b_start_eol = true; buf->b_p_bomb = false; |