Compare commits

...

11 Commits

Author SHA1 Message Date
Bram Moolenaar
43b36a3bc6 updated for version 7.2-310 2009-12-02 11:08:38 +00:00
Bram Moolenaar
d32a319f40 updated for version 7.2-309 2009-11-26 19:40:49 +00:00
Bram Moolenaar
5ea08a893a updated for version 7.2-308 2009-11-25 18:51:24 +00:00
Bram Moolenaar
d3005803d5 updated for version 7.2-307 2009-11-25 17:21:32 +00:00
Bram Moolenaar
099d01d4a7 updated for version 7.2-306 2009-11-25 16:14:45 +00:00
Bram Moolenaar
19f990e497 updated for version 7.2-305 2009-11-25 12:08:03 +00:00
Bram Moolenaar
331dafdbb8 updated for version 7.2-304 2009-11-25 11:38:30 +00:00
Bram Moolenaar
4592dee576 updated for version 7.2-303 2009-11-18 19:11:58 +00:00
Bram Moolenaar
f11021be13 updated for version 7.2-302 2009-11-17 16:57:14 +00:00
Bram Moolenaar
97b9810bdf updated for version 7.2-301 2009-11-17 16:41:01 +00:00
Bram Moolenaar
f05da21900 updated for version 7.2-300 2009-11-17 16:13:15 +00:00
23 changed files with 650 additions and 58 deletions

View File

@@ -2400,6 +2400,12 @@ au BufNewFile,BufRead /etc/xinetd.d/* call s:StarSetf('xinetd')
au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
" Use the filetype detect plugins. They may overrule any of the previously
" detected filetypes.
runtime! ftdetect/*.vim
" Generic configuration file (check this last, it's just guessing!)
au BufNewFile,BufRead,StdinReadPost *
\ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat
@@ -2408,10 +2414,6 @@ au BufNewFile,BufRead,StdinReadPost *
\ setf conf |
\ endif
" Use the plugin-filetype checks last, they may overrule any of the previously
" detected filetypes.
runtime! ftdetect/*.vim
augroup END

52
src/auto/configure vendored
View File

@@ -15174,6 +15174,58 @@ else
$as_echo "yes" >&6; }
fi
{ $as_echo "$as_me:$LINENO: checking for FD_CLOEXEC" >&5
$as_echo_n "checking for FD_CLOEXEC... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#if HAVE_FCNTL_H
# include <fcntl.h>
#endif
int
main ()
{
int flag = FD_CLOEXEC;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }; cat >>confdefs.h <<\_ACEOF
#define HAVE_FD_CLOEXEC 1
_ACEOF
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ $as_echo "$as_me:$LINENO: result: not usable" >&5
$as_echo "not usable" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:$LINENO: checking for rename" >&5
$as_echo_n "checking for rename... " >&6; }
cat >conftest.$ac_ext <<_ACEOF

View File

@@ -388,3 +388,6 @@
/* Define if you want XSMP interaction as well as vanilla swapfile safety */
#undef USE_XSMP_INTERACT
/* Define if fcntl()'s F_SETFD command knows about FD_CLOEXEC */
#undef HAVE_FD_CLOEXEC

View File

