forked from aniani/vim
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)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user