summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-09-13 20:26:32 +0000
committerBram Moolenaar <Bram@vim.org>2004-09-13 20:26:32 +0000
commitc0197e2815208269fa9ba2fba95230138ec39ceb (patch)
tree21db1c3acd16fb095a8e34ce2e15ed87275cbd79 /src
parent15d0a8c77dad867b69822e2fd8f9f6bbcf765c48 (diff)
downloadvim-git-c0197e2815208269fa9ba2fba95230138ec39ceb.tar.gz
updated for version 7.0016v7.0016
Diffstat (limited to 'src')
-rw-r--r--src/Make_ming.mak4
-rw-r--r--src/buffer.c88
-rw-r--r--src/eval.c59
-rw-r--r--src/ex_cmds.h2
-rw-r--r--src/ex_docmd.c14
-rw-r--r--src/ex_eval.c145
-rw-r--r--src/fileio.c4
-rw-r--r--src/gui_kde_wid.cc53
-rw-r--r--src/mark.c85
-rw-r--r--src/misc1.c8
-rw-r--r--src/normal.c7
-rw-r--r--src/option.c20
-rw-r--r--src/os_riscos.c2
-rw-r--r--src/os_win32.c6
-rw-r--r--src/po/sv.po12
-rw-r--r--src/proto/ex_eval.pro2
-rw-r--r--src/proto/mark.pro1
-rw-r--r--src/proto/misc1.pro2
-rw-r--r--src/regexp.c186
-rw-r--r--src/structs.h11
-rw-r--r--src/syntax.c13
-rw-r--r--src/testdir/test.ok92
-rw-r--r--src/testdir/test24.inbin330 -> 890 bytes
-rw-r--r--src/testdir/test24.ok12
-rw-r--r--src/testdir/test44.in11
-rw-r--r--src/testdir/test44.ok5
-rw-r--r--src/vim.h1
27 files changed, 746 insertions, 99 deletions
diff --git a/src/Make_ming.mak b/src/Make_ming.mak
index e292817c0..2c8755cac 100644
--- a/src/Make_ming.mak
+++ b/src/Make_ming.mak
@@ -117,7 +117,7 @@ endif
# c:/windows/system32 isn't a good idea, use some other dir;
# to build you can put them in temp dir)
ifndef MZSCHEME_LIBDIR
-MZSCHEME_LIBDIR=$(MZSCHEME)
+MZSCHEME_LIBDIR=-L$(MZSCHEME)
endif
endif
@@ -510,7 +510,7 @@ uninstal.exe: uninstal.c
$(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB)
$(TARGET): $(OUTDIR) $(OBJ)
- $(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid -L $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(RUBYLIB)
+ $(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(RUBYLIB)
upx: exes
upx gvim.exe
diff --git a/src/buffer.c b/src/buffer.c
index 9f29b2751..cfca9394e 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -565,6 +565,7 @@ buf_freeall(buf, del_buf, wipe_buf)
#ifdef FEAT_SYN_HL
syntax_clear(buf); /* reset syntax info */
#endif
+ buf->b_flags &= ~BF_READERR; /* a read error is no longer relevant */
}
/*
@@ -670,17 +671,23 @@ goto_buffer(eap, start, dir, count)
&& (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
if (swap_exists_action == SEA_QUIT && *eap->cmd == 's')
{
- int old_got_int = got_int;
+# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
+ cleanup_T cs;
- /* Quitting means closing the split window, nothing else.
- * Reset got_int here, because it causes aborting() to return TRUE
- * which breaks closing a window. */
- got_int = FALSE;
+ /* Reset the error/interrupt/exception state here so that
+ * aborting() returns FALSE when closing a window. */
+ enter_cleanup(&cs);
+# endif
+ /* Quitting means closing the split window, nothing else. */
win_close(curwin, TRUE);
-
- got_int |= old_got_int;
swap_exists_action = SEA_NONE;
+
+# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
+ /* Restore the error/interrupt/exception state if not discarded by a
+ * new aborting error, interrupt, or uncaught exception. */
+ leave_cleanup(&cs);
+# endif
}
else
handle_swap_exists(old_curbuf);
@@ -697,37 +704,58 @@ goto_buffer(eap, start, dir, count)
handle_swap_exists(old_curbuf)
buf_T *old_curbuf;
{
- int old_got_int = got_int;
-
- /* Reset got_int here, because it causes aborting() to return TRUE which
- * breaks closing a buffer. */
- got_int = FALSE;
+# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
+ cleanup_T cs;
+# endif
if (swap_exists_action == SEA_QUIT)
{
+# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
+ /* Reset the error/interrupt/exception state here so that
+ * aborting() returns FALSE when closing a buffer. */
+ enter_cleanup(&cs);
+# endif
+
/* User selected Quit at ATTENTION prompt. Go back to previous
* buffer. If that buffer is gone or the same as the current one,
* open a new, empty buffer. */
swap_exists_action = SEA_NONE; /* don't want it again */
close_buffer(curwin, curbuf, DOBUF_UNLOAD);
if (!buf_valid(old_curbuf) || old_curbuf == curbuf)
- old_curbuf = buflist_new(NULL, NULL, 1L,
- BLN_CURBUF | BLN_LISTED | BLN_FORCE);
+ old_curbuf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED);
if (old_curbuf != NULL)
enter_buffer(old_curbuf);
/* If "old_curbuf" is NULL we are in big trouble here... */
+
+# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
+ /* Restore the error/interrupt/exception state if not discarded by a
+ * new aborting error, interrupt, or uncaught exception. */
+ leave_cleanup(&cs);
+# endif
}
else if (swap_exists_action == SEA_RECOVER)
{
+# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
+ /* Reset the error/interrupt/exception state here so that
+ * aborting() returns FALSE when closing a buffer. */
+ enter_cleanup(&cs);
+# endif
+
/* User selected Recover at ATTENTION prompt. */
msg_scroll = TRUE;
ml_recover();
MSG_PUTS("\n"); /* don't overwrite the last message */
cmdline_row = msg_row;
do_modelines(FALSE);
+
+# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
+ /* Restore the error/interrupt/exception state if not discarded by a
+ * new aborting error, interrupt, or uncaught exception. */
+ leave_cleanup(&cs);
+# endif
}
swap_exists_action = SEA_NONE;
- got_int |= old_got_int;
+
}
#endif
@@ -1347,11 +1375,13 @@ enter_buffer(buf)
/* Make sure the buffer is loaded. */
if (curbuf->b_ml.ml_mfp == NULL) /* need to load the file */
{
+#ifdef FEAT_AUTOCMD
/* If there is no filetype, allow for detecting one. Esp. useful for
* ":ball" used in a autocommand. If there already is a filetype we
* might prefer to keep it. */
if (*curbuf->b_p_ft == NUL)
did_filetype = FALSE;
+#endif
open_buffer(FALSE, NULL);
}
@@ -1408,7 +1438,6 @@ enter_buffer(buf)
* If (flags & BLN_CURBUF) is TRUE, may use current buffer.
* If (flags & BLN_LISTED) is TRUE, add new buffer to buffer list.
* If (flags & BLN_DUMMY) is TRUE, don't count it as a real buffer.
- * If (flags & BLN_FORCE) is TRUE, don't abort on an error.
* This is the ONLY way to create a new buffer.
*/
static int top_file_num = 1; /* highest file number */
@@ -1484,7 +1513,7 @@ buflist_new(ffname, sfname, lnum, flags)
apply_autocmds(EVENT_BUFWIPEOUT, NULL, NULL, FALSE, curbuf);
# ifdef FEAT_EVAL
/* autocmds may abort script processing */
- if (!(flags & BLN_FORCE) && aborting())
+ if (aborting())
return NULL;
# endif
#endif
@@ -1538,7 +1567,7 @@ buflist_new(ffname, sfname, lnum, flags)
return NULL;
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
/* autocmds may abort script processing */
- if (!(flags & BLN_FORCE) && aborting())
+ if (aborting())
return NULL;
#endif
/* buf->b_nwindows = 0; why was this here? */
@@ -1615,7 +1644,7 @@ buflist_new(ffname, sfname, lnum, flags)
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf);
# ifdef FEAT_EVAL
/* autocmds may abort script processing */
- if (!(flags & BLN_FORCE) && aborting())
+ if (aborting())
return NULL;
# endif
}
@@ -4262,18 +4291,25 @@ ex_buffer_all(eap)
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
if (swap_exists_action == SEA_QUIT)
{
- int old_got_int = got_int;
+# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
+ cleanup_T cs;
- /* User selected Quit at ATTENTION prompt; close this window.
- * Reset got_int here, because it causes aborting() to return
- * TRUE which breaks closing a window. */
- got_int = FALSE;
+ /* Reset the error/interrupt/exception state here so that
+ * aborting() returns FALSE when closing a window. */
+ enter_cleanup(&cs);
+# endif
+ /* User selected Quit at ATTENTION prompt; close this window. */
win_close(curwin, TRUE);
--open_wins;
-
- got_int |= old_got_int;
swap_exists_action = SEA_NONE;
+
+# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
+ /* Restore the error/interrupt/exception state if not
+ * discarded by a new aborting error, interrupt, or uncaught
+ * exception. */
+ leave_cleanup(&cs);
+# endif
}
else
handle_swap_exists(NULL);
diff --git a/src/eval.c b/src/eval.c
index 756c5fe75..df83da5a8 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2933,7 +2933,7 @@ static struct fst
{"synID", 3, 3, f_synID},
{"synIDattr", 2, 3, f_synIDattr},
{"synIDtrans", 1, 1, f_synIDtrans},
- {"system", 1, 1, f_system},
+ {"system", 1, 2, f_system},
{"tempname", 0, 0, f_tempname},
{"tolower", 1, 1, f_tolower},
{"toupper", 1, 1, f_toupper},
@@ -7570,16 +7570,52 @@ f_system(argvars, retvar)
VAR argvars;
VAR retvar;
{
+ char_u *res = NULL;
char_u *p;
+ char_u *infile = NULL;
+ char_u buf[NUMBUFLEN];
+ int err = FALSE;
+ FILE *fd;
+
+ if (argvars[1].var_type != VAR_UNKNOWN)
+ {
+ /*
+ * Write the string to a temp file, to be used for input of the shell
+ * command.
+ */
+ if ((infile = vim_tempname('i')) == NULL)
+ {
+ EMSG(_(e_notmp));
+ return;
+ }
+
+ fd = mch_fopen((char *)infile, WRITEBIN);
+ if (fd == NULL)
+ {
+ EMSG2(_(e_notopen), infile);
+ goto done;
+ }
+ p = get_var_string_buf(&argvars[1], buf);
+ if (fwrite(p, STRLEN(p), 1, fd) != 1)
+ err = TRUE;
+ if (fclose(fd) != 0)
+ err = TRUE;
+ if (err)
+ {
+ EMSG(_("E677: Error writing temp file"));
+ goto done;
+ }
+ }
+
+ res = get_cmd_output(get_var_string(&argvars[0]), infile, SHELL_SILENT);
- p = get_cmd_output(get_var_string(&argvars[0]), SHELL_SILENT);
#ifdef USE_CR
/* translate <CR> into <NL> */
- if (p != NULL)
+ if (res != NULL)
{
char_u *s;
- for (s = p; *s; ++s)
+ for (s = res; *s; ++s)
{
if (*s == CAR)
*s = NL;
@@ -7588,12 +7624,12 @@ f_system(argvars, retvar)
#else
# ifdef USE_CRNL
/* translate <CR><NL> into <NL> */
- if (p != NULL)
+ if (res != NULL)
{
char_u *s, *d;
- d = p;
- for (s = p; *s; ++s)
+ d = res;
+ for (s = res; *s; ++s)
{
if (s[0] == CAR && s[1] == NL)
++s;
@@ -7603,8 +7639,15 @@ f_system(argvars, retvar)
}
# endif
#endif
+
+done:
+ if (infile != NULL)
+ {
+ mch_remove(infile);
+ vim_free(infile);
+ }
retvar->var_type = VAR_STRING;
- retvar->var_val.var_string = p;
+ retvar->var_val.var_string = res;
}
/*
diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index d687d8992..7a3f4acf6 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -276,6 +276,8 @@ EX(CMD_cwindow, "cwindow", ex_cwindow,
RANGE|NOTADR|COUNT|TRLBAR),
EX(CMD_delete, "delete", ex_operators,
RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN|MODIFY),
+EX(CMD_delmarks, "delmarks", ex_delmarks,
+ BANG|EXTRA|TRLBAR|CMDWIN),
EX(CMD_debug, "debug", ex_debug,
NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN),
EX(CMD_debuggreedy, "debuggreedy", ex_debuggreedy,
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index a0c07201d..418de48e2 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -6679,10 +6679,24 @@ do_exedit(eap, old_curwin)
need_hide = (curbufIsChanged() && curbuf->b_nwindows <= 1);
if (!need_hide || P_HID(curbuf))
{
+# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
+ cleanup_T cs;
+
+ /* Reset the error/interrupt/exception state here so that
+ * aborting() returns FALSE when closing a window. */
+ enter_cleanup(&cs);
+# endif
# ifdef FEAT_GUI
need_mouse_correct = TRUE;
# endif
win_close(curwin, !need_hide && !P_HID(curbuf));
+
+# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
+ /* Restore the error/interrupt/exception state if not
+ * discarded by a new aborting error, interrupt, or
+ * uncaught exception. */
+ leave_cleanup(&cs);
+# endif
}
}
#endif
diff --git a/src/ex_eval.c b/src/ex_eval.c
index 284ae3f88..8be11e13b 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -1820,6 +1820,151 @@ ex_endtry(eap)
}
/*
+ * Function to be called before a failed command invokes a sequence of
+ * autocommands for cleanup. (Failure means here that a call to emsg() has
+ * been made, an interrupt occurred, or there is an uncaught exception from a
+ * previous autocommand execution of the same command.) This function works a
+ * bit like ex_finally() except that there was not actually an extra try block
+ * around the part that failed and an error or interrupt has not (yet) been
+ * converted to an exception. This function saves the
+ * error/interrupt/exception state and prepares for the call to do_cmdline()
+ * that is going to be made for the cleanup autocommand execution.
+ *
+ * Stores the pending error/interrupt/exception state in the cleanup_T
+ * structure pointed to by "csp", which has to be passed as an argument to
+ * leave_cleanup() after the autocommand execution has finished.
+ */
+ void
+enter_cleanup(csp)
+ cleanup_T *csp;
+{
+ int pending = CSTP_NONE;
+
+ /*
+ * Postpone did_emsg, got_int, did_throw. The pending values will be
+ * restored by leave_cleanup() except if there was an aborting error,
+ * interrupt, or uncaught exception after this function ends.
+ */
+ if (did_emsg || got_int || did_throw || need_rethrow)
+ {
+ csp->pending = (did_emsg ? CSTP_ERROR : 0)
+ | (got_int ? CSTP_INTERRUPT : 0)
+ | (did_throw ? CSTP_THROW : 0)
+ | (need_rethrow ? CSTP_THROW : 0);
+
+ /* If we are currently throwing an exception (did_throw), save it as
+ * well. On an error not yet converted to an exception, update
+ * "force_abort" and reset "cause_abort" (as do_errthrow() would do).
+ * This is needed for the do_cmdline() call that is going to be made
+ * for autocommand execution. We need not save *msg_list because
+ * there is an extra instance for every call of do_cmdline(), anyway.
+ */
+ if (did_throw || need_rethrow)
+ csp->exception = current_exception;
+ else
+ {
+ csp->exception = NULL;
+ if (did_emsg)
+ {
+ force_abort |= cause_abort;
+ cause_abort = FALSE;
+ }
+ }
+ did_emsg = got_int = did_throw = need_rethrow = FALSE;
+
+ /* Report if required by the 'verbose' option or when debugging. */
+ report_make_pending(pending, csp->exception);
+ }
+ else
+ {
+ csp->pending = CSTP_NONE;
+ csp->exception = NULL;
+ }
+}
+
+/*
+ * Function to be called after a failed command invoked a sequence of
+ * autocommands for cleanup. It is a bit like ex_endtry() except that there
+ * was not actually an extra try block around the part that failed and an
+ * error or interrupt had not (yet) been converted to an exception when the
+ * cleanup autocommand sequence was invoked. This function has to be called
+ * with the address of the cleanup_T structure filled by enter_cleanup() as an
+ * argument; it restores the error/interrupt/exception state saved by that
+ * function - except there was an aborting error, an interrupt or an uncaught
+ * exception during execution of the cleanup autocommands. In the latter
+ * case, the saved error/interrupt/ exception state is discarded.
+ */
+ void
+leave_cleanup(csp)
+ cleanup_T *csp;
+{
+ int pending = csp->pending;
+
+ if (pending == CSTP_NONE) /* nothing to do */
+ return;
+
+ /* If there was an aborting error, an interrupt, or an uncaught exception
+ * after the corresponding call to enter_cleanup(), discard what has been
+ * made pending by it. Report this to the user if required by the
+ * 'verbose' option or when debugging. */
+ if (aborting() || need_rethrow)
+ {
+ if (pending & CSTP_THROW)
+ /* Cancel the pending exception (includes report). */
+ discard_exception((except_T *)csp->exception, FALSE);
+ else
+ report_discard_pending(pending, NULL);
+
+ /* If an error was about to be converted to an exception when
+ * enter_cleanup() was called, free the message list. */
+ free_msglist(*msg_list);
+ *msg_list = NULL;
+ }
+
+ /*
+ * If there was no new error, interrupt, or throw between the calls
+ * to enter_cleanup() and leave_cleanup(), restore the pending
+ * error/interrupt/exception state.
+ */
+ else
+ {
+ /*
+ * If there was an exception being thrown when enter_cleanup() was
+ * called, we need to rethrow it. Make it the exception currently
+ * being thrown.
+ */
+ if (pending & CSTP_THROW)
+ current_exception = csp->exception;
+
+ /*
+ * If an error was about to be converted to an exception when
+ * enter_cleanup() was called, let "cause_abort" take the part of
+ * "force_abort" (as done by cause_errthrow()).
+ */
+ else if (pending & CSTP_ERROR)
+ {
+ cause_abort = force_abort;
+ force_abort = FALSE;
+ }
+
+ /*
+ * Restore the pending values of did_emsg, got_int, and did_throw.
+ */
+ if (pending & CSTP_ERROR)
+ did_emsg = TRUE;
+ if (pending & CSTP_INTERRUPT)
+ got_int = TRUE;
+ if (pending & CSTP_THROW)
+ need_rethrow = TRUE; /* did_throw will be set by do_one_cmd() */
+
+ /* Report if required by the 'verbose' option or when debugging. */
+ report_resume_pending(pending,
+ (pending & CSTP_THROW) ? (void *)current_exception : NULL);
+ }
+}
+
+
+/*
* Make conditionals inactive and discard what's pending in finally clauses
* until the conditional type searched for or a try conditional not in its
* finally clause is reached. If this is in an active catch clause, finish the
diff --git a/src/fileio.c b/src/fileio.c
index b82cd4a6e..c925775a9 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3832,8 +3832,10 @@ restore_backup:
#ifdef FEAT_MBYTE
/*
* The BOM is written just after the encryption magic number.
+ * Skip it when appending and the file already existed, the BOM only makes
+ * sense at the start of the file.
*/
- if (buf->b_p_bomb && !write_bin)
+ if (buf->b_p_bomb && !write_bin && (!append || perm < 0))
{
write_info.bw_len = make_bom(buffer, fenc);
if (write_info.bw_len > 0)
diff --git a/src/gui_kde_wid.cc b/src/gui_kde_wid.cc
index 91ea10be1..fefbe9a4b 100644
--- a/src/gui_kde_wid.cc
+++ b/src/gui_kde_wid.cc
@@ -154,9 +154,9 @@ void gui_keypress(QKeyEvent *e);
int
gui_mch_haskey(char_u * name)//{{{
{
- for (int i=0; special_keys[i].qtkey != 0; i++)
- if (name[0] == special_keys[i].code0 &&
- name[1] == special_keys[i].code1)
+ for (int i = 0; special_keys[i].qtkey != 0; i++)
+ if (name[0] == special_keys[i].code0
+ && name[1] == special_keys[i].code1)
return OK;
return FAIL;
}//}}}
@@ -164,20 +164,20 @@ gui_mch_haskey(char_u * name)//{{{
/*
* custom Frame for drawing ...
*/
-void VimWidget::paintEvent( QPaintEvent *e)//{{{
+void VimWidget::paintEvent(QPaintEvent *e)//{{{
{
QRect r = e->rect();
- gui_redraw(r.x(), r.y(), r.width(), r.height() );
+ gui_redraw(r.x(), r.y(), r.width(), r.height());
}//}}}
void VimWidget::draw_string(int x, int y, QString s, int len, int flags)//{{{
{
- gui.current_font->setBold( flags & DRAW_BOLD );
- gui.current_font->setUnderline( flags & DRAW_UNDERL );
+ gui.current_font->setBold(flags & DRAW_BOLD);
+ gui.current_font->setUnderline(flags & DRAW_UNDERL);
gui.current_font->setItalic(flags & DRAW_ITALIC);
- painter->setBackgroundMode( flags & DRAW_TRANSP ? Qt::TransparentMode : Qt::OpaqueMode);
- painter->setFont( *(gui.current_font) );
- painter->drawText( x, y, s, len);
+ painter->setBackgroundMode(flags & DRAW_TRANSP ? Qt::TransparentMode : Qt::OpaqueMode);
+ painter->setFont(*(gui.current_font));
+ painter->drawText(x, y, s, len);
}//}}}
void VimWidget::mousePressEvent(QMouseEvent *event)//{{{
@@ -1165,36 +1165,9 @@ void VimMainWindow::showAboutApplication()//{{{
I18N_NOOP("NetBSD configure/compilation fixes")
);
aboutData->setLicenseText(
-"KVim as an extension of Vim follows Vim license : \n\
-Vim is Charityware. You can use and copy it as much as you like, but you are\n\
-encouraged to make a donation to orphans in Uganda. Please read the file\n\
-runtime/doc/uganda.txt for details.\n\
-\n\
-There are no restrictions on distributing an unmodified copy of Vim. Parts of\n\
-Vim may also be distributed, but this text must always be included. You are\n\
-allowed to include executables that you made from the unmodified Vim sources,\n\
-your own usage examples and Vim scripts.\n\
-\n\
-If you distribute a modified version of Vim, you are encouraged to send the\n\
-maintainer a copy, including the source code. Or make it available to the\n\
-maintainer through ftp; let him know where it can be found. If the number of\n\
-changes is small (e.g., a modified Makefile) e-mailing the diffs will do.\n\
-When the maintainer asks for it (in any way) you must make your changes,\n\
-including source code, available to him.\n\
-\n\
-The maintainer reserves the right to include any changes in the official\n\
-version of Vim. This is negotiable. You are not allowed to distribute a\n\
-modified version of Vim when you are not willing to make the source code\n\
-available to the maintainer.\n\
-\n\
-The current maintainer is Bram Moolenaar <Bram@vim.org>. If this changes, it\n\
-will be announced in appropriate places (most likely www.vim.org and\n\
-comp.editors). When it is completely impossible to contact the maintainer,\n\
-the obligation to send him modified source code ceases.\n\
-\n\
-It is not allowed to remove these restrictions from the distribution of the\n\
-Vim sources or parts of it. These restrictions may also be used for previous\n\
-Vim releases instead of the text that was included with it.");
+"KVim as an extension of Vim follows Vim license.\n\
+You can read it with \":help license\"\n\
+Or read the file $VIMRUNTIME/doc/uganda.txt.");
KAboutApplication *about = new KAboutApplication(aboutData);
about->show();
diff --git a/src/mark.c b/src/mark.c
index e1b800eb1..ea941e59b 100644
--- a/src/mark.c
+++ b/src/mark.c
@@ -743,6 +743,91 @@ show_one_mark(c, arg, p, name, current)
}
}
+/*
+ * ":delmarks[!] [marks]"
+ */
+ void
+ex_delmarks(eap)
+ exarg_T *eap;
+{
+ char_u *p;
+ int from, to;
+ int i;
+ int lower;
+ int digit;
+ int n;
+
+ if (*eap->arg == NUL && eap->forceit)
+ /* clear all marks */
+ clrallmarks(curbuf);
+ else if (eap->forceit)
+ EMSG(_(e_invarg));
+ else if (*eap->arg == NUL)
+ EMSG(_(e_argreq));
+ else
+ {
+ /* clear specified marks only */
+ for (p = eap->arg; *p != NUL; ++p)
+ {
+ lower = ASCII_ISLOWER(*p);
+ digit = VIM_ISDIGIT(*p);
+ if (lower || digit || ASCII_ISUPPER(*p))
+ {
+ if (p[1] == '-')
+ {
+ /* clear range of marks */
+ from = *p;
+ to = p[2];
+ if (!(lower ? ASCII_ISLOWER(p[2])
+ : (digit ? VIM_ISDIGIT(p[2])
+ : ASCII_ISUPPER(p[2])))
+ || to < from)
+ {
+ EMSG2(_(e_invarg2), p);
+ return;
+ }
+ p += 2;
+ }
+ else
+ /* clear one lower case mark */
+ from = to = *p;
+
+ for (i = from; i <= to; ++i)
+ {
+ if (lower)
+ curbuf->b_namedm[i - 'a'].lnum = 0;
+ else
+ {
+ if (digit)
+ n = i - '0' + NMARKS;
+ else
+ n = i - 'A';
+ namedfm[n].fmark.mark.lnum = 0;
+ vim_free(namedfm[n].fname);
+ namedfm[n].fname = NULL;
+ }
+ }
+ }
+ else
+ switch (*p)
+ {
+ case '"': curbuf->b_last_cursor.lnum = 0; break;
+ case '^': curbuf->b_last_insert.lnum = 0; break;
+ case '.': curbuf->b_last_change.lnum = 0; break;
+ case '[': curbuf->b_op_start.lnum = 0; break;
+ case ']': curbuf->b_op_end.lnum = 0; break;
+#ifdef FEAT_VISUAL
+ case '<': curbuf->b_visual_start.lnum = 0; break;
+ case '>': curbuf->b_visual_end.lnum = 0; break;
+#endif
+ case ' ': break;
+ default: EMSG2(_(e_invarg2), p);
+ return;
+ }
+ }
+ }
+}
+
#if defined(FEAT_JUMPLIST) || defined(PROTO)
/*
* print the jumplist
diff --git a/src/misc1.c b/src/misc1.c
index 9558cc5ff..ec744861e 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -8352,7 +8352,8 @@ expand_backtick(gap, pat, flags)
buffer = eval_to_string(cmd + 1, &p);
else
#endif
- buffer = get_cmd_output(cmd, (flags & EW_SILENT) ? SHELL_SILENT : 0);
+ buffer = get_cmd_output(cmd, NULL,
+ (flags & EW_SILENT) ? SHELL_SILENT : 0);
vim_free(cmd);
if (buffer == NULL)
return 0;
@@ -8451,8 +8452,9 @@ addfile(gap, f, flags)
* Returns an allocated string, or NULL for error.
*/
char_u *
-get_cmd_output(cmd, flags)
+get_cmd_output(cmd, infile, flags)
char_u *cmd;
+ char_u *infile; /* optional input file name */
int flags; /* can be SHELL_SILENT */
{
char_u *tempname;
@@ -8473,7 +8475,7 @@ get_cmd_output(cmd, flags)
}
/* Add the redirection stuff */
- command = make_filter_cmd(cmd, NULL, tempname);
+ command = make_filter_cmd(cmd, infile, tempname);
if (command == NULL)
goto done;
diff --git a/src/normal.c b/src/normal.c
index 8ea4ba64c..633f2093f 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -1078,8 +1078,11 @@ getcount:
goto normal_end;
}
- msg_didout = FALSE; /* don't scroll screen up for normal command */
- msg_col = 0;
+ if (ca.cmdchar != K_IGNORE)
+ {
+ msg_didout = FALSE; /* don't scroll screen up for normal command */
+ msg_col = 0;
+ }
#ifdef FEAT_VISUAL
old_pos = curwin->w_cursor; /* remember where cursor was */
diff --git a/src/option.c b/src/option.c
index 0b36dfef1..9ab334457 100644
--- a/src/option.c
+++ b/src/option.c
@@ -2868,6 +2868,21 @@ set_init_1()
options[opt_idx].def_val[VI_DEFAULT] = p_enc;
options[opt_idx].flags |= P_DEF_ALLOCED;
+#if defined(MSDOS) || defined(MSWIN) || defined(OS2) || defined(MACOS) \
+ || defined(VMS)
+ if (STRCMP(p_enc, "latin1") == 0
+# ifdef FEAT_MBYTE
+ || enc_utf8
+# endif
+ )
+ {
+ /* Adjust the default for 'isprint' to match latin1. */
+ set_string_option_direct((char_u *)"isp", -1,
+ (char_u *)"@,161-255", OPT_FREE);
+ (void)init_chartab();
+ }
+#endif
+
# if defined(WIN3264) && !defined(FEAT_GUI)
/* Win32 console: When GetACP() returns a different value from
* GetConsoleCP() set 'termencoding'. */
@@ -4673,6 +4688,7 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
char_u *s, *p;
int did_chartab = FALSE;
char_u **gvarp;
+ int free_oldval = (options[opt_idx].flags & P_ALLOCED);
/* Get the global option to compare with, otherwise we would have to check
* two values for all local options. */
@@ -5818,8 +5834,10 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
#endif
/*
* Free string options that are in allocated memory.
+ * Use "free_oldval", because recursiveness may change the flags under
+ * our fingers (esp. init_highlight()).
*/
- if (options[opt_idx].flags & P_ALLOCED)
+ if (free_oldval)
free_string_option(oldval);
if (new_value_alloced)
options[opt_idx].flags |= P_ALLOCED;
diff --git a/src/os_riscos.c b/src/os_riscos.c
index a1cdab403..7c6758b9f 100644
--- a/src/os_riscos.c
+++ b/src/os_riscos.c
@@ -654,7 +654,7 @@ mch_can_exe(name)
if (buf == NULL)
return -1;
sprintf((char *)buf, "which %s", name);
- p = get_cmd_output(buf, SHELL_SILENT);
+ p = get_cmd_output(buf, NULL, SHELL_SILENT);
vim_free(buf);
if (p == NULL)
return -1;
diff --git a/src/os_win32.c b/src/os_win32.c
index a39e00508..bc6c7d4fd 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -3926,10 +3926,10 @@ mch_write(
else if (s[0] == ESC && len >= 3-1 && s[1] == '|')
{
#ifdef MCH_WRITE_DUMP
- char_u* old_s = s;
+ char_u *old_s = s;
#endif
- char_u* p;
- int arg1 = 0, arg2 = 0;
+ char_u *p;
+ int arg1 = 0, arg2 = 0;
switch (s[2])
{
diff --git a/src/po/sv.po b/src/po/sv.po
index 4f84b2173..2fe361e65 100644
--- a/src/po/sv.po
+++ b/src/po/sv.po
@@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Vim 6.2\n"
"POT-Creation-Date: 2004-01-30 11:57+0100\n"
-"PO-Revision-Date: 2004-04-24 21:54+0200\n"
+"PO-Revision-Date: 2004-09-07 17:10%z\n"
"Last-Translator: Johan Svedberg <johan@svedberg.pp.se>\n"
"Language-Team: Swedish <sv@li.org>\n"
"MIME-Version: 1.0\n"
@@ -1357,7 +1357,7 @@ msgstr "E192: Rekursiv användning av :normal för djup"
#: ex_docmd.c:8033
msgid "E194: No alternate file name to substitute for '#'"
-msgstr "E194: Inget alternativt filnamn att byta ut '#' med"
+msgstr "E194: Inget alternativt filnamn att ersätta '#' med"
#: ex_docmd.c:8064
msgid "E495: no autocommand file name to substitute for \"<afile>\""
@@ -1369,11 +1369,11 @@ msgstr "E496: inget autokommando-buffernummer att ersätta \"<abuf>\" med"
#: ex_docmd.c:8083
msgid "E497: no autocommand match name to substitute for \"<amatch>\""
-msgstr "E497: inget autokommando-träffnamn att byta ut \"<amatch>\" med"
+msgstr "E497: inget autokommando-träffnamn att ersätta \"<amatch>\" med"
#: ex_docmd.c:8093
msgid "E498: no :source file name to substitute for \"<sfile>\""
-msgstr "E498: inget :source-filnamn att byta ut \"<sfile>\" med"
+msgstr "E498: inget :source-filnamn att ersätta \"<sfile>\" med"
#: ex_docmd.c:8134
#, no-c-format
@@ -3263,7 +3263,7 @@ msgstr "-foreground <färg>\tAnvänd <färg> för vanlig text (även: -fg)"
#: main.c:2533 main.c:2553
msgid "-font <font>\t\tUse <font> for normal text (also: -fn)"
-msgstr "-font <typsnitt>\t\tAnvänd <typsnitt> för vanlig text (även: -fn)"
+msgstr "-font <typsnitt>\tAnvänd <typsnitt> för vanlig text (även: -fn)"
#: main.c:2534
msgid "-boldfont <font>\tUse <font> for bold text"
@@ -6314,7 +6314,7 @@ msgstr "E32: Inget filnamn"
#: globals.h:1240
msgid "E33: No previous substitute regular expression"
-msgstr "E33: Inget tidigare utbytningsreguljäruttryck"
+msgstr "E33: Inget tidigare reguljärt uttryck för ersättning"
#: globals.h:1241
msgid "E34: No previous command"
diff --git a/src/proto/ex_eval.pro b/src/proto/ex_eval.pro
index 80ecfcabd..8156c7aa7 100644
--- a/src/proto/ex_eval.pro
+++ b/src/proto/ex_eval.pro
@@ -23,6 +23,8 @@ void ex_try __ARGS((exarg_T *eap));
void ex_catch __ARGS((exarg_T *eap));
void ex_finally __ARGS((exarg_T *eap));
void ex_endtry __ARGS((exarg_T *eap));
+void enter_cleanup __ARGS((cleanup_T *csp));
+void leave_cleanup __ARGS((cleanup_T *csp));
int cleanup_conditionals __ARGS((struct condstack *cstack, int searched_cond, int inclusive));
void ex_endfunction __ARGS((exarg_T *eap));
int has_while_cmd __ARGS((char_u *p));
diff --git a/src/proto/mark.pro b/src/proto/mark.pro
index b90a1b07a..f7e5cf8c5 100644
--- a/src/proto/mark.pro
+++ b/src/proto/mark.pro
@@ -11,6 +11,7 @@ int check_mark __ARGS((pos_T *pos));
void clrallmarks __ARGS((buf_T *buf));
char_u *fm_getname __ARGS((fmark_T *fmark, int lead_len));
void do_marks __ARGS((exarg_T *eap));
+void ex_delmarks __ARGS((exarg_T *eap));
void ex_jumps __ARGS((exarg_T *eap));
void ex_changes __ARGS((exarg_T *eap));
void mark_adjust __ARGS((linenr_T line1, linenr_T line2, long amount, long amount_after));
diff --git a/src/proto/misc1.pro b/src/proto/misc1.pro
index 3fac334ab..feb968ae4 100644
--- a/src/proto/misc1.pro
+++ b/src/proto/misc1.pro
@@ -81,7 +81,7 @@ int expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u **
int match_suffix __ARGS((char_u *fname));
int gen_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags));
void addfile __ARGS((garray_T *gap, char_u *f, int flags));
-char_u *get_cmd_output __ARGS((char_u *cmd, int flags));
+char_u *get_cmd_output __ARGS((char_u *cmd, char_u *infile, int flags));
void FreeWild __ARGS((int count, char_u **files));
int goto_im __ARGS((void));
/* vim: set ft=c : */
diff --git a/src/regexp.c b/src/regexp.c
index 9715a1ea5..dac34a2b3 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -33,8 +33,8 @@
* precedence is structured in regular expressions. Serious changes in
* regular-expression syntax might require a total rethink.
*
- * Changes have been made by Tony Andrews, Olaf 'Rhialto' Seibert, Robert Webb
- * and Bram Moolenaar.
+ * Changes have been made by Tony Andrews, Olaf 'Rhialto' Seibert, Robert
+ * Webb, Ciaran McCreesh and Bram Moolenaar.
* Named character class support added by Walter Briscoe (1998 Jul 01)
*/
@@ -376,9 +376,14 @@ static char_u *reg_prev_sub;
* \t - Tab (TAB).
* \e - Escape (ESC).
* \b - Backspace (Ctrl_H).
+ * \d - Character code in decimal, eg \d123
+ * \o - Character code in octal, eg \o80
+ * \x - Character code in hex, eg \x4a
+ * \u - Multibyte character code, eg \u20ac
+ * \U - Long multibyte character code, eg \U12345678
*/
static char_u REGEXP_INRANGE[] = "]^-n\\";
-static char_u REGEXP_ABBR[] = "nrteb";
+static char_u REGEXP_ABBR[] = "nrtebdoxuU";
static int backslash_trans __ARGS((int c));
static int skip_class_name __ARGS((char_u **pp));
@@ -681,6 +686,10 @@ static void skipchr_keepstart __ARGS((void));
static int peekchr __ARGS((void));
static void skipchr __ARGS((void));
static void ungetchr __ARGS((void));
+static int gethexchrs __ARGS((int maxinputlen));
+static int getoctchrs __ARGS((void));
+static int getdecchrs __ARGS((void));
+static int coll_get_char __ARGS((void));
static void regcomp_start __ARGS((char_u *expr, int flags));
static char_u *reg __ARGS((int, int *));
static char_u *regbranch __ARGS((int *flagp));
@@ -1722,6 +1731,42 @@ regatom(flagp)
break;
}
+ case 'd': /* %d123 decimal */
+ case 'o': /* %o123 octal */
+ case 'x': /* %xab hex 2 */
+ case 'u': /* %uabcd hex 4 */
+ case 'U': /* %U1234abcd hex 8 */
+ {
+ int i;
+
+ switch (c)
+ {
+ case 'd': i = getdecchrs(); break;
+ case 'o': i = getoctchrs(); break;
+ case 'x': i = gethexchrs(2); break;
+ case 'u': i = gethexchrs(4); break;
+ case 'U': i = gethexchrs(8); break;
+ default: i = -1; break;
+ }
+
+ if (i < 0)
+ EMSG_M_RET_NULL(
+ _("E678: Invalid character after %s%%[dxouU]"),
+ reg_magic == MAGIC_ALL);
+ ret = regnode(EXACTLY);
+ if (i == 0)
+ regc(0x0a);
+ else
+#ifdef FEAT_MBYTE
+ regmbc(i);
+#else
+ regc(i);
+#endif
+ regc(NUL);
+ *flagp |= HASWIDTH;
+ break;
+ }
+
default:
if (VIM_ISDIGIT(c) || c == '<' || c == '>')
{
@@ -1816,6 +1861,11 @@ collection:
else
#endif
endc = *regparse++;
+
+ /* Handle \o40, \x20 and \u20AC style sequences */
+ if (endc == '\\' && !cpo_lit)
+ endc = coll_get_char();
+
if (startc > endc)
EMSG_RET_NULL(_(e_invrange));
#ifdef FEAT_MBYTE
@@ -1875,6 +1925,22 @@ collection:
regparse++;
startc = -1;
}
+ else if (*regparse == 'd'
+ || *regparse == 'o'
+ || *regparse == 'x'
+ || *regparse == 'u'
+ || *regparse == 'U')
+ {
+ startc = coll_get_char();
+ if (startc == 0)
+ regc(0x0a);
+ else
+#ifdef FEAT_MBYTE
+ regmbc(startc);
+#else
+ regc(startc);
+#endif
+ }
else
{
startc = backslash_trans(*regparse++);
@@ -2517,6 +2583,120 @@ ungetchr()
}
/*
+ * get and return the value of the hex string immediately after the current
+ * position. Return -1 for invalid, or 0-255 for valid. Position is updated:
+ * blahblah\%x20asdf
+ * before-^ ^-after
+ * The parameter controls the maximum number of input characters. This will be
+ * 2 when reading a \%x20 sequence and 4 when reading a \%u20AC sequence.
+ */
+ static int
+gethexchrs(maxinputlen)
+ int maxinputlen;
+{
+ int nr = 0;
+ int c;
+ int i;
+
+ for (i = 0; i < maxinputlen; ++i)
+ {
+ c = regparse[0];
+ if (!vim_isxdigit(c))
+ break;
+ nr <<= 4;
+ nr |= hex2nr(c);
+ ++regparse;
+ }
+
+ if (i == 0)
+ return -1;
+ return nr;
+}
+
+/*
+ * get and return the value of the decimal string immediately after the
+ * current position. Return -1 for invalid. Consumes all digits.
+ */
+ static int
+getdecchrs()
+{
+ int nr = 0;
+ int c;
+ int i;
+
+ for (i = 0; ; ++i)
+ {
+ c = regparse[0];
+ if (c < '0' || c > '9')
+ break;
+ nr *= 10;
+ nr += c - '0';
+ ++regparse;
+ }
+
+ if (i == 0)
+ return -1;
+ return nr;
+}
+
+/*
+ * get and return the value of the octal string immediately after the current
+ * position. Return -1 for invalid, or 0-255 for valid. Smart enough to handle
+ * numbers > 377 correctly (for example, 400 is treated as 40) and doesn't
+ * treat 8 or 9 as recognised characters. Position is updated:
+ * blahblah\%o210asdf
+ * before-^ ^-after
+ */
+ static int
+getoctchrs()
+{
+ int nr = 0;
+ int c;
+ int i;
+
+ for (i = 0; i < 3 && nr < 040; ++i)
+ {
+ c = regparse[0];
+ if (c < '0' || c > '7')
+ break;
+ nr <<= 3;
+ nr |= hex2nr(c);
+ ++regparse;
+ }
+
+ if (i == 0)
+ return -1;
+ return nr;
+}
+
+/*
+ * Get a number after a backslash that is inside [].
+ * When nothing is recognized return a backslash.
+ */
+ static int
+coll_get_char()
+{
+ int nr = -1;
+
+ switch (*regparse++)
+ {
+ case 'd': nr = getdecchrs(); break;
+ case 'o': nr = getoctchrs(); break;
+ case 'x': nr = gethexchrs(2); break;
+ case 'u': nr = gethexchrs(4); break;
+ case 'U': nr = gethexchrs(8); break;
+ }
+ if (nr < 0)
+ {
+ /* If getting the number fails be backwards compatible: the character
+ * is a backslash. */
+ --regparse;
+ nr = '\\';
+ }
+ return nr;
+}
+
+/*
* read_limits - Read two integers to be taken as a minimum and maximum.
* If the first character is '-', then the range is reversed.
* Should end with 'end'. If minval is missing, zero is default, if maxval is
diff --git a/src/structs.h b/src/structs.h
index d43e55c8f..9297f1306 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -670,6 +670,17 @@ struct vim_exception
#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.
+ */
+typedef struct cleanup_stuff cleanup_T;
+struct cleanup_stuff
+{
+ int pending; /* error/interrupt/exception state */
+ except_T *exception; /* exception value */
+};
#ifdef FEAT_SYN_HL
/* struct passed to in_id_list() */
diff --git a/src/syntax.c b/src/syntax.c
index e5d1b185f..e99f09743 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -6016,7 +6016,18 @@ init_highlight(both, reset)
* If syntax highlighting is enabled load the highlighting for it.
*/
if (get_var_value((char_u *)"g:syntax_on") != NULL)
- (void)cmd_runtime((char_u *)"syntax/syncolor.vim", TRUE);
+ {
+ static int recursive = 0;
+
+ if (recursive >= 5)
+ EMSG(_("E679: recursive loop loading syncolor.vim"));
+ else
+ {
+ ++recursive;
+ (void)cmd_runtime((char_u *)"syntax/syncolor.vim", TRUE);
+ --recursive;
+ }
+ }
#endif
}
diff --git a/src/testdir/test.ok b/src/testdir/test.ok
new file mode 100644
index 000000000..1842af259
--- /dev/null
+++ b/src/testdir/test.ok
@@ -0,0 +1,92 @@
+Results of test49.vim:
+*** Test 1: OK (34695)
+*** Test 2: OK (34695)
+*** Test 3: OK (1384648195)
+*** Test 4: OK (32883)
+*** Test 5: OK (32883)
+*** Test 6: OK (603978947)
+*** Test 7: OK (90563)
+*** Test 8: OK (562493431)
+*** Test 9: OK (363)
+*** Test 10: OK (559615)
+*** Test 11: OK (2049)
+*** Test 12: OK (352256)
+*** Test 13: OK (145)
+*** Test 14: OK (42413)
+*** Test 15: OK (42413)
+*** Test 16: OK (8722)
+*** Test 17: OK (285127993)
+*** Test 18: OK (67224583)
+*** Test 19: OK (69275973)
+*** Test 20: OK (1874575085)
+*** Test 21: OK (147932225)
+*** Test 22: OK (4161)
+*** Test 23: OK (49)
+*** Test 24: OK (41)
+*** Test 25: OK (260177811)
+*** Test 26: OK (1681500476)
+*** Test 27: OK (1996459)
+*** Test 28: OK (1996459)
+*** Test 29: OK (170428555)
+*** Test 30: OK (190905173)
+*** Test 31: OK (190905173)
+*** Test 32: OK (354833067)
+--- Test 33: sum = 178275600 (ok)
+*** Test 33: OK (1216907538)
+*** Test 34: OK (2146584868)
+*** Test 35: OK (2146584868)
+*** Test 36: OK (1071644672)
+*** Test 37: OK (1071644672)
+*** Test 38: OK (357908480)
+*** Test 39: OK (357908480)
+*** Test 40: OK (357908480)
+*** Test 41: OK (3076095)
+*** Test 42: OK (1505155949)
+*** Test 43: OK (1157763329)
+*** Test 44: OK (1031761407)
+*** Test 45: OK (1157763329)
+*** Test 46: OK (739407)
+*** Test 47: OK (371213935)
+*** Test 48: OK (756255461)
+*** Test 49: OK (179000669)
+*** Test 50: OK (363550045)
+*** Test 51: OK (40744667)
+*** Test 52: OK (1247112011)
+*** Test 53: OK (131071)
+*** Test 54: OK (2047)
+*** Test 55: OK (1023)
+*** Test 56: OK (511)
+*** Test 57: OK (2147450880)
+*** Test 58: OK (624945)
+*** Test 59: OK (2038431743)
+*** Test 60: OK (311511339)
+*** Test 61: OK (374889517)
+*** Test 62: OK (286331153)
+*** Test 63: OK (236978127)
+*** Test 64: OK (1499645335)
+*** Test 65: OK (70187)
+*** Test 66: OK (5464)
+*** Test 67: OK (212514423)
+*** Test 68: OK (212514423)
+*** Test 69: OK (8995471)
+*** Test 70: OK (69544277)
+*** Test 71: OK (34886997)
+*** Test 72: OK (1789569365)
+*** Test 73: OK (9032615)
+*** Test 74: OK (224907669)
+*** Test 75: OK (2000403408)
+*** Test 76: OK (1610087935)
+*** Test 77: OK (1388671)
+*** Test 78: OK (134217728)
+*** Test 79: OK (70288929)
+*** Test 80: OK (17895765)
+*** Test 81: OK (387)
+*** Test 82: OK (8454401)
+*** Test 83: OK (2835)
+*** Test 84: OK (934782101)
+*** Test 85: OK (198689)
+--- Test 86: All tests were run with throwing exceptions on error.
+ The $VIMNOERRTHROW control is not configured.
+--- Test 86: All tests were run with throwing exceptions on interrupt.
+ The $VIMNOINTTHROW control is not configured.
+*** Test 86: OK (50443995)
diff --git a/src/testdir/test24.in b/src/testdir/test24.in
index 84721d992..b7bbedf5f 100644
--- a/src/testdir/test24.in
+++ b/src/testdir/test24.in
Binary files differ
diff --git a/src/testdir/test24.ok b/src/testdir/test24.ok
index 896b50ae5..d5bc95623 100644
--- a/src/testdir/test24.ok
+++ b/src/testdir/test24.ok
@@ -5,3 +5,15 @@ test text test text
test text test text
test text test text
test text test text
+test text test text x61
+test text test text x60-x64
+test text test text x78 5
+test text test text o143
+test text test text o140-o144
+test text test text o41 7
+test text test text \%x42
+test text test text \%o103
+test text test text [\x00]
+test text test text [\x00-\x10]
+test text test text [\x-z]
+test text test text [\u-z]
diff --git a/src/testdir/test44.in b/src/testdir/test44.in
index 2748e3d01..455c3e304 100644
--- a/src/testdir/test44.in
+++ b/src/testdir/test44.in
@@ -21,6 +21,12 @@ x:" Now search for multi-byte with composing char
/ม่
x:" find word by change of word class
/ã¡\<カヨ\>ã¯
+x:" Test \%u, [\u] and friends
+/\%u20ac
+x/[\u4f7f\u5929]\+
+x/\%U12345678
+x/[\U1234abcd\u1234\uabcd]
+x/\%d21879b
x:?^1?,$w! test.out
:e! test.out
G:put =matchstr(\"×בגד\", \".\", 0, 2) " ב
@@ -42,3 +48,8 @@ ENDTEST
9 หม่x อมx
a อมx หม่x
b ã¡ã‚«ãƒ¨ã¯
+c x ¬€x
+d 天使x
+e ü’…™¸y
+f ü’Š¯z
+g aå•·bb
diff --git a/src/testdir/test44.ok b/src/testdir/test44.ok
index 86f79d47c..40161e5e5 100644
--- a/src/testdir/test44.ok
+++ b/src/testdir/test44.ok
@@ -9,6 +9,11 @@
9 หม่x อx
a อมx หx
b カヨã¯
+c x ¬x
+d 使x
+e y
+f z
+g abb
ב
בג
×
diff --git a/src/vim.h b/src/vim.h
index 379656193..66eed35ca 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -753,7 +753,6 @@ extern char* (*dyn_libintl_textdomain)(const char* domainname);
#define BLN_CURBUF 1 /* May re-use curbuf for new buffer */
#define BLN_LISTED 2 /* Put new buffer in buffer list */
#define BLN_DUMMY 4 /* Allocating dummy buffer */
-#define BLN_FORCE 8 /* Don't abort on error */
/* Values for in_cinkeys() */
#define KEY_OPEN_FORW 0x101