To: vim_dev@googlegroups.com Subject: Patch 8.2.4026 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4026 Problem: ml_get error with specific win_execute() command. (Sean Dewar) Solution: Check cursor and Visual area are OK. Files: src/evalwindow.c, src/testdir/test_execute_func.vim *** ../vim-8.2.4025/src/evalwindow.c 2022-01-06 13:24:45.789265688 +0000 --- src/evalwindow.c 2022-01-07 14:07:03.743081763 +0000 *************** *** 743,748 **** --- 743,754 ---- // Update the status line if the cursor moved. if (win_valid(wp) && !EQUAL_POS(curpos, wp->w_cursor)) wp->w_redr_status = TRUE; + + // In case the command moved the cursor or changed the Visual area, + // check it is valid. + check_cursor(); + if (VIsual_active) + check_pos(curbuf, &VIsual); } } *** ../vim-8.2.4025/src/testdir/test_execute_func.vim 2022-01-06 13:24:45.793265684 +0000 --- src/testdir/test_execute_func.vim 2022-01-07 14:03:36.655341751 +0000 *************** *** 153,160 **** --- 153,175 ---- call setline(1, ['a', 'b', 'c']) new wincmd p + " start Visual in current window, redraw in other window with fewer lines call feedkeys("G\", 'txn') call win_execute(winnr('#')->win_getid(), 'redraw') + call feedkeys("\", 'txn') + bwipe! + bwipe! + + enew + new + call setline(1, ['a', 'b', 'c']) + let winid = win_getid() + wincmd p + " start Visual in current window, extend it in other window with more lines + call feedkeys("\", 'txn') + call win_execute(winid, 'call feedkeys("G\", ''txn'')') + redraw + bwipe! bwipe! endfunc *** ../vim-8.2.4025/src/version.c 2022-01-07 13:38:20.423442096 +0000 --- src/version.c 2022-01-07 13:57:13.623725517 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4026, /**/ -- hundred-and-one symptoms of being an internet addict: 243. You unsuccessfully try to download a pizza from www.dominos.com. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///