diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-12-27 19:00:24 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-12-27 19:00:24 +0100 |
commit | e4862a0fe62261754daf476866ef2aa8586b716c (patch) | |
tree | 6c4e1bc963b5063852d6319ff0b4b013569f6593 /src/ex_cmds.c | |
parent | 179eb567b15a2ed5cf25b45d95d06c7a729d50bc (diff) | |
download | vim-git-e4862a0fe62261754daf476866ef2aa8586b716c.tar.gz |
patch 8.2.2231: when "--remote file" is used "file" is not reloadedv8.2.2231
Problem: When "--remote file" is used "file" is not reloaded.
Solution: When a :drop command is used for a file that is already displayed
in a window and it has not been changed, check if it needs to be
reloaded. (closes #7560)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index a2b60c988..734949c33 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5171,6 +5171,15 @@ ex_drop(exarg_T *eap) { goto_tabpage_win(tp, wp); curwin->w_arg_idx = 0; + if (!bufIsChanged(curbuf)) + { + int save_ar = curbuf->b_p_ar; + + // reload the file if it is newer + curbuf->b_p_ar = TRUE; + buf_check_timestamp(curbuf, FALSE); + curbuf->b_p_ar = save_ar; + } return; } } |