aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-01-26 16:19:02 +0100
committerGitHub <noreply@github.com>2019-01-26 16:19:02 +0100
commit2132bbf9199bf019602584935965c495b1dc180b (patch)
tree22612a2b3a95731735df5bb498efa4638f41dac4 /src
parentec5a4d862d71729569acf4afac4c371a09edc314 (diff)
parent64f91fa1fd426a7187b5b51b4841f121071554fe (diff)
downloadrneovim-2132bbf9199bf019602584935965c495b1dc180b.tar.gz
rneovim-2132bbf9199bf019602584935965c495b1dc180b.tar.bz2
rneovim-2132bbf9199bf019602584935965c495b1dc180b.zip
Merge #9552 from janlazo/vim-8.0.0411
Diffstat (limited to 'src')
-rw-r--r--src/nvim/menu.c4
-rw-r--r--src/nvim/testdir/test_menu.vim20
2 files changed, 22 insertions, 2 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c
index 1c54db10eb..074feb9906 100644
--- a/src/nvim/menu.c
+++ b/src/nvim/menu.c
@@ -1520,7 +1520,7 @@ static char_u *menutrans_lookup(char_u *name, int len)
char_u *dname;
for (int i = 0; i < menutrans_ga.ga_len; i++) {
- if (STRNCMP(name, tp[i].from, len) == 0 && tp[i].from[len] == NUL) {
+ if (STRNICMP(name, tp[i].from, len) == 0 && tp[i].from[len] == NUL) {
return tp[i].to;
}
}
@@ -1531,7 +1531,7 @@ static char_u *menutrans_lookup(char_u *name, int len)
dname = menu_text(name, NULL, NULL);
name[len] = c;
for (int i = 0; i < menutrans_ga.ga_len; i++) {
- if (STRCMP(dname, tp[i].from_noamp) == 0) {
+ if (STRICMP(dname, tp[i].from_noamp) == 0) {
xfree(dname);
return tp[i].to;
}
diff --git a/src/nvim/testdir/test_menu.vim b/src/nvim/testdir/test_menu.vim
index af18760065..5f84c622ab 100644
--- a/src/nvim/testdir/test_menu.vim
+++ b/src/nvim/testdir/test_menu.vim
@@ -1,9 +1,29 @@
" Test that the system menu can be loaded.
+if !has('menu')
+ finish
+endif
+
func Test_load_menu()
try
source $VIMRUNTIME/menu.vim
catch
call assert_report('error while loading menus: ' . v:exception)
endtry
+ source $VIMRUNTIME/delmenu.vim
+endfunc
+
+func Test_translate_menu()
+ if !has('multi_lang')
+ return
+ endif
+ if !filereadable($VIMRUNTIME . '/lang/menu_de_de.latin1.vim')
+ throw 'Skipped: translated menu not found'
+ endif
+
+ set langmenu=de_de
+ source $VIMRUNTIME/menu.vim
+ call assert_match('browse confirm w', execute(':menu Datei.Speichern'))
+
+ source $VIMRUNTIME/delmenu.vim
endfunc