0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 9.1.0178: E1513 might be confusing

Problem:  E1513 might be confusing
          (Christoph Thoma)
Solution: reword error message, fix test to not
          depend on the actual message

fixes: #14189

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2024-03-13 20:59:27 +01:00
parent 8c55d60658
commit 0a32b8854b
4 changed files with 10 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
*message.txt* For Vim version 9.1. Last change: 2024 Mar 05 *message.txt* For Vim version 9.1. Last change: 2024 Mar 13
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -123,7 +123,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

View File

@@ -3614,4 +3614,4 @@ EXTERN char e_wrong_number_of_characters_for_field_str[]
EXTERN char e_wrong_character_width_for_field_str[] EXTERN char e_wrong_character_width_for_field_str[]
INIT(= N_("E1512: Wrong character width for field \"%s\"")); INIT(= N_("E1512: Wrong character width for field \"%s\""));
EXTERN char e_winfixbuf_cannot_go_to_buffer[] EXTERN 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"));

View File

@@ -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 /Vim(pyxdo):vim.error: Vim:E1513: Cannot edit buffer. 'winfixbuf' is enabled/ catch /Vim\%((\a\+)\)\=: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 /Vim(pyxfile):vim.error: Vim:E1513: Cannot edit buffer. 'winfixbuf' is enabled/ catch /Vim\%((\a\+)\)\=: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 /Vim(pythonx):vim\.error: Vim:E1513: Cannot edit buffer. 'winfixbuf' is enabled/ catch /Vim\%((\a\+)\)\=:E1513:/
let l:caught = 1 let l:caught = 1
endtry endtry

View File

@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
178,
/**/ /**/
177, 177,
/**/ /**/