Mercurial > vim
comparison src/ex_cmds.c @ 23376:0d79d18f1c69 v8.2.2231
patch 8.2.2231: when "--remote file" is used "file" is not reloaded
Commit: https://github.com/vim/vim/commit/e4862a0fe62261754daf476866ef2aa8586b716c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 27 19:00:24 2020 +0100
patch 8.2.2231: when "--remote file" is used "file" is not reloaded
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 27 Dec 2020 19:15:03 +0100 |
parents | 10bbff53d3d1 |
children | bb29b09902d5 |
comparison
equal
deleted
inserted
replaced
23375:d1e50afeccb8 | 23376:0d79d18f1c69 |
---|---|
5169 { | 5169 { |
5170 if (wp->w_buffer == buf) | 5170 if (wp->w_buffer == buf) |
5171 { | 5171 { |
5172 goto_tabpage_win(tp, wp); | 5172 goto_tabpage_win(tp, wp); |
5173 curwin->w_arg_idx = 0; | 5173 curwin->w_arg_idx = 0; |
5174 if (!bufIsChanged(curbuf)) | |
5175 { | |
5176 int save_ar = curbuf->b_p_ar; | |
5177 | |
5178 // reload the file if it is newer | |
5179 curbuf->b_p_ar = TRUE; | |
5180 buf_check_timestamp(curbuf, FALSE); | |
5181 curbuf->b_p_ar = save_ar; | |
5182 } | |
5174 return; | 5183 return; |
5175 } | 5184 } |
5176 } | 5185 } |
5177 | 5186 |
5178 /* | 5187 /* |