Compare commits

...

13 Commits

Author SHA1 Message Date
Bram Moolenaar
8c7694a864 updated for version 7.3.769
Problem:    'matchpairs' does not work with multi-byte characters.
Solution:   Make it work. (Christian Brabandt)
2013-01-17 17:02:05 +01:00
Bram Moolenaar
3e37fd0950 updated for version 7.3.768
Problem:    settabvar() and setwinvar() may move the cursor.
Solution:   Save and restore the cursor position when appropriate. (idea by
            Yasuhiro Matsumoto)
2013-01-17 15:37:01 +01:00
Bram Moolenaar
8fae8e658f updated for version 7.3.767
Problem:    (Win32) The _errno used for iconv may be the wrong one.
Solution:   Use the _errno from iconv.dll. (Ken Takata)
2013-01-17 14:39:47 +01:00
Bram Moolenaar
117f2c4b91 updated for version 7.3.766
Problem:    ":help cpo-*" jumps to the wrong place.
Solution:   Make it equivalent to ":help cpo-star".
2013-01-17 14:09:44 +01:00
Bram Moolenaar
802418d5eb updated for version 7.3.765
Problem:    Segfault when doing "cclose" on BufUnload in a python function.
            (Sean Reifschneider)
Solution:   Skip window with NULL buffer. (Christian Brabandt)
2013-01-17 14:00:11 +01:00
Bram Moolenaar
c4fba6f881 updated for version 7.3.764
Problem:    Not all message translation files are installed.
Solution:   Also install the converted files.
2013-01-17 13:37:32 +01:00
Bram Moolenaar
8754deb3b6 updated for version 7.3.763
Problem:    Jumping to a mark does not open a fold if it is in the same line.
            (Wiktor Ruben)
Solution:   Also compare the column after the jump. (Christian Brabandt)
2013-01-17 13:24:08 +01:00
Bram Moolenaar
14e28811b3 updated for version 7.3.762
Problem:    On some systems the tabline is not redrawn.
Solution:   Call RedrawWindow(). (Charles Peacech)
2012-12-16 12:50:39 +01:00
Bram Moolenaar
ba6e858556 updated for version 7.3.761
Problem:    In Visual mode a "-p does not work. (Marcin Szamotulski)
Solution:   Avoid writing to "- before putting it. (Christian Brabandt)
2012-12-12 18:20:32 +01:00
Bram Moolenaar
83dadafdd7 updated for version 7.3.760
Problem:    dv_ deletes the white space before the line.
Solution:   Move the cursor to the first non-white. (Christian Brabandt)
2012-12-12 17:33:32 +01:00
Bram Moolenaar
4b166d0a6d updated for version 7.3.759
Problem:    MS-Windows: Updating the tabline is slow when there are many tabs.
Solution:   Disable redrawing while performing the update. (Arseny Kapoulkine)
2012-12-12 17:12:25 +01:00
Bram Moolenaar
cfde76c74d updated for version 7.3.758
Problem:    Matchit plugin does not handle space in #ifdef.
Solution:   Change matching pattern to allow spaces. (Mike Morearty)
2012-12-12 16:43:58 +01:00
Bram Moolenaar
27356ad4f4 updated for version 7.3.757
Problem:    Issue 96: May access freed memory when a put command triggers
            autocommands. (Dominique Pelle)
Solution:   Call u_save() before getting y_array.
2012-12-12 16:11:36 +01:00
21 changed files with 325 additions and 89 deletions

View File

@@ -131,7 +131,7 @@ function! s:Match_wrapper(word, forward, mode) range
" let default = substitute(escape(&mps, '[$^.*~\\/?]'), '[,:]\+',
" \ '\\|', 'g').'\|\/\*\|\*\/\|#if\>\|#ifdef\>\|#else\>\|#elif\>\|#endif\>'
let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
\ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>'
\ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
" s:all = pattern with all the keywords
let match_words = match_words . (strlen(match_words) ? "," : "") . default
if match_words !~ s:notslash . '\\\d'
@@ -649,7 +649,7 @@ fun! s:MultiMatch(spflag, mode)
" s:all regexp based on s:pat and the default groups
" This part is copied and slightly modified from s:Match_wrapper().
let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
\ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>'
\ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
" Allow b:match_words = "GetVimMatchWords()" .
if b:match_words =~ ":"
let match_words = b:match_words

View File

