Merge pull request #7071 from jbradaric/vim-8.0.0075

vim-patch:8.0.0075
This commit is contained in:
James McCoy 2017-07-26 07:09:30 -04:00 committed by GitHub
commit 0d24af8112
4 changed files with 23 additions and 27 deletions

View File

@ -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;

View File

@ -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;

View File

@ -89,27 +89,28 @@ 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

View File

@ -654,7 +654,7 @@ static const int included_patches[] = {
78,
// 77 NA
// 76 NA
// 75,
75,
// 74,
73,
// 72 NA