Mercurial > vim
comparison src/testdir/test_ex_mode.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 | 031184ace7c5 |
children | 213fb059e02e |
comparison
equal
deleted
inserted
replaced
20117:60a0e7ed241d | 20118:252d2bb90394 |
---|---|
156 endfunc | 156 endfunc |
157 | 157 |
158 func Test_ex_mode_errors() | 158 func Test_ex_mode_errors() |
159 " Not allowed to enter ex mode when text is locked | 159 " Not allowed to enter ex mode when text is locked |
160 au InsertCharPre <buffer> normal! gQ<CR> | 160 au InsertCharPre <buffer> normal! gQ<CR> |
161 let caught_e523 = 0 | 161 let caught_e565 = 0 |
162 try | 162 try |
163 call feedkeys("ix\<esc>", 'xt') | 163 call feedkeys("ix\<esc>", 'xt') |
164 catch /^Vim\%((\a\+)\)\=:E523/ " catch E523 | 164 catch /^Vim\%((\a\+)\)\=:E565/ " catch E565 |
165 let caught_e523 = 1 | 165 let caught_e565 = 1 |
166 endtry | 166 endtry |
167 call assert_equal(1, caught_e523) | 167 call assert_equal(1, caught_e565) |
168 au! InsertCharPre | 168 au! InsertCharPre |
169 endfunc | 169 endfunc |
170 | 170 |
171 " vim: shiftwidth=2 sts=2 expandtab | 171 " vim: shiftwidth=2 sts=2 expandtab |