summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-01 22:09:21 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-01 22:09:21 +0000
commitfd2ac767ebb66adcb7ca85955f5fd40704475595 (patch)
tree16e61ca0dbcc0ffeb10a3fb5072842144ca9f89d /src
parente1438bb8d0b7a48f712458e68755ab8b66d92ace (diff)
downloadvim-git-fd2ac767ebb66adcb7ca85955f5fd40704475595.tar.gz
updated for version 7.0211
Diffstat (limited to 'src')
-rw-r--r--src/INSTALLmac.txt19
-rwxr-xr-xsrc/auto/configure2
-rw-r--r--src/configure.in4
-rw-r--r--src/ops.c4
-rw-r--r--src/option.c7
-rw-r--r--src/option.h1
-rw-r--r--src/screen.c108
-rw-r--r--src/search.c3
-rw-r--r--src/structs.h4
-rw-r--r--src/syntax.c2
-rw-r--r--src/term.c1
-rw-r--r--src/testdir/test59.in6
-rw-r--r--src/version.h4
13 files changed, 104 insertions, 61 deletions
diff --git a/src/INSTALLmac.txt b/src/INSTALLmac.txt
index 1c4d7732a..fa40c157b 100644
--- a/src/INSTALLmac.txt
+++ b/src/INSTALLmac.txt
@@ -28,23 +28,32 @@ MacOS Classic is no longer supported. If you really want it use Vim 6.4.
1.1 Carbon interface (default)
You can compile vim with the standard Unix routine:
- cd ..
- ./configure
- make; make install
+ cd .../src
+ make
This will create a working Vim.app application bundle in the src
directory. You can move this bundle (the Vim.app directory) anywhere
- you want, for example, /Applications.
+ you want. Or use this command to move it to /Applications:
+ make install
You need at least Xcode 1.5 to compile Vim 7.0.
+ Configure will create a universal binary if possible. This requires
+ installing the universal SDK (currently for 10.4).
+
+ To overrule the architecture do this before running make:
+
+ ./configure --with-mac-arch=intel
+ or
+ ./configure --with-mac-arch=ppc
+
1.2 X-Windows or Plain Text
If you do not want the Carbon interface, you must explicitly tell
configure to use a different GUI.
- cd ..
+ cd .../src
./configure --disable-darwin --enable-gui=gtk2
make; make install
diff --git a/src/auto/configure b/src/auto/configure
index ad86242d9..c69dd9603 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -3395,7 +3395,7 @@ fi
fi
fi
- if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
+ if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-Oz/'`
fi
diff --git a/src/configure.in b/src/configure.in
index 60609ec8f..ea27abbd2 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -164,7 +164,9 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
fi
fi
- dnl avoid a bug with -O2 for intel
+ dnl Avoid a bug with -O2 with gcc 4.0. 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.
if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
CFLAGS=`echo "$CFLAGS" | sed 's/-O[[23456789]]/-Oz/'`
fi
diff --git a/src/ops.c b/src/ops.c
index 487ae4cee..9695d9da3 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -3379,6 +3379,7 @@ do_put(regname, dir, count, flags)
}
curwin->w_cursor.coladd = 0;
#endif
+ bd.textcol = 0;
for (i = 0; i < y_size; ++i)
{
int spaces;
@@ -3386,7 +3387,6 @@ do_put(regname, dir, count, flags)
bd.startspaces = 0;
bd.endspaces = 0;
- bd.textcol = 0;
vcol = 0;
delcount = 0;
@@ -3536,7 +3536,6 @@ do_put(regname, dir, count, flags)
}
}
}
- new_cursor = curwin->w_cursor;
curbuf->b_op_start = curwin->w_cursor;
}
/*
@@ -3544,6 +3543,7 @@ do_put(regname, dir, count, flags)
*/
else if (dir == BACKWARD)
--lnum;
+ new_cursor = curwin->w_cursor;
/*
* simple case: insert into current line
diff --git a/src/option.c b/src/option.c
index e67586bbf..d692edf09 100644
--- a/src/option.c
+++ b/src/option.c
@@ -2295,6 +2295,13 @@ static struct vimoption
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)"", (char_u *)0L}},
+ {"tabpagemax", "tpm", P_NUM|P_VI_DEF,
+#ifdef FEAT_WINDOWS
+ (char_u *)&p_tpm, PV_NONE,
+#else
+ (char_u *)NULL, PV_NONE,
+#endif
+ {(char_u *)10L, (char_u *)0L}},
{"tabstop", "ts", P_NUM|P_VI_DEF|P_RBUF,
(char_u *)&p_ts, PV_TS,
{(char_u *)8L, (char_u *)0L}},
diff --git a/src/option.h b/src/option.h
index 7f70b1509..1ed2a4fd5 100644
--- a/src/option.h
+++ b/src/option.h
@@ -710,6 +710,7 @@ EXTERN int p_scs; /* 'smartcase' */
EXTERN int p_sta; /* 'smarttab' */
#ifdef FEAT_WINDOWS
EXTERN int p_sb; /* 'splitbelow' */
+EXTERN long p_tpm; /* 'tabpagemax' */
# if defined(FEAT_STL_OPT)
EXTERN char_u *p_tal; /* 'tabline' */
# endif
diff --git a/src/screen.c b/src/screen.c
index 391fe0ad4..f799b582b 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -115,7 +115,7 @@ typedef struct
} match_T;
static match_T search_hl; /* used for 'hlsearch' highlight matching */
-static match_T match_hl; /* used for ":match" highlight matching */
+static match_T match_hl[3]; /* used for ":match" highlight matching */
#endif
#ifdef FEAT_FOLDING
@@ -833,14 +833,19 @@ win_update(wp)
#endif
#ifdef FEAT_SEARCH_EXTRA
- /* Setup for ":match" highlighting. Disable any previous match */
- match_hl.rm = wp->w_match;
- if (wp->w_match_id == 0)
- match_hl.attr = 0;
- else
- match_hl.attr = syn_id2attr(wp->w_match_id);
- match_hl.buf = buf;
- match_hl.lnum = 0;
+ /* Setup for ":match" and 'hlsearch' highlighting. Disable any previous
+ * match */
+ for (i = 0; i < 3; ++i)
+ {
+ match_hl[i].rm = wp->w_match[i];
+ if (wp->w_match_id[i] == 0)
+ match_hl[i].attr = 0;
+ else
+ match_hl[i].attr = syn_id2attr(wp->w_match_id[i]);
+ match_hl[i].buf = buf;
+ match_hl[i].lnum = 0;
+ match_hl[i].first_lnum = 0;
+ }
search_hl.buf = buf;
search_hl.lnum = 0;
search_hl.first_lnum = 0;
@@ -905,11 +910,17 @@ win_update(wp)
* lines above the change.
* Same for a ":match" pattern.
*/
- if ((search_hl.rm.regprog != NULL
- && re_multiline(search_hl.rm.regprog))
- || (match_hl.rm.regprog != NULL
- && re_multiline(match_hl.rm.regprog)))
+ if (search_hl.rm.regprog != NULL
+ && re_multiline(search_hl.rm.regprog))
top_to_mod = TRUE;
+ else
+ for (i = 0; i < 3; ++i)
+ if (match_hl[i].rm.regprog != NULL
+ && re_multiline(match_hl[i].rm.regprog))
+ {
+ top_to_mod = TRUE;
+ break;
+ }
#endif
}
#ifdef FEAT_FOLDING
@@ -2570,6 +2581,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
#endif
#ifdef FEAT_SEARCH_EXTRA
match_T *shl; /* points to search_hl or match_hl */
+ int i;
#endif
#ifdef FEAT_ARABIC
int prev_c = 0; /* previous Arabic character */
@@ -3007,12 +3019,12 @@ win_line(wp, lnum, startrow, endrow, nochange)
#ifdef FEAT_SEARCH_EXTRA
/*
- * Handle highlighting the last used search pattern.
- * Do this for both search_hl and match_hl.
+ * Handle highlighting the last used search pattern and ":match".
+ * Do this for both search_hl and match_hl[3].
*/
- shl = &search_hl;
- for (;;)
+ for (i = 3; i >= 0; --i)
{
+ shl = (i == 3) ? &search_hl : &match_hl[i];
shl->startcol = MAXCOL;
shl->endcol = MAXCOL;
shl->attr_cur = 0;
@@ -3055,9 +3067,6 @@ win_line(wp, lnum, startrow, endrow, nochange)
area_highlighting = TRUE;
}
}
- if (shl == &match_hl)
- break;
- shl = &match_hl;
}
#endif
@@ -3305,9 +3314,9 @@ win_line(wp, lnum, startrow, endrow, nochange)
* ":match" overrules 'hlsearch'.
*/
v = (long)(ptr - line);
- shl = &search_hl;
- for (;;)
+ for (i = 3; i >= 0; --i)
{
+ shl = (i == 3) ? &search_hl : &match_hl[i];
while (shl->rm.regprog != NULL)
{
if (shl->startcol != MAXCOL
@@ -3355,15 +3364,17 @@ win_line(wp, lnum, startrow, endrow, nochange)
}
break;
}
- if (shl == &match_hl)
- break;
- shl = &match_hl;
}
+
/* ":match" highlighting overrules 'hlsearch' */
- if (match_hl.attr_cur != 0)
- search_attr = match_hl.attr_cur;
- else
- search_attr = search_hl.attr_cur;
+ for (i = 0; i <= 3; ++i)
+ if (i == 3)
+ search_attr = search_hl.attr_cur;
+ else if (match_hl[i].attr_cur != 0)
+ {
+ search_attr = match_hl[i].attr_cur;
+ break;
+ }
}
#endif
@@ -4133,7 +4144,9 @@ win_line(wp, lnum, startrow, endrow, nochange)
#ifdef FEAT_SEARCH_EXTRA
/* highlight 'hlsearch' match at end of line */
|| (ptr - line) - 1 == (long)search_hl.startcol
- || (ptr - line) - 1 == (long)match_hl.startcol
+ || (ptr - line) - 1 == (long)match_hl[0].startcol
+ || (ptr - line) - 1 == (long)match_hl[1].startcol
+ || (ptr - line) - 1 == (long)match_hl[2].startcol
#endif
))
{
@@ -4170,10 +4183,16 @@ win_line(wp, lnum, startrow, endrow, nochange)
#ifdef FEAT_SEARCH_EXTRA
if (area_attr == 0)
{
- if ((ptr - line) - 1 == (long)match_hl.startcol)
- char_attr = match_hl.attr;
- else
- char_attr = search_hl.attr;
+ for (i = 0; i <= 3; ++i)
+ {
+ if (i == 3)
+ char_attr = search_hl.attr;
+ else if ((ptr - line) - 1 == (long)match_hl[i].startcol)
+ {
+ char_attr = match_hl[i].attr;
+ break;
+ }
+ }
}
#endif
ScreenAttrs[off] = char_attr;
@@ -6061,15 +6080,16 @@ prepare_search_hl(wp, lnum)
{
match_T *shl; /* points to search_hl or match_hl */
int n;
+ int i;
/*
* When using a multi-line pattern, start searching at the top
* of the window or just after a closed fold.
- * Do this both for search_hl and match_hl.
+ * Do this both for search_hl and match_hl[3].
*/
- shl = &search_hl;
- for (;;)
+ for (i = 3; i >= 0; --i)
{
+ shl = (i == 3) ? &search_hl : &match_hl[i];
if (shl->rm.regprog != NULL
&& shl->lnum == 0
&& re_multiline(shl->rm.regprog))
@@ -6104,9 +6124,6 @@ prepare_search_hl(wp, lnum)
}
}
}
- if (shl == &match_hl)
- break;
- shl = &match_hl;
}
}
@@ -6884,12 +6901,8 @@ screenalloc(clear)
* Continuing with the old ScreenLines may result in a crash, because the
* size is wrong.
*/
-#ifdef FEAT_WINDOWS
FOR_ALL_TAB_WINDOWS(tp, wp)
win_free_lsize(wp);
-#else
- win_free_lsize(curwin);
-#endif
new_ScreenLines = (schar_T *)lalloc((long_u)(
(Rows + 1) * Columns * sizeof(schar_T)), FALSE);
@@ -8622,7 +8635,8 @@ draw_tabline()
attr = attr_nosel;
tabcount = 0;
scol = 0;
- for (tp = first_tabpage; tp != NULL && col < Columns; tp = tp->tp_next)
+ for (tp = first_tabpage; tp != NULL && col < Columns - 4;
+ tp = tp->tp_next)
{
scol = col;
@@ -8657,6 +8671,8 @@ draw_tabline()
{
vim_snprintf((char *)NameBuff, MAXPATHL, "%d", wincount);
len = STRLEN(NameBuff);
+ if (col + len >= Columns - 3)
+ break;
screen_puts_len(NameBuff, len, 0, col,
#if defined(FEAT_SYN_HL)
hl_combine_attr(attr, hl_attr(HLF_T))
@@ -8692,6 +8708,8 @@ draw_tabline()
p += len - room;
len = room;
}
+ if (len > Columns - col - 1)
+ len = Columns - col - 1;
screen_puts_len(p, STRLEN(p), 0, col, attr);
col += len;
diff --git a/src/search.c b/src/search.c
index 27b9ac13d..163605c55 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1891,6 +1891,8 @@ findmatchlimit(oap, initc, flags, maxtravel)
do_quotes = -1;
start_in_quotes = MAYBE;
+ clearpos(&match_pos);
+
/* backward search: Check if this line contains a single-line comment */
if ((backwards && comment_dir)
#ifdef FEAT_LISP
@@ -3096,6 +3098,7 @@ current_word(oap, count, include, bigword)
int include_white = FALSE;
cls_bigword = bigword;
+ clearpos(&start_pos);
#ifdef FEAT_VISUAL
/* Correct cursor when 'selection' is exclusive */
diff --git a/src/structs.h b/src/structs.h
index 0d6e497da..5b1aed61d 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1894,8 +1894,8 @@ struct window_S
#endif
#ifdef FEAT_SEARCH_EXTRA
- regmmatch_T w_match; /* regexp program for ":match" */
- int w_match_id; /* highlight ID for ":match" */
+ regmmatch_T w_match[3]; /* regexp programs for ":match" */
+ int w_match_id[3]; /* highlight IDs for ":match" */
#endif
/*
diff --git a/src/syntax.c b/src/syntax.c
index a96dc7701..b6bc696d3 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -780,6 +780,8 @@ syn_sync(wp, start_lnum, last_valid)
else
break_lnum = 0;
+ found_m_endpos.lnum = 0;
+ found_m_endpos.col = 0;
end_lnum = start_lnum;
lnum = start_lnum;
while (--lnum > break_lnum)
diff --git a/src/term.c b/src/term.c
index c3c5979ec..99dc1b0c9 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3918,6 +3918,7 @@ check_termcode(max_offset, buf, buflen)
continue;
key_name[0] = NUL; /* no key name found yet */
+ key_name[1] = NUL; /* no key name found yet */
modifiers = 0; /* no modifiers yet */
#ifdef FEAT_GUI
diff --git a/src/testdir/test59.in b/src/testdir/test59.in
index e3de1d630..368191c3d 100644
--- a/src/testdir/test59.in
+++ b/src/testdir/test59.in
@@ -121,7 +121,7 @@ KEP =
RAR ?
BAD !
-NOSPLITSUGS
+#NOSPLITSUGS
PFX I N 1
PFX I 0 in .
@@ -169,7 +169,7 @@ KEP =
RAR ?
BAD !
-NOSPLITSUGS
+#NOSPLITSUGS
PFX I N 1
PFX I 0 in .
@@ -326,7 +326,7 @@ KEP =
RAR ?
BAD !
-NOSPLITSUGS
+#NOSPLITSUGS
PFX I N 1
PFX I 0 in .
diff --git a/src/version.h b/src/version.h
index 33aedab5b..7ebf48368 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 Feb 28)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 28, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 1)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 1, compiled "