diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-12-13 10:56:17 -0300 |
---|---|---|
committer | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-12-13 23:36:11 -0300 |
commit | 0bc40e660c0a74776ace86ad5e393755523c3803 (patch) | |
tree | 94fd08577b5eed003b6f7eb3a7bcafcac7f20a66 /src/nvim/ex_eval.c | |
parent | 77135447e09903b45d1482da45869946212f7904 (diff) | |
download | rneovim-0bc40e660c0a74776ace86ad5e393755523c3803.tar.gz rneovim-0bc40e660c0a74776ace86ad5e393755523c3803.tar.bz2 rneovim-0bc40e660c0a74776ace86ad5e393755523c3803.zip |
Simple refatorings that didn't fit the pattern of the last commit
Diffstat (limited to 'src/nvim/ex_eval.c')
-rw-r--r-- | src/nvim/ex_eval.c | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c index 196f8e6136..b0c4e14f46 100644 --- a/src/nvim/ex_eval.c +++ b/src/nvim/ex_eval.c @@ -246,28 +246,24 @@ int cause_errthrow(char_u *mesg, int severe, int *ignore) plist = &(*plist)->next; elem = xmalloc(sizeof(struct msglist)); - { - elem->msg = vim_strsave(mesg); - { - elem->next = NULL; - elem->throw_msg = NULL; - *plist = elem; - if (plist == msg_list || severe) { - char_u *tmsg; - - /* Skip the extra "Vim " prefix for message "E458". */ - tmsg = elem->msg; - if (STRNCMP(tmsg, "Vim E", 5) == 0 - && VIM_ISDIGIT(tmsg[5]) - && VIM_ISDIGIT(tmsg[6]) - && VIM_ISDIGIT(tmsg[7]) - && tmsg[8] == ':' - && tmsg[9] == ' ') - (*msg_list)->throw_msg = &tmsg[4]; - else - (*msg_list)->throw_msg = tmsg; - } - } + elem->msg = vim_strsave(mesg); + elem->next = NULL; + elem->throw_msg = NULL; + *plist = elem; + if (plist == msg_list || severe) { + char_u *tmsg; + + /* Skip the extra "Vim " prefix for message "E458". */ + tmsg = elem->msg; + if (STRNCMP(tmsg, "Vim E", 5) == 0 + && VIM_ISDIGIT(tmsg[5]) + && VIM_ISDIGIT(tmsg[6]) + && VIM_ISDIGIT(tmsg[7]) + && tmsg[8] == ':' + && tmsg[9] == ' ') + (*msg_list)->throw_msg = &tmsg[4]; + else + (*msg_list)->throw_msg = tmsg; } } return TRUE; |