summaryrefslogtreecommitdiff
path: root/src/menu.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-20 22:17:20 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-20 22:17:20 +0000
commitfc1421eb53b17aa58b01a9c07ba2007eb4a1aa4f (patch)
treeaeddd441dc8dc7222c5c1acd2b0841712e833810 /src/menu.c
parent8424a624ce1c38716deabd47f4da23f1e81614bd (diff)
downloadvim-git-fc1421eb53b17aa58b01a9c07ba2007eb4a1aa4f.tar.gz
updated for version 7.0e04v7.0e04
Diffstat (limited to 'src/menu.c')
-rw-r--r--src/menu.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/menu.c b/src/menu.c
index b4f06d242..55fba1fd6 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -2336,20 +2336,23 @@ ex_menutranslate(eap)
{
tp = (menutrans_T *)menutrans_ga.ga_data;
from = vim_strsave(from);
- from_noamp = menu_text(from, NULL, NULL);
- to = vim_strnsave(to, (int)(arg - to));
- if (from != NULL && from_noamp != NULL && to != NULL)
+ if (from != NULL)
{
- tp[menutrans_ga.ga_len].from = from;
- tp[menutrans_ga.ga_len].from_noamp = from_noamp;
- tp[menutrans_ga.ga_len].to = to;
- ++menutrans_ga.ga_len;
- }
- else
- {
- vim_free(from);
- vim_free(from_noamp);
- vim_free(to);
+ from_noamp = menu_text(from, NULL, NULL);
+ to = vim_strnsave(to, (int)(arg - to));
+ if (from_noamp != NULL && to != NULL)
+ {
+ tp[menutrans_ga.ga_len].from = from;
+ tp[menutrans_ga.ga_len].from_noamp = from_noamp;
+ tp[menutrans_ga.ga_len].to = to;
+ ++menutrans_ga.ga_len;
+ }
+ else
+ {
+ vim_free(from);
+ vim_free(from_noamp);
+ vim_free(to);
+ }
}
}
}