diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-10-06 00:07:40 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-10-06 17:45:19 -0400 |
commit | 779b188db6ade50f87565a8805ee7eee6bf0a2a7 (patch) | |
tree | 7e40f351818ba5466f1586ad1e402e2c613c5b2e | |
parent | 3ad6fb804f0f382fac8f9810c3862b2c500e9c24 (diff) | |
download | rneovim-779b188db6ade50f87565a8805ee7eee6bf0a2a7.tar.gz rneovim-779b188db6ade50f87565a8805ee7eee6bf0a2a7.tar.bz2 rneovim-779b188db6ade50f87565a8805ee7eee6bf0a2a7.zip |
vim-patch:8.1.2401: :cexpr does not handle | in expression
Problem: :cexpr does not handle | in expression.
Solution: Remove EX_TRLBAR and set nextcmd pointer.
https://github.com/vim/vim/commit/88a3e2b2ac33e3bb4b7cf9132eb75db051e8f4ed
-rw-r--r-- | src/nvim/ex_cmds.lua | 12 | ||||
-rw-r--r-- | src/nvim/quickfix.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 12 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index a01f92df27..d62b00fee1 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -337,7 +337,7 @@ return { }, { command='caddexpr', - flags=bit.bor(NEEDARG, WORD1, NOTRLCOM, TRLBAR), + flags=bit.bor(NEEDARG, WORD1, NOTRLCOM), addr_type=ADDR_LINES, func='ex_cexpr', }, @@ -409,7 +409,7 @@ return { }, { command='cexpr', - flags=bit.bor(NEEDARG, WORD1, NOTRLCOM, TRLBAR, BANG), + flags=bit.bor(NEEDARG, WORD1, NOTRLCOM, BANG), addr_type=ADDR_LINES, func='ex_cexpr', }, @@ -447,7 +447,7 @@ return { }, { command='cgetexpr', - flags=bit.bor(NEEDARG, WORD1, NOTRLCOM, TRLBAR), + flags=bit.bor(NEEDARG, WORD1, NOTRLCOM), addr_type=ADDR_LINES, func='ex_cexpr', }, @@ -1299,7 +1299,7 @@ return { }, { command='laddexpr', - flags=bit.bor(NEEDARG, WORD1, NOTRLCOM, TRLBAR), + flags=bit.bor(NEEDARG, WORD1, NOTRLCOM), addr_type=ADDR_LINES, func='ex_cexpr', }, @@ -1389,7 +1389,7 @@ return { }, { command='lexpr', - flags=bit.bor(NEEDARG, WORD1, NOTRLCOM, TRLBAR, BANG), + flags=bit.bor(NEEDARG, WORD1, NOTRLCOM, BANG), addr_type=ADDR_LINES, func='ex_cexpr', }, @@ -1427,7 +1427,7 @@ return { }, { command='lgetexpr', - flags=bit.bor(NEEDARG, WORD1, NOTRLCOM, TRLBAR), + flags=bit.bor(NEEDARG, WORD1, NOTRLCOM), addr_type=ADDR_LINES, func='ex_cexpr', }, diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 0c9902aaec..7d4f52af34 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -6377,7 +6377,7 @@ void ex_cexpr(exarg_T *eap) // Evaluate the expression. When the result is a string or a list we can // use it to fill the errorlist. typval_T tv; - if (eval0(eap->arg, &tv, NULL, true) != FAIL) { + if (eval0(eap->arg, &tv, &eap->nextcmd, true) != FAIL) { if ((tv.v_type == VAR_STRING && tv.vval.v_string != NULL) || tv.v_type == VAR_LIST) { incr_quickfix_busy(); diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index dcebbe690f..42ca0fe1d3 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -95,7 +95,7 @@ func XlistTests(cchar) " Populate the list and then try Xgetexpr ['non-error 1', 'Xtestfile1:1:3:Line1', \ 'non-error 2', 'Xtestfile2:2:2:Line2', - \ 'non-error 3', 'Xtestfile3:3:1:Line3'] + \ 'non-error| 3', 'Xtestfile3:3:1:Line3'] " List only valid entries let l = split(execute('Xlist', ''), "\n") @@ -107,7 +107,7 @@ func XlistTests(cchar) let l = split(execute('Xlist!', ''), "\n") call assert_equal([' 1: non-error 1', ' 2 Xtestfile1:1 col 3: Line1', \ ' 3: non-error 2', ' 4 Xtestfile2:2 col 2: Line2', - \ ' 5: non-error 3', ' 6 Xtestfile3:3 col 1: Line3'], l) + \ ' 5: non-error| 3', ' 6 Xtestfile3:3 col 1: Line3'], l) " List a range of errors let l = split(execute('Xlist 3,6', ''), "\n") @@ -507,7 +507,7 @@ func Xtest_browse(cchar) Xexpr "" call assert_equal(0, g:Xgetlist({'idx' : 0}).idx) call assert_equal(0, g:Xgetlist({'size' : 0}).size) - Xaddexpr ['foo', 'bar', 'baz', 'quux', 'shmoo'] + Xaddexpr ['foo', 'bar', 'baz', 'quux', 'sh|moo'] call assert_equal(5, g:Xgetlist({'size' : 0}).size) Xlast call assert_equal(5, g:Xgetlist({'idx' : 0}).idx) @@ -4067,13 +4067,13 @@ func Test_search_in_dirstack() \ "Xfile3:1:X3_L1\n" . \ "Entering dir c\n" . \ "Xfile4:2:X4_L2\n" . - \ "Leaving dir c\n" . - \ "Leaving dir Xtestdir\n" + \ "Leaving dir c\n" set efm=%DEntering\ dir\ %f,%XLeaving\ dir\ %f,%f:%l:%m - cexpr lines + cexpr lines .. "Leaving dir Xtestdir|\n" | let next = 1 call assert_equal(11, getqflist({'size' : 0}).size) call assert_equal(4, getqflist({'idx' : 0}).idx) call assert_equal('X2_L2', getline('.')) + call assert_equal(1, next) cnext call assert_equal(6, getqflist({'idx' : 0}).idx) call assert_equal('X1_L2', getline('.')) |