@@ -2855,6 +2855,16 @@ else
AC_MSG_RESULT(yes)
fi
dnl make sure the FD_CLOEXEC flag for fcntl()'s F_SETFD command is known
AC_MSG_CHECKING(for FD_CLOEXEC)
AC_TRY_COMPILE(
[#if HAVE_FCNTL_H
# include <fcntl.h>
#endif],
[ int flag = FD_CLOEXEC;],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FD_CLOEXEC),
AC_MSG_RESULT(not usable))
dnl rename needs to be checked separately to work on Nextstep with cc
AC_MSG_CHECKING(for rename)
AC_TRY_LINK([#include <stdio.h>], [rename("this", "that")],

View File

@@ -181,7 +181,7 @@ static void ins_redraw __ARGS((int ready));
static void ins_ctrl_v __ARGS((void));
static void undisplay_dollar __ARGS((void));
static void insert_special __ARGS((int, int, int));
static void internal_format __ARGS((int textwidth, int second_indent, int flags, int format_only));
static void internal_format __ARGS((int textwidth, int second_indent, int flags, int format_only, int c));
static void check_auto_format __ARGS((int));
static void redo_literal __ARGS((int c));
static void start_arrow __ARGS((pos_T *end_insert_pos));
@@ -2164,7 +2164,7 @@ ins_compl_add_infercase(str, len, icase, fname, dir, flags)
int i, c;
int actual_len; /* Take multi-byte characters */
int actual_compl_length; /* into account. */
int *wca; /* Wide character array. */
int *wca; /* Wide character array. */
int has_lower = FALSE;
int was_letter = FALSE;
@@ -5558,7 +5558,7 @@ insertchar(c, flags, second_indent)
}
if (do_internal)
#endif
internal_format(textwidth, second_indent, flags, c == NUL);
internal_format(textwidth, second_indent, flags, c == NUL, c);
}
if (c == NUL) /* only formatting was wanted */
@@ -5738,11 +5738,12 @@ insertchar(c, flags, second_indent)
* Format text at the current insert position.
*/
static void
internal_format(textwidth, second_indent, flags, format_only)
internal_format(textwidth, second_indent, flags, format_only, c)
int textwidth;
int second_indent;
int flags;
int format_only;
int c; /* character to be inserted (can be NUL) */
{
int cc;
int save_char = NUL;
@@ -5763,7 +5764,11 @@ internal_format(textwidth, second_indent, flags, format_only)
* When 'ai' is off we don't want a space under the cursor to be
* deleted. Replace it with an 'x' temporarily.
*/
if (!curbuf->b_p_ai)
if (!curbuf->b_p_ai
#ifdef FEAT_VREPLACE
&& !(State & VREPLACE_FLAG)
#endif
)
{
cc = gchar_cursor();
if (vim_iswhite(cc))
@@ -5789,9 +5794,11 @@ internal_format(textwidth, second_indent, flags, format_only)
char_u *saved_text = NULL;
#endif
colnr_T col;
colnr_T end_col;
virtcol = get_nolist_virtcol();
if (virtcol < (colnr_T)textwidth)
virtcol = get_nolist_virtcol()
+ char2cells(c != NUL ? c : gchar_cursor());
if (virtcol <= (colnr_T)textwidth)
break;
#ifdef FEAT_COMMENTS
@@ -5831,12 +5838,7 @@ internal_format(textwidth, second_indent, flags, format_only)
coladvance((colnr_T)textwidth);
wantcol = curwin->w_cursor.col;
curwin->w_cursor.col = startcol - 1;
#ifdef FEAT_MBYTE
/* Correct cursor for multi-byte character. */
if (has_mbyte)
mb_adjust_cursor();
#endif
curwin->w_cursor.col = startcol;
foundcol = 0;
/*
@@ -5847,11 +5849,14 @@ internal_format(textwidth, second_indent, flags, format_only)
|| curwin->w_cursor.lnum != Insstart.lnum
|| curwin->w_cursor.col >= Insstart.col)
{
cc = gchar_cursor();
if (curwin->w_cursor.col == startcol && c != NUL)
cc = c;
else
cc = gchar_cursor();
if (WHITECHAR(cc))
{
/* remember position of blank just before text */
end_foundcol = curwin->w_cursor.col;
end_col = curwin->w_cursor.col;
/* find start of sequence of blanks */
while (curwin->w_cursor.col > 0 && WHITECHAR(cc))
@@ -5871,7 +5876,11 @@ internal_format(textwidth, second_indent, flags, format_only)
/* do not break after one-letter words */
if (curwin->w_cursor.col == 0)
break; /* one-letter word at begin */
#ifdef FEAT_COMMENTS
/* do not break "#a b" when 'tw' is 2 */
if (curwin->w_cursor.col <= leader_len)
break;
#endif
col = curwin->w_cursor.col;
dec_cursor();
cc = gchar_cursor();
@@ -5880,26 +5889,60 @@ internal_format(textwidth, second_indent, flags, format_only)
continue; /* one-letter, continue */
curwin->w_cursor.col = col;
}
#ifdef FEAT_MBYTE
if (has_mbyte)
foundcol = curwin->w_cursor.col
+ (*mb_ptr2len)(ml_get_cursor());
else
#endif
foundcol = curwin->w_cursor.col + 1;
if (curwin->w_cursor.col < (colnr_T)wantcol)
inc_cursor();
end_foundcol = end_col + 1;
foundcol = curwin->w_cursor.col;
if (curwin->w_cursor.col <= (colnr_T)wantcol)
break;
}
#ifdef FEAT_MBYTE
else if (cc >= 0x100 && fo_multibyte
&& curwin->w_cursor.col <= (colnr_T)wantcol)
else if (cc >= 0x100 && fo_multibyte)
{
/* Break after or before a multi-byte character. */
if (curwin->w_cursor.col != startcol)
{
#ifdef FEAT_COMMENTS
/* Don't break until after the comment leader */
if (curwin->w_cursor.col < leader_len)
break;
#endif
col = curwin->w_cursor.col;
inc_cursor();
/* Don't change end_foundcol if already set. */
if (foundcol != curwin->w_cursor.col)
{
foundcol = curwin->w_cursor.col;
end_foundcol = foundcol;
if (curwin->w_cursor.col <= (colnr_T)wantcol)
break;
}
curwin->w_cursor.col = col;
}
if (curwin->w_cursor.col == 0)
break;
col = curwin->w_cursor.col;
dec_cursor();
cc = gchar_cursor();
if (WHITECHAR(cc))
continue; /* break with space */
#ifdef FEAT_COMMENTS
/* Don't break until after the comment leader */
if (curwin->w_cursor.col < leader_len)
break;
#endif
curwin->w_cursor.col = col;
foundcol = curwin->w_cursor.col;
if (curwin->w_cursor.col < (colnr_T)wantcol)
foundcol += (*mb_char2len)(cc);
end_foundcol = foundcol;
break;
if (curwin->w_cursor.col <= (colnr_T)wantcol)
break;
}
#endif
if (curwin->w_cursor.col == 0)
@@ -5926,14 +5969,15 @@ internal_format(textwidth, second_indent, flags, format_only)
orig_col = startcol; /* Will start backspacing from here */
else
#endif
replace_offset = startcol - end_foundcol - 1;
replace_offset = startcol - end_foundcol;
/*
* adjust startcol for spaces that will be deleted and
* characters that will remain on top line
*/
curwin->w_cursor.col = foundcol;
while (cc = gchar_cursor(), WHITECHAR(cc))
while ((cc = gchar_cursor(), WHITECHAR(cc))
&& (!fo_white_par || curwin->w_cursor.col < startcol))
inc_cursor();
startcol -= curwin->w_cursor.col;
if (startcol < 0)
@@ -8509,7 +8553,7 @@ ins_bs(c, mode, inserted_space_p)
if (mode == BACKSPACE_LINE
&& (curbuf->b_p_ai
#ifdef FEAT_CINDENT
|| cindent_on()
|| cindent_on()
#endif
)
#ifdef FEAT_RIGHTLEFT

View File

@@ -146,7 +146,9 @@ static int get_mac_fio_flags __ARGS((char_u *ptr));
# endif
#endif
static int move_lines __ARGS((buf_T *frombuf, buf_T *tobuf));
#ifdef TEMPDIRNAMES
static void vim_settempdir __ARGS((char_u *tempdir));
#endif
#ifdef FEAT_AUTOCMD
static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
#endif
@@ -2254,6 +2256,14 @@ failed:
if (!read_buffer && !read_stdin)
close(fd); /* errors are ignored */
#ifdef HAVE_FD_CLOEXEC
else
{
int fdflags = fcntl(fd, F_GETFD);
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC);
}
#endif
vim_free(buffer);
#ifdef HAVE_DUP
@@ -6987,6 +6997,7 @@ vim_deltempdir()
}
#endif
#ifdef TEMPDIRNAMES
/*
* Directory "tempdir" was created. Expand this name to a full path and put
* it in "vim_tempdir". This avoids that using ":cd" would confuse us.
@@ -7013,6 +7024,7 @@ vim_settempdir(tempdir)
vim_free(buf);
}
}
#endif
/*
* vim_tempname(): Return a unique name that can be used for a temp file.

View File

@@ -1343,6 +1343,11 @@ mf_do_open(mfp, fname, flags)
}
else
{
#ifdef HAVE_FD_CLOEXEC
int fdflags = fcntl(mfp->mf_fd, F_GETFD);
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
#endif
#ifdef HAVE_SELINUX
mch_copy_sec(fname, mfp->mf_fname);
#endif

View File

@@ -382,7 +382,7 @@ ml_open(buf)
dp->db_index[0] = --dp->db_txt_start; /* at end of block */
dp->db_free -= 1 + INDEX_SIZE;
dp->db_line_count = 1;
*((char_u *)dp + dp->db_txt_start) = NUL; /* emtpy line */
*((char_u *)dp + dp->db_txt_start) = NUL; /* empty line */
return OK;
@@ -490,6 +490,13 @@ ml_setname(buf)
EMSG(_("E301: Oops, lost the swap file!!!"));
return;
}
#ifdef HAVE_FD_CLOEXEC
{
int fdflags = fcntl(mfp->mf_fd, F_GETFD);
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
}
#endif
}
if (!success)
EMSG(_("E302: Could not rename swap file"));

