Patch 8.2.2166 Problem: Auto format doesn't work when deleting text. Solution: Make "x" trigger auto format. (closes #7504) Files: src/ops.c, src/testdir/test_textformat.vim
*** ../vim-8.2.2165/src/ops.c 2020-11-21 14:16:18.536766447 +0100 --- src/ops.c 2020-12-20 13:01:54.754992944 +0100 *************** *** 938,943 **** --- 938,944 ---- curwin->w_cursor = curpos; // restore curwin->w_cursor (void)do_join(2, FALSE, FALSE, FALSE, FALSE); } + auto_format(FALSE, TRUE); } msgmore(curbuf->b_ml.ml_line_count - old_lcount); *** ../vim-8.2.2165/src/testdir/test_textformat.vim 2020-06-24 13:37:03.162425194 +0200 --- src/testdir/test_textformat.vim 2020-12-20 12:53:34.348529819 +0100 *************** *** 934,939 **** --- 934,951 ---- call assert_equal('g uu uu ', getline(1)[-8:]) call assert_equal(['uu. foo'], getline(2, '$')) + " using backspace or "x" triggers reformat + call setline(1, ['1 2 3 4 5 ', '6 7 8 9']) + set tw=10 + set fo=taw + set bs=indent,eol,start + exe "normal 1G4la\<BS>\<BS>\<Esc>" + call assert_equal(['1 2 4 5 6 ', '7 8 9'], getline(1, 2)) + exe "normal f4xx" + call assert_equal(['1 2 5 6 7 ', '8 9'], getline(1, 2)) + + set tw=0 + set fo& %bw! endfunc *** ../vim-8.2.2165/src/version.c 2020-12-19 22:10:09.861835442 +0100 --- src/version.c 2020-12-20 13:02:11.910940256 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2166, /**/ -- Team-building exercises come in many forms but they all trace their roots back to the prison system. In your typical team-building exercise the employees are subjected to a variety of unpleasant situations until they become either a cohesive team or a ring of car jackers. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- b...@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 /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202012201208.0BKC8CRM1860287%40masaka.moolenaar.net.