mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:9.1.0178: E1513 might be confusing (#27846)
Problem: E1513 might be confusing
(Christoph Thoma)
Solution: reword error message, fix test to not
depend on the actual message
fixes: vim/vim#14189
0a32b8854b
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
bbb68e2a03
commit
b17be231a6
@ -115,7 +115,7 @@ You cannot have two buffers with exactly the same name. This includes the
|
|||||||
path leading to the file.
|
path leading to the file.
|
||||||
|
|
||||||
*E1513* >
|
*E1513* >
|
||||||
Cannot edit buffer. 'winfixbuf' is enabled
|
Cannot switch buffer. 'winfixbuf' is enabled
|
||||||
|
|
||||||
If a window has 'winfixbuf' enabled, you cannot change that window's current
|
If a window has 'winfixbuf' enabled, you cannot change that window's current
|
||||||
buffer. You need to set 'nowinfixbuf' before continuing. You may use [!] to
|
buffer. You need to set 'nowinfixbuf' before continuing. You may use [!] to
|
||||||
|
@ -972,7 +972,7 @@ EXTERN const char e_undobang_cannot_redo_or_move_branch[]
|
|||||||
INIT(= N_("E5767: Cannot use :undo! to redo or move to a different undo branch"));
|
INIT(= N_("E5767: Cannot use :undo! to redo or move to a different undo branch"));
|
||||||
|
|
||||||
EXTERN const char e_winfixbuf_cannot_go_to_buffer[]
|
EXTERN const char e_winfixbuf_cannot_go_to_buffer[]
|
||||||
INIT(= N_("E1513: Cannot edit buffer. 'winfixbuf' is enabled"));
|
INIT(= N_("E1513: Cannot switch buffer. 'winfixbuf' is enabled"));
|
||||||
|
|
||||||
EXTERN const char e_trustfile[] INIT(= N_("E5570: Cannot update trust file: %s"));
|
EXTERN const char e_trustfile[] INIT(= N_("E5570: Cannot update trust file: %s"));
|
||||||
|
|
||||||
|
@ -493,7 +493,7 @@ func Test_browse_edit_fail()
|
|||||||
try
|
try
|
||||||
browse edit! other
|
browse edit! other
|
||||||
call assert_equal(l:other, bufnr())
|
call assert_equal(l:other, bufnr())
|
||||||
catch /E338:/
|
catch /^Vim\%((\a\+)\)\=:E338:/
|
||||||
" Ignore E338, which occurs if console Vim is built with +browse.
|
" Ignore E338, which occurs if console Vim is built with +browse.
|
||||||
" Console Vim without +browse will treat this as a regular :edit.
|
" Console Vim without +browse will treat this as a regular :edit.
|
||||||
endtry
|
endtry
|
||||||
@ -511,7 +511,7 @@ func Test_browse_edit_pass()
|
|||||||
|
|
||||||
try
|
try
|
||||||
browse write other
|
browse write other
|
||||||
catch /E338:/
|
catch /^Vim\%((\a\+)\)\=:E338:/
|
||||||
" Ignore E338, which occurs if console Vim is built with +browse.
|
" Ignore E338, which occurs if console Vim is built with +browse.
|
||||||
" Console Vim without +browse will treat this as a regular :write.
|
" Console Vim without +browse will treat this as a regular :write.
|
||||||
endtry
|
endtry
|
||||||
@ -2532,7 +2532,7 @@ EOF
|
|||||||
|
|
||||||
try
|
try
|
||||||
pyxdo test_winfixbuf_Test_pythonx_pyxdo_set_buffer()
|
pyxdo test_winfixbuf_Test_pythonx_pyxdo_set_buffer()
|
||||||
catch /pynvim\.api\.common\.NvimError: E1513: Cannot edit buffer\. 'winfixbuf' is enabled/
|
catch /pynvim\.api\.common\.NvimError: E1513:/
|
||||||
let l:caught = 1
|
let l:caught = 1
|
||||||
endtry
|
endtry
|
||||||
|
|
||||||
@ -2563,7 +2563,7 @@ func Test_pythonx_pyxfile()
|
|||||||
|
|
||||||
try
|
try
|
||||||
pyxfile file.py
|
pyxfile file.py
|
||||||
catch /pynvim\.api\.common\.NvimError: E1513: Cannot edit buffer\. 'winfixbuf' is enabled/
|
catch /pynvim\.api\.common\.NvimError: E1513:/
|
||||||
let l:caught = 1
|
let l:caught = 1
|
||||||
endtry
|
endtry
|
||||||
|
|
||||||
@ -2596,7 +2596,7 @@ import vim
|
|||||||
buffer = vim.vars["_previous_buffer"]
|
buffer = vim.vars["_previous_buffer"]
|
||||||
vim.current.buffer = vim.buffers[buffer]
|
vim.current.buffer = vim.buffers[buffer]
|
||||||
EOF
|
EOF
|
||||||
catch /pynvim\.api\.common\.NvimError: E1513: Cannot edit buffer\. 'winfixbuf' is enabled/
|
catch /pynvim\.api\.common\.NvimError: E1513:/
|
||||||
let l:caught = 1
|
let l:caught = 1
|
||||||
endtry
|
endtry
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user