View File

@@ -1390,6 +1390,7 @@ vim_strsave_shellescape(string, do_special)
*d++ = '\\'; /* insert backslash */
while (--l >= 0) /* copy the var */
*d++ = *p++;
continue;
}
MB_COPY_CHAR(p, d);

View File

@@ -5597,7 +5597,10 @@ x11_export_final_selection()
vc.vc_type = CONV_NONE;
if (convert_setup(&vc, p_enc, (char_u *)"latin1") == OK)
{
conv_str = string_convert(&vc, str, (int*)&len);
int intlen = len;
conv_str = string_convert(&vc, str, &intlen);
len = intlen;
if (conv_str != NULL)
{
vim_free(str);

View File

@@ -583,6 +583,7 @@ static int re_has_z; /* \z item detected */
#endif
static char_u *regcode; /* Code-emit pointer, or JUST_CALC_SIZE */
static long regsize; /* Code size. */
static int reg_toolong; /* TRUE when offset out of range */
static char_u had_endbrace[NSUBEXP]; /* flags, TRUE if end of () found */
static unsigned regflags; /* RF_ flags for prog */
static long brace_min[10]; /* Minimums for complex brace repeats */
@@ -1028,9 +1029,11 @@ vim_regcomp(expr, re_flags)
regcomp_start(expr, re_flags);
regcode = r->program;
regc(REGMAGIC);
if (reg(REG_NOPAREN, &flags) == NULL)
if (reg(REG_NOPAREN, &flags) == NULL || reg_toolong)
{
vim_free(r);
if (reg_toolong)
EMSG_RET_NULL(_("E339: Pattern too long"));
return NULL;
}
@@ -1141,6 +1144,7 @@ regcomp_start(expr, re_flags)
re_has_z = 0;
#endif
regsize = 0L;
reg_toolong = FALSE;
regflags = 0;
#if defined(FEAT_SYN_HL) || defined(PROTO)
had_eol = FALSE;
@@ -1228,7 +1232,7 @@ reg(paren, flagp)
{
skipchr();
br = regbranch(&flags);
if (br == NULL)
if (br == NULL || reg_toolong)
return NULL;
regtail(ret, br); /* BRANCH -> BRANCH. */
if (!(flags & HASWIDTH))
@@ -1313,6 +1317,8 @@ regbranch(flagp)
break;
skipchr();
regtail(latest, regnode(END)); /* operand ends */
if (reg_toolong)
break;
reginsert(MATCH, latest);
chain = latest;
}
@@ -1382,7 +1388,7 @@ regconcat(flagp)
break;
default:
latest = regpiece(&flags);
if (latest == NULL)
if (latest == NULL || reg_toolong)
return NULL;
*flagp |= flags & (HASWIDTH | HASNL | HASLOOKBH);
if (chain == NULL) /* First piece. */
@@ -2540,8 +2546,16 @@ regtail(p, val)
offset = (int)(scan - val);
else
offset = (int)(val - scan);
*(scan + 1) = (char_u) (((unsigned)offset >> 8) & 0377);
*(scan + 2) = (char_u) (offset & 0377);
/* When the offset uses more than 16 bits it can no longer fit in the two
* bytes avaliable. Use a global flag to avoid having to check return
* values in too many places. */
if (offset > 0xffff)
reg_toolong = TRUE;
else
{
*(scan + 1) = (char_u) (((unsigned)offset >> 8) & 0377);
*(scan + 2) = (char_u) (offset & 0377);
}
}
/*
@@ -5764,6 +5778,8 @@ do_class:
/*
* regnext - dig the "next" pointer out of a node
* Returns NULL when calculating size, when there is no next item and when
* there is an error.
*/
static char_u *
regnext(p)
@@ -5771,7 +5787,7 @@ regnext(p)
{
int offset;
if (p == JUST_CALC_SIZE)
if (p == JUST_CALC_SIZE || reg_toolong)
return NULL;
offset = NEXT(p);
@@ -6812,6 +6828,8 @@ static int can_f_submatch = FALSE; /* TRUE when submatch() can be used */
* that contains a call to substitute() and submatch(). */
static regmatch_T *submatch_match;
static regmmatch_T *submatch_mmatch;
static linenr_T submatch_firstlnum;
static linenr_T submatch_maxline;
#endif
#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) || defined(PROTO)
@@ -6925,7 +6943,6 @@ vim_regsub_both(source, dest, copy, magic, backslash)
}
else
{
linenr_T save_reg_maxline;
win_T *save_reg_win;
int save_ireg_ic;
@@ -6937,7 +6954,8 @@ vim_regsub_both(source, dest, copy, magic, backslash)
* vim_regexec_multi() can't be called recursively. */
submatch_match = reg_match;
submatch_mmatch = reg_mmatch;
save_reg_maxline = reg_maxline;
submatch_firstlnum = reg_firstlnum;
submatch_maxline = reg_maxline;
save_reg_win = reg_win;
save_ireg_ic = ireg_ic;
can_f_submatch = TRUE;
@@ -6960,7 +6978,8 @@ vim_regsub_both(source, dest, copy, magic, backslash)
reg_match = submatch_match;
reg_mmatch = submatch_mmatch;
reg_maxline = save_reg_maxline;
reg_firstlnum = submatch_firstlnum;
reg_maxline = submatch_maxline;
reg_win = save_reg_win;
ireg_ic = save_ireg_ic;
can_f_submatch = FALSE;
@@ -7195,6 +7214,31 @@ exit:
}
#ifdef FEAT_EVAL
static char_u *reg_getline_submatch __ARGS((linenr_T lnum));
/*
* Call reg_getline() with the line numbers from the submatch. If a
* substitute() was used the reg_maxline and other values have been
* overwritten.
*/
static char_u *
reg_getline_submatch(lnum)
linenr_T lnum;
{
char_u *s;
linenr_T save_first = reg_firstlnum;
linenr_T save_max = reg_maxline;
reg_firstlnum = submatch_firstlnum;
reg_maxline = submatch_maxline;
s = reg_getline(lnum);
reg_firstlnum = save_first;
reg_maxline = save_max;
return s;
}
/*
* Used for the submatch() function: get the string from the n'th submatch in
* allocated memory.
@@ -7225,7 +7269,7 @@ reg_submatch(no)
if (lnum < 0 || submatch_mmatch->endpos[no].lnum < 0)
return NULL;
s = reg_getline(lnum) + submatch_mmatch->startpos[no].col;
s = reg_getline_submatch(lnum) + submatch_mmatch->startpos[no].col;
if (s == NULL) /* anti-crash check, cannot happen? */
break;
if (submatch_mmatch->endpos[no].lnum == lnum)
@@ -7251,7 +7295,7 @@ reg_submatch(no)
++lnum;
while (lnum < submatch_mmatch->endpos[no].lnum)
{
s = reg_getline(lnum++);
s = reg_getline_submatch(lnum++);
if (round == 2)
STRCPY(retval + len, s);
len += (int)STRLEN(s);
@@ -7260,7 +7304,7 @@ reg_submatch(no)
++len;
}
if (round == 2)
STRNCPY(retval + len, reg_getline(lnum),
STRNCPY(retval + len, reg_getline_submatch(lnum),
submatch_mmatch->endpos[no].col);
len += submatch_mmatch->endpos[no].col;
if (round == 2)

View File

@@ -323,6 +323,7 @@ update_screen(type)
int did_one;
#endif
/* Don't do anything if the screen structures are (not yet) valid. */
if (!screen_valid(TRUE))
return;
@@ -342,7 +343,9 @@ update_screen(type)
if (curwin->w_lines_valid == 0 && type < NOT_VALID)
type = NOT_VALID;
if (!redrawing())
/* Postpone the redrawing when it's not needed and when being called
* recursively. */
if (!redrawing() || updating_screen)
{
redraw_later(type); /* remember type for next time */
must_redraw = type;
@@ -582,6 +585,7 @@ static void update_finish __ARGS((void));
/*
* Prepare for updating one or more windows.
* Caller must check for "updating_screen" already set to avoid recursiveness.
*/
static void
update_prepare()
@@ -663,7 +667,9 @@ update_debug_sign(buf, lnum)
doit = TRUE;
}
if (!doit)
/* Return when there is nothing to do or screen updating already
* happening. */
if (!doit || updating_screen)
return;
/* update all windows that need updating */
@@ -696,6 +702,10 @@ update_debug_sign(buf, lnum)
updateWindow(wp)
win_T *wp;
{
/* return if already busy updating */
if (updating_screen)
return;
update_prepare();
#ifdef FEAT_CLIPBOARD

View File

@@ -26,7 +26,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test48.out test51.out test53.out test54.out test55.out \
test56.out test57.out test58.out test59.out test60.out \
test61.out test62.out test63.out test64.out test65.out \
test66.out test67.out
test66.out test67.out test68.out test69.out
.SUFFIXES: .in .out
@@ -113,3 +113,5 @@ test64.out: test64.in
test65.out: test65.in
test66.out: test66.in
test67.out: test67.in
test68.out: test68.in
test69.out: test69.in

View File

@@ -26,7 +26,8 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test15.out test17.out test18.out test21.out test26.out \
test30.out test31.out test32.out test33.out test34.out \
test37.out test38.out test39.out test40.out test41.out \
test42.out test52.out test65.out test66.out test67.out
test42.out test52.out test65.out test66.out test67.out \
test68.out test69.out
SCRIPTS32 = test50.out

View File

@@ -45,7 +45,8 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test15.out test17.out test18.out test21.out test26.out \
test30.out test31.out test32.out test33.out test34.out \
test37.out test38.out test39.out test40.out test41.out \
test42.out test52.out test65.out test66.out test67.out
test42.out test52.out test65.out test66.out test67.out \
test68.out test69.out
SCRIPTS32 = test50.out

View File

@@ -26,7 +26,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test48.out test51.out test53.out test54.out test55.out \
test56.out test57.out test58.out test59.out test60.out \
test61.out test62.out test63.out test64.out test65.out \
test66.out test67.out
test66.out test67.out test68.out test69.out
.SUFFIXES: .in .out

View File

@@ -69,7 +69,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test48.out test51.out test53.out test54.out test55.out \
test56.out test57.out test60.out \
test61.out test62.out test63.out test64.out test65.out \
test66.out test67.out
test66.out test67.out test68.out test69.out
.IFDEF WANT_GUI
SCRIPT_GUI = test16.out

View File

@@ -22,7 +22,8 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
test48.out test49.out test51.out test52.out test53.out \
test54.out test55.out test56.out test57.out test58.out \
test59.out test60.out test61.out test62.out test63.out \
test64.out test65.out test66.out test67.out
test64.out test65.out test66.out test67.out test68.out \
test69.out
SCRIPTS_GUI = test16.out

56
src/testdir/test68.in Normal file
View File

@@ -0,0 +1,56 @@
Test for text formatting.
Results of test68:
STARTTEST
:so small.vim
/^{/+1
:set noai tw=2 fo=t
gRa b
ENDTEST
{
}
STARTTEST
/^{/+1
:set ai tw=2 fo=tw
gqgqjjllab
ENDTEST
{
a b
a
}
STARTTEST
/^{/+1
:set tw=3 fo=t
gqgqo
a 
ENDTEST
{
a 
}
STARTTEST
/^{/+1
:set tw=2 fo=tcq1 comments=:#
gqgqjgqgqo
a b
#a b
ENDTEST
{
a b
#a b
}
STARTTEST
:g/^STARTTEST/.,/^ENDTEST/d
:1;/^Results/,$wq! test.out
ENDTEST

35
src/testdir/test68.ok Normal file
View File

@@ -0,0 +1,35 @@
Results of test68:
{
a
b
}
{
a
b
a
b
}
{
a

a

}
{
a b
#a b
a b
#a b
}

139
src/testdir/test69.in Normal file
View File

@@ -0,0 +1,139 @@
Test for multi-byte text formatting.
STARTTEST
:so mbyte.vim
:set encoding=utf-8
ENDTEST
Results of test69:
STARTTEST
/^{/+1
:set tw=2 fo=t
gqgqjgqgqo
abc 
ENDTEST
{
abc
}
STARTTEST
/^{/+1
:set tw=1 fo=tm
gqgqjgqgqjgqgqjgqgqjgqgqo
a
a

ENDTEST
{
a
a
}
STARTTEST
/^{/+1
:set tw=2 fo=tm
gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo
a
a
a
ab
abc
ab c
ab
ENDTEST
{
a
a
a
ab
abc
ab c
ab
}
STARTTEST
/^{/+1
:set ai tw=2 fo=tm
gqgqjgqgqo
a
ENDTEST
{
a
}
STARTTEST
/^{/+1
:set noai tw=2 fo=tm
gqgqjgqgqo
a
ENDTEST
{
a
}
STARTTEST
/^{/+1
:set tw=2 fo=cqm comments=n:
gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo
a
a
a

ENDTEST
{
a
a
a
}
STARTTEST
/^{/+1
:set tw=2 fo=tm
Ra
ENDTEST
{
}
STARTTEST
:g/^STARTTEST/.,/^ENDTEST/d
:1;/^Results/,$wq! test.out
ENDTEST

142
src/testdir/test69.ok Normal file
View File

@@ -0,0 +1,142 @@
Results of test69:
{
abc
abc
}
{
a
a
a
a
}
{
a
a
a
ab
abc
ab
c
ab
a
a
a
ab
abc
ab
c
ab
}
{
a
a
}
{
a
a
}
{
a
a
a
a
a
a
}
{
a
}

View File

@@ -681,6 +681,28 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
310,
/**/
309,
/**/
308,
/**/
307,
/**/
306,
/**/
305,
/**/
304,
/**/
303,
/**/
302,
/**/
301,
/**/
300,
/**/
299,
/**/