To: vim_dev@googlegroups.com Subject: Patch 8.0.1419 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1419 Problem: Cursor column is not updated after ]s. (Gary Johnson) Solution: Set the curswant flag. Files: src/testdir/test_spell.vim, src/normal.c *** ../vim-8.0.1418/src/testdir/test_spell.vim 2017-10-27 00:56:57.205291177 +0200 --- src/testdir/test_spell.vim 2017-12-21 20:24:51.729317981 +0100 *************** *** 28,33 **** --- 28,64 ---- set nospell endfunc + func Test_curswant() + new + call setline(1, ['Another plong line', 'abcdefghijklmnopq']) + set spell wrapscan + normal 0]s + call assert_equal('plong', expand('')) + normal j + call assert_equal(9, getcurpos()[2]) + normal 0[s + call assert_equal('plong', expand('')) + normal j + call assert_equal(9, getcurpos()[2]) + + normal 0]S + call assert_equal('plong', expand('')) + normal j + call assert_equal(9, getcurpos()[2]) + normal 0[S + call assert_equal('plong', expand('')) + normal j + call assert_equal(9, getcurpos()[2]) + + normal 1G0 + call assert_equal('plong', spellbadword()[0]) + normal j + call assert_equal(9, getcurpos()[2]) + + bwipe! + set nospell + endfunc + func Test_z_equal_on_invalid_utf8_word() split set spell *** ../vim-8.0.1418/src/normal.c 2017-12-19 12:27:19.378404474 +0100 --- src/normal.c 2017-12-21 20:22:36.122236392 +0100 *************** *** 6814,6819 **** --- 6814,6821 ---- clearopbeep(cap->oap); break; } + else + curwin->w_set_curswant = TRUE; # ifdef FEAT_FOLDING if (cap->oap->op_type == OP_NOP && (fdo_flags & FDO_SEARCH) && KeyTyped) foldOpenCursor(); *** ../vim-8.0.1418/src/evalfunc.c 2017-12-19 11:54:59.726923324 +0100 --- src/evalfunc.c 2017-12-21 20:25:21.725115408 +0100 *************** *** 11173,11179 **** --- 11173,11182 ---- /* Find the start and length of the badly spelled word. */ len = spell_move_to(curwin, FORWARD, TRUE, TRUE, &attr); if (len != 0) + { word = ml_get_cursor(); + curwin->w_set_curswant = TRUE; + } } else if (curwin->w_p_spell && *curbuf->b_s.b_p_spl != NUL) { *** ../vim-8.0.1418/src/version.c 2017-12-20 22:32:16.689158612 +0100 --- src/version.c 2017-12-21 20:26:16.276747465 +0100 *************** *** 773,774 **** --- 773,776 ---- { /* Add new patch number below this line */ + /**/ + 1419, /**/ -- hundred-and-one symptoms of being an internet addict: 144. You eagerly await the update of the "Cool Site of the Day." /// 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 ///