@@ -372,6 +372,8 @@ edit(cmdchar, startln, count)
*/
if (cmdchar != 'r' && cmdchar != 'v')
{
pos_T save_cursor = curwin->w_cursor;
# ifdef FEAT_EVAL
if (cmdchar == 'R')
ptr = (char_u *)"r";
@@ -382,6 +384,19 @@ edit(cmdchar, startln, count)
set_vim_var_string(VV_INSERTMODE, ptr, 1);
# endif
apply_autocmds(EVENT_INSERTENTER, NULL, NULL, FALSE, curbuf);
/* Since Insert mode was not started yet a call to check_cursor_col()
* may have moved the cursor, especially with the "A" command. */
if (curwin->w_cursor.col != save_cursor.col
&& curwin->w_cursor.lnum == save_cursor.lnum)
{
int save_state = State;
curwin->w_cursor = save_cursor;
State = INSERT;
check_cursor_col();
State = save_state;
}
}
#endif

View File

@@ -5849,14 +5849,14 @@ find_help_tags(arg, num_matches, matches, keep_lang)
int i;
static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*",
"/*", "/\\*", "\"*", "**",
"/\\(\\)",
"cpo-*", "/\\(\\)",
"?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?",
"/\\?", "/\\z(\\)", "\\=", ":s\\=",
"[count]", "[quotex]", "[range]",
"[pattern]", "\\|", "\\%$"};
static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star",
"/star", "/\\\\star", "quotestar", "starstar",
"/\\\\(\\\\)",
"cpo-star", "/\\\\(\\\\)",
"?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?",
"/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
"\\[count]", "\\[quotex]", "\\[range]",

View File

