Mercurial > vim
comparison src/testdir/test_excmd.vim @ 20118:252d2bb90394 v8.2.0614
patch 8.2.0614: get ml_get error when deleting a line in 'completefunc'
Commit: https://github.com/vim/vim/commit/ff06f283e3e4b3ec43012dd3b83f8454c98f6639
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 21 22:01:14 2020 +0200
patch 8.2.0614: get ml_get error when deleting a line in 'completefunc'
Problem: Get ml_get error when deleting a line in 'completefunc'. (Yegappan
Lakshmanan)
Solution: Lock the text while evaluating 'completefunc'.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 21 Apr 2020 22:15:04 +0200 |
parents | 12518b40c161 |
children | 6c634e63989c |
comparison
equal
deleted
inserted
replaced
20117:60a0e7ed241d | 20118:252d2bb90394 |
---|---|
352 " Test for running Ex commands when text is locked. | 352 " Test for running Ex commands when text is locked. |
353 " <C-\>e in the command line is used to lock the text | 353 " <C-\>e in the command line is used to lock the text |
354 func Test_run_excmd_with_text_locked() | 354 func Test_run_excmd_with_text_locked() |
355 " :quit | 355 " :quit |
356 let cmd = ":\<C-\>eexecute('quit')\<CR>\<C-C>" | 356 let cmd = ":\<C-\>eexecute('quit')\<CR>\<C-C>" |
357 call assert_fails("call feedkeys(cmd, 'xt')", 'E523:') | 357 call assert_fails("call feedkeys(cmd, 'xt')", 'E565:') |
358 | 358 |
359 " :qall | 359 " :qall |
360 let cmd = ":\<C-\>eexecute('qall')\<CR>\<C-C>" | 360 let cmd = ":\<C-\>eexecute('qall')\<CR>\<C-C>" |
361 call assert_fails("call feedkeys(cmd, 'xt')", 'E523:') | 361 call assert_fails("call feedkeys(cmd, 'xt')", 'E565:') |
362 | 362 |
363 " :exit | 363 " :exit |
364 let cmd = ":\<C-\>eexecute('exit')\<CR>\<C-C>" | 364 let cmd = ":\<C-\>eexecute('exit')\<CR>\<C-C>" |
365 call assert_fails("call feedkeys(cmd, 'xt')", 'E523:') | 365 call assert_fails("call feedkeys(cmd, 'xt')", 'E565:') |
366 | 366 |
367 " :close - should be ignored | 367 " :close - should be ignored |
368 new | 368 new |
369 let cmd = ":\<C-\>eexecute('close')\<CR>\<C-C>" | 369 let cmd = ":\<C-\>eexecute('close')\<CR>\<C-C>" |
370 call assert_equal(2, winnr('$')) | 370 call assert_equal(2, winnr('$')) |
371 close | 371 close |
372 | 372 |
373 call assert_fails("call feedkeys(\":\<C-R>=execute('bnext')\<CR>\", 'xt')", 'E523:') | 373 call assert_fails("call feedkeys(\":\<C-R>=execute('bnext')\<CR>\", 'xt')", 'E565:') |
374 endfunc | 374 endfunc |
375 | 375 |
376 " Test for the :verbose command | 376 " Test for the :verbose command |
377 func Test_verbose_cmd() | 377 func Test_verbose_cmd() |
378 call assert_equal([' verbose=1'], split(execute('verbose set vbs'), "\n")) | 378 call assert_equal([' verbose=1'], split(execute('verbose set vbs'), "\n")) |