To: vim_dev@googlegroups.com Subject: Patch 8.2.2231 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.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) Files: src/ex_cmds.c, src/testdir/test_clientserver.vim *** ../vim-8.2.2230/src/ex_cmds.c 2020-12-21 20:32:40.126103572 +0100 --- src/ex_cmds.c 2020-12-27 18:59:28.834629073 +0100 *************** *** 5171,5176 **** --- 5171,5185 ---- { 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; } } *** ../vim-8.2.2230/src/testdir/test_clientserver.vim 2020-11-22 14:23:57.059233488 +0100 --- src/testdir/test_clientserver.vim 2020-12-27 18:55:06.131376114 +0100 *************** *** 73,78 **** --- 73,87 ---- call assert_fails('call remote_send("XXX", ":let testvar = ''yes''\")', 'E241:') + call writefile(['one'], 'Xclientfile') + let cmd = GetVimProg() .. ' --servername ' .. name .. ' --remote Xclientfile' + call system(cmd) + call WaitForAssert({-> assert_equal('Xclientfile', remote_expr(name, "bufname()", "", 2))}) + call WaitForAssert({-> assert_equal('one', remote_expr(name, "getline(1)", "", 2))}) + call writefile(['one', 'two'], 'Xclientfile') + call system(cmd) + call WaitForAssert({-> assert_equal('two', remote_expr(name, "getline(2)", "", 2))}) + " Expression evaluated locally. if v:servername == '' eval 'MYSELF'->remote_startserver() *** ../vim-8.2.2230/src/version.c 2020-12-27 18:03:18.688859822 +0100 --- src/version.c 2020-12-27 18:28:53.303366128 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2231, /**/ -- Due knot trussed yore spell chequer two fined awl miss steaks. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///