diff options
author | James McCoy <jamessan@jamessan.com> | 2017-07-26 07:09:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-26 07:09:30 -0400 |
commit | 0d24af8112b41f0ff201e35135ed7bcef9fc8415 (patch) | |
tree | 5f5763470275b9ec3433703acb1ab4cc81fabfea /src | |
parent | 86f0cd7902bc232ea51b06b2c4dd4758a479b3b4 (diff) | |
parent | 09470eb673e7582e6103173754fff85ee0e1d232 (diff) | |
download | rneovim-0d24af8112b41f0ff201e35135ed7bcef9fc8415.tar.gz rneovim-0d24af8112b41f0ff201e35135ed7bcef9fc8415.tar.bz2 rneovim-0d24af8112b41f0ff201e35135ed7bcef9fc8415.zip |
Merge pull request #7071 from jbradaric/vim-8.0.0075
vim-patch:8.0.0075
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_docmd.c | 2 | ||||
-rw-r--r-- | src/nvim/ex_eval.c | 19 | ||||
-rw-r--r-- | src/nvim/ex_eval.h | 27 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
4 files changed, 23 insertions, 27 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index d2eb881bc6..61c35a494b 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -844,8 +844,6 @@ int do_cmdline(char_u *cmdline, LineGetter fgetline, break; case ET_INTERRUPT: break; - default: - p = vim_strsave((char_u *)_(e_internal)); } saved_sourcing_name = sourcing_name; diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c index 5d664b94a8..c029df2f13 100644 --- a/src/nvim/ex_eval.c +++ b/src/nvim/ex_eval.c @@ -374,10 +374,9 @@ int do_intthrow(struct condstack *cstack) return TRUE; } -/* - * Get an exception message that is to be stored in current_exception->value. - */ -char_u *get_exception_string(void *value, int type, char_u *cmdname, int *should_free) +// Get an exception message that is to be stored in current_exception->value. +char_u *get_exception_string(void *value, except_type_T type, char_u *cmdname, + int *should_free) { char_u *ret, *mesg; char_u *p, *val; @@ -435,13 +434,11 @@ char_u *get_exception_string(void *value, int type, char_u *cmdname, int *should } -/* - * Throw a new exception. Return FAIL when out of memory or it was tried to - * throw an illegal user exception. "value" is the exception string for a - * user or interrupt exception, or points to a message list in case of an - * error exception. - */ -static int throw_exception(void *value, int type, char_u *cmdname) +// Throw a new exception. Return FAIL when out of memory or it was tried to +// throw an illegal user exception. "value" is the exception string for a +// user or interrupt exception, or points to a message list in case of an +// error exception. +static int throw_exception(void *value, except_type_T type, char_u *cmdname) { except_T *excp; int should_free; diff --git a/src/nvim/ex_eval.h b/src/nvim/ex_eval.h index f61e01d25b..d5f8737bf3 100644 --- a/src/nvim/ex_eval.h +++ b/src/nvim/ex_eval.h @@ -89,28 +89,29 @@ struct msglist { struct msglist *next; /* next of several messages in a row */ }; +// The exception types. +typedef enum +{ + ET_USER, // exception caused by ":throw" command + ET_ERROR, // error exception + ET_INTERRUPT // interrupt exception triggered by Ctrl-C +} except_type_T; + /* * Structure describing an exception. * (don't use "struct exception", it's used by the math library). */ typedef struct vim_exception except_T; struct vim_exception { - int type; /* exception type */ - char_u *value; /* exception value */ - struct msglist *messages; /* message(s) causing error exception */ - char_u *throw_name; /* name of the throw point */ - linenr_T throw_lnum; /* line number of the throw point */ - except_T *caught; /* next exception on the caught stack */ + except_type_T type; // exception type + char_u *value; // exception value + struct msglist *messages; // message(s) causing error exception + char_u *throw_name; // name of the throw point + linenr_T throw_lnum; // line number of the throw point + except_T *caught; // next exception on the caught stack }; /* - * The exception types. - */ -#define ET_USER 0 /* exception caused by ":throw" command */ -#define ET_ERROR 1 /* error exception */ -#define ET_INTERRUPT 2 /* interrupt exception triggered by Ctrl-C */ - -/* * Structure to save the error/interrupt/exception state between calls to * enter_cleanup() and leave_cleanup(). Must be allocated as an automatic * variable by the (common) caller of these functions. diff --git a/src/nvim/version.c b/src/nvim/version.c index bc478c4123..34171a1bd3 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -654,7 +654,7 @@ static const int included_patches[] = { 78, // 77 NA // 76 NA - // 75, + 75, // 74, 73, // 72 NA |