@@ -2452,7 +2452,6 @@ gui_mch_update_tabline(void)
TCITEM tie;
int nr = 0;
int curtabidx = 0;
RECT rc;
#ifdef FEAT_MBYTE
static int use_unicode = FALSE;
int uu;
@@ -2479,13 +2478,16 @@ gui_mch_update_tabline(void)
tie.mask = TCIF_TEXT;
tie.iImage = -1;
/* Disable redraw for tab updates to eliminate O(N^2) draws. */
SendMessage(s_tabhwnd, WM_SETREDRAW, (WPARAM)FALSE, 0);
/* Add a label for each tab page. They all contain the same text area. */
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next, ++nr)
{
if (tp == curtab)
curtabidx = nr;
if (!TabCtrl_GetItemRect(s_tabhwnd, nr, &rc))
if (nr >= TabCtrl_GetItemCount(s_tabhwnd))
{
/* Add the tab */
tie.pszText = "-Empty-";
@@ -2519,11 +2521,16 @@ gui_mch_update_tabline(void)
}
/* Remove any old labels. */
while (TabCtrl_GetItemRect(s_tabhwnd, nr, &rc))
while (nr < TabCtrl_GetItemCount(s_tabhwnd))
TabCtrl_DeleteItem(s_tabhwnd, nr);
if (TabCtrl_GetCurSel(s_tabhwnd) != curtabidx)
TabCtrl_SetCurSel(s_tabhwnd, curtabidx);
/* Re-enable redraw and redraw. */
SendMessage(s_tabhwnd, WM_SETREDRAW, (WPARAM)TRUE, 0);
RedrawWindow(s_tabhwnd, NULL, NULL,
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
}
/*

View File

@@ -1376,6 +1376,9 @@ getout(exitval)
for (wp = (tp == curtab)
? firstwin : tp->tp_firstwin; wp != NULL; wp = wp->w_next)
{
if (wp->w_buffer == NULL)
/* Autocmd must have close the buffer already, skip. */
continue;
buf = wp->w_buffer;
if (buf->b_changedtick != -1)
{

View File

@@ -3242,7 +3242,7 @@ utf_strnicmp(s1, s2, n1, n2)
/*
* Version of strnicmp() that handles multi-byte characters.
* Needed for Big5, Sjift-JIS and UTF-8 encoding. Other DBCS encodings can
* Needed for Big5, Shift-JIS and UTF-8 encoding. Other DBCS encodings can
* probably use strnicmp(), because there are no ASCII characters in the
* second byte.
* Returns zero if s1 and s2 are equal (ignoring case), the difference between
@@ -4293,6 +4293,44 @@ static HINSTANCE hMsvcrtDLL = 0;
# define DYNAMIC_MSVCRT_DLL "msvcrt.dll"
# endif
/*
* Get the address of 'funcname' which is imported by 'hInst' DLL.
*/
static void *
get_iconv_import_func(HINSTANCE hInst, const char *funcname)
{
PBYTE pImage = (PBYTE)hInst;
PIMAGE_DOS_HEADER pDOS = (PIMAGE_DOS_HEADER)hInst;
PIMAGE_NT_HEADERS pPE;
PIMAGE_IMPORT_DESCRIPTOR pImpDesc;
PIMAGE_THUNK_DATA pIAT; /* Import Address Table */
PIMAGE_THUNK_DATA pINT; /* Import Name Table */
PIMAGE_IMPORT_BY_NAME pImpName;
if (pDOS->e_magic != IMAGE_DOS_SIGNATURE)
return NULL;
pPE = (PIMAGE_NT_HEADERS)(pImage + pDOS->e_lfanew);
if (pPE->Signature != IMAGE_NT_SIGNATURE)
return NULL;
pImpDesc = (PIMAGE_IMPORT_DESCRIPTOR)(pImage
+ pPE->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT]
.VirtualAddress);
for (; pImpDesc->FirstThunk; ++pImpDesc)
{
pIAT = (PIMAGE_THUNK_DATA)(pImage + pImpDesc->FirstThunk);
pINT = (PIMAGE_THUNK_DATA)(pImage + pImpDesc->OriginalFirstThunk);
for (; pIAT->u1.Function; ++pIAT, ++pINT)
{
if (IMAGE_SNAP_BY_ORDINAL(pINT->u1.Ordinal))
continue;
pImpName = (PIMAGE_IMPORT_BY_NAME)(pImage + pINT->u1.AddressOfData);
if (strcmp(pImpName->Name, funcname) == 0)
return (void *)pIAT->u1.Function;
}
}
return NULL;
}
/*
* Try opening the iconv.dll and return TRUE if iconv() can be used.
*/
@@ -4326,7 +4364,9 @@ iconv_enabled(verbose)
iconv_open = (void *)GetProcAddress(hIconvDLL, "libiconv_open");
iconv_close = (void *)GetProcAddress(hIconvDLL, "libiconv_close");
iconvctl = (void *)GetProcAddress(hIconvDLL, "libiconvctl");
iconv_errno = (void *)GetProcAddress(hMsvcrtDLL, "_errno");
iconv_errno = get_iconv_import_func(hIconvDLL, "_errno");
if (iconv_errno == NULL)
iconv_errno = (void *)GetProcAddress(hMsvcrtDLL, "_errno");
if (iconv == NULL || iconv_open == NULL || iconv_close == NULL
|| iconvctl == NULL || iconv_errno == NULL)
{

View File

@@ -2288,14 +2288,18 @@ ins_char_bytes(buf, charlen)
*/
if (p_sm && (State & INSERT)
&& msg_silent == 0
#ifdef FEAT_MBYTE
&& charlen == 1
#endif
#ifdef FEAT_INS_EXPAND
&& !ins_compl_active()
#endif
)
showmatch(c);
{
#ifdef FEAT_MBYTE
if (has_mbyte)
showmatch(mb_ptr2char(buf));
else
#endif
showmatch(c);
}
#ifdef FEAT_RIGHTLEFT
if (!p_ri || (State & REPLACE_FLAG))

View File

@@ -7523,7 +7523,7 @@ nv_gomark(cap)
pos_T *pos;
int c;
#ifdef FEAT_FOLDING
linenr_T lnum = curwin->w_cursor.lnum;
pos_T old_cursor = curwin->w_cursor;
int old_KeyTyped = KeyTyped; /* getting file may reset it */
#endif
@@ -7552,7 +7552,7 @@ nv_gomark(cap)
#endif
#ifdef FEAT_FOLDING
if (cap->oap->op_type == OP_NOP
&& (pos == (pos_T *)-1 || lnum != curwin->w_cursor.lnum)
&& (pos == (pos_T *)-1 || !equalpos(old_cursor, *pos))
&& (fdo_flags & FDO_MARK)
&& old_KeyTyped)
foldOpenCursor();
@@ -8628,7 +8628,9 @@ nv_lineop(cap)
cap->oap->motion_type = MLINE;
if (cursor_down(cap->count1 - 1L, cap->oap->op_type == OP_NOP) == FAIL)
clearopbeep(cap->oap);
else if ( cap->oap->op_type == OP_DELETE
else if ( (cap->oap->op_type == OP_DELETE /* only with linewise motions */
&& cap->oap->motion_force != 'v'
&& cap->oap->motion_force != Ctrl_V)
|| cap->oap->op_type == OP_LSHIFT
|| cap->oap->op_type == OP_RSHIFT)
beginline(BL_SOL | BL_FIX);
@@ -9410,14 +9412,15 @@ nv_put(cap)
# ifdef FEAT_CLIPBOARD
adjust_clip_reg(&regname);
# endif
if (regname == 0 || regname == '"' || VIM_ISDIGIT(regname)
if (regname == 0 || regname == '"'
|| VIM_ISDIGIT(regname) || regname == '-'
# ifdef FEAT_CLIPBOARD
|| (clip_unnamed && (regname == '*' || regname == '+'))
# endif
)
{
/* the delete is going to overwrite the register we want to
/* The delete is going to overwrite the register we want to
* put, save it first. */
reg1 = get_register(regname, TRUE);
}

View File

@@ -3351,6 +3351,12 @@ do_put(regname, dir, count, flags)
return;
}
#ifdef FEAT_AUTOCMD
/* Autocommands may be executed when saving lines for undo, which may make
* y_array invalid. Start undo now to avoid that. */
u_save(curwin->w_cursor.lnum, curwin->w_cursor.lnum + 1);
#endif
if (insert_string != NULL)
{
y_type = MCHAR;

View File

@@ -6149,16 +6149,46 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
/* 'matchpairs' */
else if (gvarp == &p_mps)
{
/* Check for "x:y,x:y" */
for (p = *varp; *p != NUL; p += 4)
#ifdef FEAT_MBYTE
if (has_mbyte)
{
if (p[1] != ':' || p[2] == NUL || (p[3] != NUL && p[3] != ','))
for (p = *varp; *p != NUL; ++p)
{
errmsg = e_invarg;
break;
int x2,x3 = -1;
if (*p != NUL)
p += mb_ptr2len(p);
if (*p != NUL)
x2 = *p++;
if (*p != NUL)
{
x3 = mb_ptr2char(p);
p += mb_ptr2len(p);
}
if (x2 != ':' || x2 == -1 || x3 == -1
|| (*p != NUL && *p != ','))
{
errmsg = e_invarg;
break;
}
if (*p == NUL)
break;
}
}
else
#endif
{
/* Check for "x:y,x:y" */
for (p = *varp; *p != NUL; p += 4)
{
if (p[1] != ':' || p[2] == NUL || (p[3] != NUL && p[3] != ','))
{
errmsg = e_invarg;
break;
}
if (p[3] == NUL)
break;
}
if (p[3] == NUL)
break;
}
}
@@ -11453,3 +11483,101 @@ get_sts_value()
{
return curbuf->b_p_sts < 0 ? get_sw_value() : curbuf->b_p_sts;
}
/*
* Check matchpairs option for "*initc".
* If there is a match set "*initc" to the matching character and "*findc" to
* the opposite character. Set "*backwards" to the direction.
* When "switchit" is TRUE swap the direction.
*/
void
find_mps_values(initc, findc, backwards, switchit)
int *initc;
int *findc;
int *backwards;
int switchit;
{
char_u *ptr;
ptr = curbuf->b_p_mps;
while (*ptr != NUL)
{
#ifdef FEAT_MBYTE
if (has_mbyte)
{
char_u *prev;
if (mb_ptr2char(ptr) == *initc)
{
if (switchit)
{
*findc = *initc;
*initc = mb_ptr2char(ptr + mb_ptr2len(ptr) + 1);
*backwards = TRUE;
}
else
{
*findc = mb_ptr2char(ptr + mb_ptr2len(ptr) + 1);
*backwards = FALSE;
}
return;
}
prev = ptr;
ptr += mb_ptr2len(ptr) + 1;
if (mb_ptr2char(ptr) == *initc)
{
if (switchit)
{
*findc = *initc;
*initc = mb_ptr2char(prev);
*backwards = FALSE;
}
else
{
*findc = mb_ptr2char(prev);
*backwards = TRUE;
}
return;
}
ptr += mb_ptr2len(ptr);
}
else
#endif
{
if (*ptr == *initc)
{
if (switchit)
{
*backwards = TRUE;
*findc = *initc;
*initc = ptr[2];
}
else
{
*backwards = FALSE;
*findc = ptr[2];
}
return;
}
ptr += 2;
if (*ptr == *initc)
{
if (switchit)
{
*backwards = FALSE;
*findc = *initc;
*initc = ptr[-2];
}
else
{
*backwards = TRUE;
*findc = ptr[-2];
}
return;
}
++ptr;
}
if (*ptr == ',')
++ptr;
}
}

View File

@@ -34,6 +34,16 @@ LANGUAGES = \
zh_TW \
zh_TW.UTF-8
CONVERTED = \
cs.cp1250 \
ja.sjis \
pl.cp1250 \
pl.UTF-8 \
ru.cp1251 \
sk.cp1250 \
uk.cp1251 \
zh_CN.cp936
MOFILES = \
af.mo \
ca.mo \
@@ -64,7 +74,7 @@ MOFILES = \
zh_TW.UTF-8.mo \
zh_TW.mo
CONVERTED = \
MOCONVERTED = \
cs.cp1250.mo \
ja.sjis.mo \
pl.cp1250.mo \
@@ -126,7 +136,7 @@ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
.SUFFIXES:
.SUFFIXES: .po .mo .pot .ck
.PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES)
.PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES) $(CONVERTED)
.po.mo:
$(MSGFMT) -o $@ $<
@@ -135,13 +145,13 @@ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
$(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $<
touch $@
all: $(MOFILES)
all: $(MOFILES) $(MOCONVERTED)
check: $(CHECKFILES)
install: $(MOFILES)
install: $(MOFILES) $(MOCONVERTED)
@$(MAKE) prefixcheck
for lang in $(LANGUAGES); do \
for lang in $(LANGUAGES) $(CONVERTED); do \
dir=$(LOCALEDIR)/$$lang/; \
if test ! -x "$$dir"; then \
mkdir $$dir; chmod 755 $$dir; \
@@ -158,13 +168,13 @@ install: $(MOFILES)
uninstall:
@$(MAKE) prefixcheck
for cat in $(MOFILES); do \
for cat in $(MOFILES) $(MOCONVERTED); do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
rm -f $(LOCALEDIR)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
done
converted: $(CONVERTED)
converted: $(MOCONVERTED)
# Norwegian/Bokmal: "nb" is an alias for "no".
# Copying the file is not efficient, but I don't know of another way to make

View File

@@ -59,4 +59,5 @@ int file_ff_differs __ARGS((buf_T *buf, int ignore_empty));
int check_ff_value __ARGS((char_u *p));
long get_sw_value __ARGS((void));
long get_sts_value __ARGS((void));
void find_mps_values __ARGS((int *initc, int *findc, int *backwards, int switchit));
/* vim: set ft=c : */

View File

@@ -1786,28 +1786,8 @@ findmatchlimit(oap, initc, flags, maxtravel)
}
else if (initc != '#' && initc != NUL)
{
/* 'matchpairs' is "x:y,x:y" */
for (ptr = curbuf->b_p_mps; *ptr; ptr += 2)
{
if (*ptr == initc)
{
findc = initc;
initc = ptr[2];
backwards = TRUE;
break;
}
ptr += 2;
if (*ptr == initc)
{
findc = initc;
initc = ptr[-2];
backwards = FALSE;
break;
}
if (ptr[1] != ',')
break;
}
if (!findc) /* invalid initc! */
find_mps_values(&initc, &findc, &backwards, TRUE);
if (findc == NUL)
return NULL;
}
/*
@@ -1886,36 +1866,14 @@ findmatchlimit(oap, initc, flags, maxtravel)
--pos.col;
for (;;)
{
initc = linep[pos.col];
initc = PTR2CHAR(linep + pos.col);
if (initc == NUL)
break;
for (ptr = curbuf->b_p_mps; *ptr; ++ptr)
{
if (*ptr == initc)
{
findc = ptr[2];
backwards = FALSE;
break;
}
ptr += 2;
if (*ptr == initc)
{
findc = ptr[-2];
backwards = TRUE;
break;
}
if (!*++ptr)
break;
}
find_mps_values(&initc, &findc, &backwards, FALSE);
if (findc)
break;
#ifdef FEAT_MBYTE
if (has_mbyte)
pos.col += (*mb_ptr2len)(linep + pos.col);
else
#endif
++pos.col;
pos.col += MB_PTR2LEN(linep + pos.col);
}
if (!findc)
{
@@ -2260,7 +2218,8 @@ findmatchlimit(oap, initc, flags, maxtravel)
* inquote if the number of quotes in a line is even, unless this
* line or the previous one ends in a '\'. Complicated, isn't it?
*/
switch (c = linep[pos.col])
c = PTR2CHAR(linep + pos.col);
switch (c)
{
case NUL:
/* at end of line without trailing backslash, reset inquote */
@@ -2469,20 +2428,23 @@ showmatch(c)
* Only show match for chars in the 'matchpairs' option.
*/
/* 'matchpairs' is "x:y,x:y" */
for (p = curbuf->b_p_mps; *p != NUL; p += 2)
for (p = curbuf->b_p_mps; *p != NUL; ++p)
{
if (PTR2CHAR(p) == c
#ifdef FEAT_RIGHTLEFT
if (*p == c && (curwin->w_p_rl ^ p_ri))
break;
&& (curwin->w_p_rl ^ p_ri)
#endif
p += 2;
if (*p == c
)
break;
p += MB_PTR2LEN(p) + 1;
if (PTR2CHAR(p) == c
#ifdef FEAT_RIGHTLEFT
&& !(curwin->w_p_rl ^ p_ri)
#endif
)
break;
if (p[1] != ',')
p += MB_PTR2LEN(p);
if (*p == NUL)
return;
}

View File

@@ -1,4 +1,5 @@
Tests for "r<Tab>" with 'smarttab' and 'expandtab' set/not set.
Also test that dv_ works correctly
STARTTEST
:so small.vim
@@ -16,7 +17,9 @@ r
:" Test that copyindent works with expandtab set
:set expandtab smartindent copyindent ts=8 sw=8 sts=8
o{
x:?^start?,$w! test.out
x:set nosol
/Second line/
fwdv_:?^start?,$w! test.out
:qa!
ENDTEST
@@ -27,3 +30,4 @@ test text
a cde
f ghi
test text
Second line beginning with whitespace

View File

@@ -7,3 +7,4 @@ test text
test text
{
x
with whitespace

View File

@@ -54,8 +54,12 @@ $5lrxa<-- should be 'x'
:" Roy <royl@netropolis.net>.
^O3li4li4li <-- should show the name of a noted text editor
^o4li4li4li <-- and its version number-dd
:"
:" Test for yanking and pasting using the small delete register
gg/^foo
dewve"-p
:wq! test.out
ENDTEST
foo, bar
keyword keyw
all your base are belong to us

View File

@@ -1,3 +1,4 @@
, foo
keyword keyword
all your base
are belong to vim

View File

@@ -1,4 +1,5 @@
Test for multi-byte text formatting.
Also test, that 'mps' with multibyte chars works.
STARTTEST
:so mbyte.vim
@@ -133,6 +134,15 @@ ENDTEST
}
STARTTEST
/^{/+1
:set mps+=u2018:u2019
d%
ENDTEST
{
two three four
}
STARTTEST
:g/^STARTTEST/.,/^ENDTEST/d
:1;/^Results/,$wq! test.out

View File

@@ -140,3 +140,7 @@ a
a
}
{
four
}

View File

@@ -725,6 +725,32 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
769,
/**/
768,
/**/
767,
/**/
766,
/**/
765,
/**/
764,
/**/
763,
/**/
762,
/**/
761,
/**/
760,
/**/
759,
/**/
758,
/**/
757,
/**/
756,
/**/

View File

@@ -2276,9 +2276,15 @@ win_close(win, free_buf)
#endif
}
if (only_one_window() && win_valid(win) && win->w_buffer == NULL
&& (last_window() || curtab != prev_curtab
|| close_last_window_tabpage(win, free_buf, prev_curtab)))
/* Autocommands have close all windows, quit now. */
getout(0);
/* Autocommands may have closed the window already, or closed the only
* other window or moved to another tab page. */
if (!win_valid(win) || last_window() || curtab != prev_curtab
else if (!win_valid(win) || last_window() || curtab != prev_curtab
|| close_last_window_tabpage(win, free_buf, prev_curtab))
return;
@@ -6282,7 +6288,8 @@ only_one_window()
return FALSE;
for (wp = firstwin; wp != NULL; wp = wp->w_next)
if ((!((wp->w_buffer->b_help && !curbuf->b_help)
if (wp->w_buffer != NULL
&& (!((wp->w_buffer->b_help && !curbuf->b_help)
# ifdef FEAT_QUICKFIX
|| wp->w_p_pvw
# endif