To: vim_dev@googlegroups.com Subject: Patch 8.2.3467 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3467 Problem: CursorHoldI event interferes with "CTRL-G U". (Naohiro Ono) Solution: Restore the flag for "CTRL-G U" after triggering CursorHoldI. (closes #8937) Files: src/edit.c, src/testdir/test_autocmd.vim *** ../vim-8.2.3466/src/edit.c 2021-09-16 21:31:48.023014473 +0100 --- src/edit.c 2021-10-03 16:20:28.237262059 +0100 *************** *** 1057,1062 **** --- 1057,1065 ---- case K_CURSORHOLD: // Didn't type something for a while. ins_apply_autocmds(EVENT_CURSORHOLDI); did_cursorhold = TRUE; + // If CTRL-G U was used apply it to the next typed key. + if (dont_sync_undo == TRUE) + dont_sync_undo = MAYBE; break; #ifdef FEAT_GUI_MSWIN *** ../vim-8.2.3466/src/testdir/test_autocmd.vim 2021-09-22 13:18:09.313222517 +0100 --- src/testdir/test_autocmd.vim 2021-10-03 16:19:25.383901846 +0100 *************** *** 100,105 **** --- 100,121 ---- set updatetime& endfunc + func Test_cursorhold_insert_ctrl_g_U() + au CursorHoldI * : + set updatetime=20 + new + call timer_start(100, { -> feedkeys("\foo\", 't') }) + call feedkeys("i()\U", 'tx!') + sleep 200m + call assert_equal('(foo)', getline(1)) + undo + call assert_equal('', getline(1)) + + bwipe! + au! CursorHoldI + set updatetime& + endfunc + func Test_OptionSet_modeline() call test_override('starting', 1) au! OptionSet *** ../vim-8.2.3466/src/version.c 2021-10-03 15:19:09.821731156 +0100 --- src/version.c 2021-10-03 16:19:53.336507133 +0100 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 3467, /**/ -- I AM THANKFUL... ...for the mess to clean after a party because it means I have been surrounded by friends. /// 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 ///