summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-23 22:59:57 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-23 22:59:57 +0000
commitdb552d60ec4613d5537d3ebdcc4130f1591c0589 (patch)
tree621685ee2f7bf5e527dfb408d4dda38d8b56cc7d /src
parent7b5f8325ee8ecb93de52128303db5ecc4ffd430e (diff)
downloadvim-git-db552d60ec4613d5537d3ebdcc4130f1591c0589.tar.gz
updated for version 7.0232v7.0232
Diffstat (limited to 'src')
-rw-r--r--src/Makefile9
-rw-r--r--src/config.mk.in2
-rw-r--r--src/configure.in4
-rw-r--r--src/eval.c16
-rw-r--r--src/ex_cmds.h8
-rw-r--r--src/ex_getln.c2
-rw-r--r--src/gui_gtk_x11.c15
-rw-r--r--src/option.c2
-rw-r--r--src/quickfix.c31
-rw-r--r--src/regexp.c22
-rw-r--r--src/screen.c2
-rw-r--r--src/undo.c29
-rw-r--r--src/version.h4
13 files changed, 100 insertions, 46 deletions
diff --git a/src/Makefile b/src/Makefile
index ecf7bf8ff..4c415cb10 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1857,8 +1857,8 @@ installtutor: $(DEST_RT) $(DEST_TUTOR)
# spell file is there.
installspell: $(DEST_VIM) $(DEST_RT) $(DEST_SPELL)
if test -f $(SPELLSOURCE)/en.latin1.spl; then \
- $(INSTALL_DATA) $(SPELLSOURCE)/*.spl $(SPELLSOURCE)/*.vim $(DEST_SPELL); \
- chmod $(HELPMOD) $(DEST_SPELL)/*.spl $(DEST_SPELL)/*.vim; \
+ $(INSTALL_DATA) $(SPELLSOURCE)/*.spl $(SPELLSOURCE)/*.sug $(SPELLSOURCE)/*.vim $(DEST_SPELL); \
+ chmod $(HELPMOD) $(DEST_SPELL)/*.spl $(DEST_SPELL)/*.sug $(DEST_SPELL)/*.vim; \
fi
# install helper program xxd
@@ -2029,7 +2029,7 @@ $(DEST_BIN)/$(EVIMTARGET):
$(DEST_BIN)/$(EVIEWTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(EVIEWTARGET)
-# create links for the manual pages with various names to vim. This is only
+# Create links for the manual pages with various names to vim. This is only
# done when the links (or manpages with the same name) don't exist yet.
INSTALLMLARGS = $(VIMNAME) $(VIMDIFFNAME) $(EVIMNAME) \
@@ -2520,6 +2520,8 @@ install_macosx: gui_bundle
# Remove the link to the runtime dir, don't want to copy all of that.
-rm $(RESDIR)/vim/runtime
$(INSTALL_DATA_R) $(APPDIR) $(DESTDIR)$(prefix)
+# Generate the help tags file now, it won't work with "make installruntime".
+ -@srcdir=`pwd`; cd $(HELPSOURCE); $(MAKE) VIMEXE=$$srcdir/$(VIMTARGET) vimtags
# Install the runtime files. Recursive!
-mkdir -p $(DESTDIR)$(prefix)/$(RESDIR)/vim/runtime
# -mkdir $(DESTDIR)$(prefix)/$(APPDIR)/bin
@@ -2538,7 +2540,6 @@ $(RESDIR):
mkdir -p $@
bundle-dir: $(APPDIR)/Contents $(VIMTARGET)
- -@srcdir=`pwd`; cd $(HELPSOURCE); $(MAKE) VIMEXE=$$srcdir/$(VIMTARGET) vimtags
# Make a link to the runtime directory, so that we can try out the executable
# without installing it.
mkdir -p $(RESDIR)/vim
diff --git a/src/config.mk.in b/src/config.mk.in
index 4996afdb5..759559a4e 100644
--- a/src/config.mk.in
+++ b/src/config.mk.in
@@ -135,8 +135,6 @@ NARROW_PROTO = @NARROW_PROTO@
GUI_X_LIBS = @GUI_X_LIBS@
MOTIF_LIBNAME = @MOTIF_LIBNAME@
GTK_LIBNAME = @GTK_LIBNAME@
-KDE_PREFIX = @KDE_PREFIX@
-MOC = @MOC@
### Any OS dependent extra source and object file
OS_EXTRA_SRC = @OS_EXTRA_SRC@
diff --git a/src/configure.in b/src/configure.in
index 90eb33b8a..aae20b915 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -169,9 +169,9 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
fi
fi
- dnl Avoid a bug with -O2 with gcc 4.0. Symptom: malloc() reports double
+ dnl Avoid a bug with -O2 with gcc 4.0.1. Symptom: malloc() reports double
dnl free. This happens in expand_filename(), because the optimizer swaps
- dnl two blocks of code that use "repl" that can't be swapped.
+ dnl two blocks of code, both using "repl", that can't be swapped.
if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
CFLAGS=`echo "$CFLAGS" | sed 's/-O[[23456789]]/-Oz/'`
fi
diff --git a/src/eval.c b/src/eval.c
index f47f16e47..efa04be1a 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1661,11 +1661,12 @@ ex_let(eap)
int var_count = 0;
int semicolon = 0;
char_u op[2];
+ char_u *argend;
- expr = skip_var_list(arg, &var_count, &semicolon);
- if (expr == NULL)
+ argend = skip_var_list(arg, &var_count, &semicolon);
+ if (argend == NULL)
return;
- expr = vim_strchr(expr, '=');
+ expr = vim_strchr(argend, '=');
if (expr == NULL)
{
/*
@@ -1692,7 +1693,7 @@ ex_let(eap)
{
op[0] = '=';
op[1] = NUL;
- if (expr > arg)
+ if (expr > argend)
{
if (vim_strchr((char_u *)"+-.", expr[-1]) != NULL)
op[0] = expr[-1]; /* +=, -= or .= */
@@ -12664,7 +12665,8 @@ list2proftime(arg, tm)
n1 = list_find_nr(arg->vval.v_list, 0L, &error);
n2 = list_find_nr(arg->vval.v_list, 1L, &error);
# ifdef WIN3264
- tm->QuadPart = (n1 << 32) + n2;
+ tm->HighPart = n1;
+ tm->LowPart = n2;
# else
tm->tv_sec = n1;
tm->tv_usec = n2;
@@ -12710,8 +12712,8 @@ f_reltime(argvars, rettv)
long n1, n2;
# ifdef WIN3264
- n1 = res.QuadPart >> 32;
- n2 = res.QuadPart & 0xffffffff;
+ n1 = res.HighPart;
+ n2 = res.LowPart;
# else
n1 = res.tv_sec;
n2 = res.tv_usec;
diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index fa8f4ef75..dd1622a80 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -213,8 +213,12 @@ EX(CMD_cfile, "cfile", ex_cfile,
TRLBAR|FILE1|BANG),
EX(CMD_cfirst, "cfirst", ex_cc,
RANGE|NOTADR|COUNT|TRLBAR|BANG),
+EX(CMD_cgetbuffer, "cgetbuffer", ex_cbuffer,
+ RANGE|NOTADR|WORD1|TRLBAR),
EX(CMD_cgetfile, "cgetfile", ex_cfile,
TRLBAR|FILE1|BANG),
+EX(CMD_cgetexpr, "cgetexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG),
EX(CMD_chdir, "chdir", ex_cd,
BANG|FILE1|TRLBAR|CMDWIN),
EX(CMD_changes, "changes", ex_changes,
@@ -517,6 +521,10 @@ EX(CMD_lfirst, "lfirst", ex_cc,
RANGE|NOTADR|COUNT|TRLBAR|BANG),
EX(CMD_lgetfile, "lgetfile", ex_cfile,
TRLBAR|FILE1|BANG),
+EX(CMD_lgetbuffer, "lgetbuffer", ex_cbuffer,
+ RANGE|NOTADR|WORD1|TRLBAR),
+EX(CMD_lgetexpr, "lgetexpr", ex_cexpr,
+ NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG),
EX(CMD_lgrep, "lgrep", ex_make,
RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE),
EX(CMD_lgrepadd, "lgrepadd", ex_make,
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 58cfec843..ec6ee567a 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1749,6 +1749,8 @@ cmdline_changed:
end_pos = curwin->w_cursor;
curwin->w_cursor = save_pos;
}
+ else
+ end_pos = curwin->w_cursor; /* shutup gcc 4 */
validate_cursor();
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index f1661b4fc..35e18c977 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -41,6 +41,10 @@
# endif
# include <gnome.h>
# include "version.h"
+# ifdef HAVE_GTK2
+/* missing prototype in bonobo-dock-item.h */
+extern void bonobo_dock_item_set_behavior(BonoboDockItem *dock_item, BonoboDockItemBehavior beh);
+# endif
#endif
#if !defined(FEAT_GUI_GTK) && defined(PROTO)
@@ -3541,8 +3545,10 @@ gui_mch_init(void)
gnome_app_set_menus(GNOME_APP(gui.mainwin), GTK_MENU_BAR(gui.menubar));
dockitem = gnome_app_get_dock_item_by_name(GNOME_APP(gui.mainwin),
GNOME_APP_MENUBAR_NAME);
- // bonobo_dock_item_set_behavior(dockitem,
- // BONOBO_DOCK_ITEM_BEH_NEVER_FLOATING);
+ /* We don't want the menu to float. */
+ bonobo_dock_item_set_behavior(dockitem,
+ bonobo_dock_item_get_behavior(dockitem)
+ | BONOBO_DOCK_ITEM_BEH_NEVER_FLOATING);
gui.menubar_h = GTK_WIDGET(dockitem);
# else
gui.menubar_h = gnome_dock_item_new("VimMainMenu",
@@ -3600,9 +3606,10 @@ gui_mch_init(void)
GNOME_APP_TOOLBAR_NAME);
gui.toolbar_h = GTK_WIDGET(dockitem);
/* When the toolbar is floating it gets stuck. So long as that isn't
- * fixed let's disallow floating. Also changes it appearance... */
+ * fixed let's disallow floating. */
bonobo_dock_item_set_behavior(dockitem,
- BONOBO_DOCK_ITEM_BEH_NEVER_FLOATING);
+ bonobo_dock_item_get_behavior(dockitem)
+ | BONOBO_DOCK_ITEM_BEH_NEVER_FLOATING);
gtk_container_set_border_width(GTK_CONTAINER(gui.toolbar), 0);
# else
GtkWidget *dockitem;
diff --git a/src/option.c b/src/option.c
index 73933b4dd..ff33e0f42 100644
--- a/src/option.c
+++ b/src/option.c
@@ -6053,7 +6053,7 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
#if defined(FEAT_GUI_TABLINE)
/* 'guitablabel' */
else if (varp == &p_gtl)
- gui_update_tabline();
+ gui_init_which_components(NULL);
#endif
#if defined(FEAT_MOUSE_TTY) && (defined(UNIX) || defined(VMS))
diff --git a/src/quickfix.c b/src/quickfix.c
index 7d4a00654..f22c860c7 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -3497,8 +3497,10 @@ set_errorlist(wp, list, action)
/*
* ":[range]cbuffer [bufnr]" command.
* ":[range]caddbuffer [bufnr]" command.
+ * ":[range]cgetbuffer [bufnr]" command.
* ":[range]lbuffer [bufnr]" command.
* ":[range]laddbuffer [bufnr]" command.
+ * ":[range]lgetbuffer [bufnr]" command.
*/
void
ex_cbuffer(eap)
@@ -3507,7 +3509,8 @@ ex_cbuffer(eap)
buf_T *buf = NULL;
qf_info_T *qi = &ql_info;
- if (eap->cmdidx == CMD_lbuffer || eap->cmdidx == CMD_laddbuffer)
+ if (eap->cmdidx == CMD_lbuffer || eap->cmdidx == CMD_lgetbuffer
+ || eap->cmdidx == CMD_laddbuffer)
{
qi = ll_get_or_alloc_list(curwin);
if (qi == NULL)
@@ -3534,12 +3537,12 @@ ex_cbuffer(eap)
EMSG(_(e_invrange));
else
{
- int buffer_cmd = (eap->cmdidx == CMD_cbuffer
- || eap->cmdidx == CMD_lbuffer);
-
- if (qf_init_ext(qi, NULL, buf, NULL, p_efm, buffer_cmd,
+ if (qf_init_ext(qi, NULL, buf, NULL, p_efm,
+ (eap->cmdidx != CMD_caddbuffer
+ && eap->cmdidx != CMD_laddbuffer),
eap->line1, eap->line2) > 0
- && buffer_cmd)
+ && (eap->cmdidx == CMD_cbuffer
+ || eap->cmdidx == CMD_lbuffer))
qf_jump(qi, 0, 0, eap->forceit); /* display first error */
}
}
@@ -3547,8 +3550,8 @@ ex_cbuffer(eap)
#if defined(FEAT_EVAL) || defined(PROTO)
/*
- * ":cexpr {expr}" and ":caddexpr {expr}" command.
- * ":lexpr {expr}" and ":laddexpr {expr}" command.
+ * ":cexpr {expr}", ":cgetexpr {expr}", ":caddexpr {expr}" command.
+ * ":lexpr {expr}", ":lgetexpr {expr}", ":laddexpr {expr}" command.
*/
void
ex_cexpr(eap)
@@ -3557,7 +3560,8 @@ ex_cexpr(eap)
typval_T *tv;
qf_info_T *qi = &ql_info;
- if (eap->cmdidx == CMD_lexpr || eap->cmdidx == CMD_laddexpr)
+ if (eap->cmdidx == CMD_lexpr || eap->cmdidx == CMD_lgetexpr
+ || eap->cmdidx == CMD_laddexpr)
{
qi = ll_get_or_alloc_list(curwin);
if (qi == NULL)
@@ -3572,11 +3576,12 @@ ex_cexpr(eap)
if ((tv->v_type == VAR_STRING && tv->vval.v_string != NULL)
|| (tv->v_type == VAR_LIST && tv->vval.v_list != NULL))
{
- int expr_cmd = (eap->cmdidx == CMD_cexpr
- || eap->cmdidx == CMD_lexpr);
- if (qf_init_ext(qi, NULL, NULL, tv, p_efm, expr_cmd,
+ if (qf_init_ext(qi, NULL, NULL, tv, p_efm,
+ (eap->cmdidx != CMD_caddexpr
+ && eap->cmdidx != CMD_laddexpr),
(linenr_T)0, (linenr_T)0) > 0
- && expr_cmd)
+ && (eap->cmdidx == CMD_cexpr
+ || eap->cmdidx == CMD_lexpr))
qf_jump(qi, 0, 0, eap->forceit); /* display first error */
}
else
diff --git a/src/regexp.c b/src/regexp.c
index dd07ea734..e0bfb0305 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -6854,6 +6854,23 @@ vim_regsub_both(source, dest, copy, magic, backslash)
}
if (no < 0) /* Ordinary character. */
{
+ if (c == K_SPECIAL && src[0] != NUL && src[1] != NUL)
+ {
+ /* Copy a specialy key as-is. */
+ if (copy)
+ {
+ *dst++ = c;
+ *dst++ = *src++;
+ *dst++ = *src++;
+ }
+ else
+ {
+ dst += 3;
+ src += 2;
+ }
+ continue;
+ }
+
if (c == '\\' && *src != NUL)
{
/* Check for abbreviations -- webb */
@@ -6877,13 +6894,12 @@ vim_regsub_both(source, dest, copy, magic, backslash)
c = *src++;
}
}
-
- /* Write to buffer, if copy is set. */
#ifdef FEAT_MBYTE
- if (has_mbyte)
+ else if (has_mbyte)
c = mb_ptr2char(src - 1);
#endif
+ /* Write to buffer, if copy is set. */
if (func == (fptr_T)NULL) /* just copy */
cc = c;
else
diff --git a/src/screen.c b/src/screen.c
index fbc3fee51..0e8b86778 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -8791,7 +8791,7 @@ draw_tabline()
redraw_tabline = FALSE;
#ifdef FEAT_GUI_TABLINE
- /* When the GUI has the tabline then this always returns zero. */
+ /* Take care of a GUI tabline. */
if (gui_use_tabline())
{
gui_update_tabline();
diff --git a/src/undo.c b/src/undo.c
index ed106c174..8d23e7702 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -88,7 +88,7 @@ static int undo_allowed __ARGS((void));
static int u_savecommon __ARGS((linenr_T, linenr_T, linenr_T));
static void u_doit __ARGS((int count));
static void u_undoredo __ARGS((int undo));
-static void u_undo_end __ARGS((int did_undo));
+static void u_undo_end __ARGS((int did_undo, int absolute));
static void u_add_time __ARGS((char_u *buf, size_t buflen, time_t tt));
static void u_freeheader __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp));
static void u_freebranch __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp));
@@ -638,7 +638,7 @@ u_doit(startcount)
curbuf->b_u_curhead = curbuf->b_u_curhead->uh_prev;
}
}
- u_undo_end(undo_undoes);
+ u_undo_end(undo_undoes, FALSE);
}
static int lastmark = 0;
@@ -704,7 +704,7 @@ undo_time(step, sec, absolute)
else
{
if (sec)
- closest = time(NULL) - starttime + 1;
+ closest = (long)(time(NULL) - starttime + 1);
else
closest = curbuf->b_u_seq_last + 2;
if (target >= closest)
@@ -739,7 +739,7 @@ undo_time(step, sec, absolute)
while (uhp != NULL)
{
uhp->uh_walk = mark;
- val = (dosec ? (uhp->uh_time - starttime) : uhp->uh_seq);
+ val = (long)(dosec ? (uhp->uh_time - starttime) : uhp->uh_seq);
if (round == 1)
{
@@ -788,7 +788,12 @@ undo_time(step, sec, absolute)
else if (uhp->uh_next != NULL && uhp->uh_alt_prev == NULL
&& uhp->uh_next->uh_walk != nomark
&& uhp->uh_next->uh_walk != mark)
+ {
+ /* If still at the start we don't go through this change. */
+ if (uhp == curbuf->b_u_curhead)
+ uhp->uh_walk = nomark;
uhp = uhp->uh_next;
+ }
else
{
@@ -880,7 +885,10 @@ undo_time(step, sec, absolute)
/* Stop when going backwards in time and didn't find the exact
* header we were looking for. */
if (uhp->uh_seq == target && above)
+ {
+ curbuf->b_u_seq_cur = target - 1;
break;
+ }
u_undoredo(FALSE);
@@ -903,7 +911,7 @@ undo_time(step, sec, absolute)
}
}
}
- u_undo_end(did_undo);
+ u_undo_end(did_undo, absolute);
}
/*
@@ -1176,8 +1184,9 @@ u_undoredo(undo)
* in some cases, but it's better than nothing).
*/
static void
-u_undo_end(did_undo)
+u_undo_end(did_undo, absolute)
int did_undo; /* just did an undo */
+ int absolute; /* used ":undo N" */
{
char *msg;
u_header_T *uhp;
@@ -1215,7 +1224,13 @@ u_undo_end(did_undo)
if (curbuf->b_u_curhead != NULL)
{
- if (did_undo)
+ /* For ":undo N" we prefer a "after #N" message. */
+ if (absolute && curbuf->b_u_curhead->uh_next != NULL)
+ {
+ uhp = curbuf->b_u_curhead->uh_next;
+ did_undo = FALSE;
+ }
+ else if (did_undo)
uhp = curbuf->b_u_curhead;
else
uhp = curbuf->b_u_curhead->uh_next;
diff --git a/src/version.h b/src/version.h
index 6ba548ba1..f3a87f772 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 21)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 21, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 23)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 23, compiled "