mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Merge branch 'vim'
Conflicts: src/auto/configure
This commit is contained in:
@@ -2678,3 +2678,12 @@ c28202427d71b4460122754884bb548f084c3d7a v7-4a-022
|
||||
ba9a11fe25637103e1a77fefbbaed4ac2ff182f9 v7-4a-024
|
||||
1b89e3f916c59fbdfdbd31e4d8af8b22274275b2 v7-4a-025
|
||||
b3ff17862b4c9d06411bd3c854cfceb77d5b97b6 v7-4a-026
|
||||
8edba3805d787f50b51d7fd59899c5361c09a348 v7-4a-027
|
||||
7aca84c0cd37ab4eceab8897e0297e2e318b8fff v7-4a-028
|
||||
2b58913e19a5a40d169f2aa1ef9530a78c375d2e v7-4a-029
|
||||
bc4fb031746594e4e84b36e64389e78454617a86 v7-4a-030
|
||||
839ebe7c1b2fb8150714fc48ec597d2e1f1c7557 v7-4a-031
|
||||
2741b46e96bfe6c06a5e9704bcad649655f7b50f v7-4a-032
|
||||
fa024ce48542356206bf86bdc9286ecf0510ad49 v7-4a-033
|
||||
947edb6335d1e196c27e2e7e0e0a5ed8f6b78498 v7-4a-034
|
||||
4ceacc1b00548c0b21c0dc2628608515899df721 v7-4a-035
|
||||
|
||||
Vendored
+131
-4
@@ -5124,15 +5124,142 @@ echo "${ECHO_T}needed" >&6; }
|
||||
echo "${ECHO_T}not needed" >&6; }
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for ffi_type_void in -lffi" >&5
|
||||
echo $ECHO_N "checking for ffi_type_void in -lffi... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_lib_ffi_ffi_type_void+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lffi $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char ffi_type_void ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return ffi_type_void ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_link") 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext &&
|
||||
$as_test_x conftest$ac_exeext; then
|
||||
ac_cv_lib_ffi_ffi_type_void=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_ffi_ffi_type_void=no
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_lib_ffi_ffi_type_void" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_ffi_ffi_type_void" >&6; }
|
||||
if test $ac_cv_lib_ffi_ffi_type_void = yes; then
|
||||
MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
|
||||
fi
|
||||
|
||||
|
||||
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
|
||||
-DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
|
||||
MZSCHEME_SRC="if_mzsch.c"
|
||||
MZSCHEME_OBJ="objects/if_mzsch.o"
|
||||
MZSCHEME_PRO="if_mzsch.pro"
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
|
||||
{ echo "$as_me:$LINENO: checking if compile and link flags for MzScheme are sane" >&5
|
||||
echo $ECHO_N "checking if compile and link flags for MzScheme are sane... $ECHO_C" >&6; }
|
||||
cflags_save=$CFLAGS
|
||||
libs_save=$LIBS
|
||||
CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
|
||||
LIBS="$LIBS $MZSCHEME_LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_link") 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext &&
|
||||
$as_test_x conftest$ac_exeext; then
|
||||
{ echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6; }; mzs_ok=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
{ echo "$as_me:$LINENO: result: no: MZSCHEME DISABLED" >&5
|
||||
echo "${ECHO_T}no: MZSCHEME DISABLED" >&6; }; mzs_ok=no
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
CFLAGS=$cflags_save
|
||||
LIBS=$libs_save
|
||||
if test $mzs_ok = yes; then
|
||||
MZSCHEME_SRC="if_mzsch.c"
|
||||
MZSCHEME_OBJ="objects/if_mzsch.o"
|
||||
MZSCHEME_PRO="if_mzsch.pro"
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define FEAT_MZSCHEME 1
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
MZSCHEME_CFLAGS=
|
||||
MZSCHEME_LIBS=
|
||||
MZSCHEME_EXTRA=
|
||||
MZSCHEME_MZC=
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
+24
-6
@@ -5323,18 +5323,14 @@ buf_spname(buf)
|
||||
#if defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)
|
||||
if (bt_quickfix(buf))
|
||||
{
|
||||
win_T *win = NULL;
|
||||
win_T *win;
|
||||
tabpage_T *tp;
|
||||
|
||||
/*
|
||||
* For location list window, w_llist_ref points to the location list.
|
||||
* For quickfix window, w_llist_ref is NULL.
|
||||
*/
|
||||
FOR_ALL_TAB_WINDOWS(tp, win)
|
||||
if (win->w_buffer == buf)
|
||||
goto win_found;
|
||||
win_found:
|
||||
if (win != NULL && win->w_llist_ref != NULL)
|
||||
if (find_win_for_buf(buf, &win, &tp) == OK && win->w_llist_ref != NULL)
|
||||
return (char_u *)_(msg_loclist);
|
||||
else
|
||||
return (char_u *)_(msg_qflist);
|
||||
@@ -5355,6 +5351,28 @@ win_found:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)) \
|
||||
|| defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) \
|
||||
|| defined(PROTO)
|
||||
/*
|
||||
* Find a window for buffer "buf".
|
||||
* If found OK is returned and "wp" and "tp" are set to the window and tabpage.
|
||||
* If not found FAIL is returned.
|
||||
*/
|
||||
int
|
||||
find_win_for_buf(buf, wp, tp)
|
||||
buf_T *buf;
|
||||
win_T **wp;
|
||||
tabpage_T **tp;
|
||||
{
|
||||
FOR_ALL_TAB_WINDOWS(*tp, *wp)
|
||||
if ((*wp)->w_buffer == buf)
|
||||
goto win_found;
|
||||
return FAIL;
|
||||
win_found:
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_SIGNS) || defined(PROTO)
|
||||
/*
|
||||
|
||||
+26
-4
@@ -716,12 +716,34 @@ if test "$enable_mzschemeinterp" = "yes"; then
|
||||
AC_MSG_RESULT(not needed)
|
||||
fi
|
||||
|
||||
dnl On Ubuntu this fixes "undefined reference to symbol 'ffi_type_void'".
|
||||
AC_CHECK_LIB(ffi, ffi_type_void, [MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"])
|
||||
|
||||
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
|
||||
-DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
|
||||
MZSCHEME_SRC="if_mzsch.c"
|
||||
MZSCHEME_OBJ="objects/if_mzsch.o"
|
||||
MZSCHEME_PRO="if_mzsch.pro"
|
||||
AC_DEFINE(FEAT_MZSCHEME)
|
||||
|
||||
dnl Test that we can compile a simple program with these CFLAGS and LIBS.
|
||||
AC_MSG_CHECKING([if compile and link flags for MzScheme are sane])
|
||||
cflags_save=$CFLAGS
|
||||
libs_save=$LIBS
|
||||
CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
|
||||
LIBS="$LIBS $MZSCHEME_LIBS"
|
||||
AC_TRY_LINK(,[ ],
|
||||
AC_MSG_RESULT(yes); mzs_ok=yes,
|
||||
AC_MSG_RESULT(no: MZSCHEME DISABLED); mzs_ok=no)
|
||||
CFLAGS=$cflags_save
|
||||
LIBS=$libs_save
|
||||
if test $mzs_ok = yes; then
|
||||
MZSCHEME_SRC="if_mzsch.c"
|
||||
MZSCHEME_OBJ="objects/if_mzsch.o"
|
||||
MZSCHEME_PRO="if_mzsch.pro"
|
||||
AC_DEFINE(FEAT_MZSCHEME)
|
||||
else
|
||||
MZSCHEME_CFLAGS=
|
||||
MZSCHEME_LIBS=
|
||||
MZSCHEME_EXTRA=
|
||||
MZSCHEME_MZC=
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(MZSCHEME_SRC)
|
||||
AC_SUBST(MZSCHEME_OBJ)
|
||||
|
||||
+5
-5
@@ -2529,13 +2529,13 @@ gui_mch_update_tabline(void)
|
||||
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);
|
||||
|
||||
if (TabCtrl_GetCurSel(s_tabhwnd) != curtabidx)
|
||||
TabCtrl_SetCurSel(s_tabhwnd, curtabidx);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2548,8 +2548,8 @@ gui_mch_set_curtab(nr)
|
||||
if (s_tabhwnd == NULL)
|
||||
return;
|
||||
|
||||
if (TabCtrl_GetCurSel(s_tabhwnd) != nr -1)
|
||||
TabCtrl_SetCurSel(s_tabhwnd, nr -1);
|
||||
if (TabCtrl_GetCurSel(s_tabhwnd) != nr - 1)
|
||||
TabCtrl_SetCurSel(s_tabhwnd, nr - 1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+28
-11
@@ -3997,30 +3997,43 @@ SetBufferLineList(
|
||||
static int
|
||||
InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change)
|
||||
{
|
||||
buf_T *save_curbuf = NULL;
|
||||
win_T *wp;
|
||||
win_T *save_curwin = NULL;
|
||||
tabpage_T *tp;
|
||||
tabpage_T *save_curtab = NULL;
|
||||
|
||||
/* First of all, we check the type of the supplied Python object.
|
||||
* It must be a string or a list, or the call is in error.
|
||||
*/
|
||||
if (PyBytes_Check(lines) || PyUnicode_Check(lines))
|
||||
{
|
||||
char *str = StringToLine(lines);
|
||||
buf_T *savebuf;
|
||||
char *str = StringToLine(lines);
|
||||
|
||||
if (str == NULL)
|
||||
return FAIL;
|
||||
|
||||
PyErr_Clear();
|
||||
VimTryStart();
|
||||
switch_buffer(&savebuf, buf);
|
||||
if (find_win_for_buf(buf, &wp, &tp) == FAIL
|
||||
|| switch_win(&save_curwin, &save_curtab, wp, tp, TRUE)
|
||||
== FAIL)
|
||||
switch_buffer(&save_curbuf, buf);
|
||||
|
||||
if (u_save((linenr_T)n, (linenr_T)(n+1)) == FAIL)
|
||||
if (u_save((linenr_T)n, (linenr_T)(n + 1)) == FAIL)
|
||||
RAISE_UNDO_FAIL;
|
||||
else if (ml_append((linenr_T)n, (char_u *)str, 0, FALSE) == FAIL)
|
||||
RAISE_INSERT_LINE_FAIL;
|
||||
else
|
||||
else if (save_curbuf == NULL)
|
||||
/* Only adjust marks if we managed to switch to a window that
|
||||
* holds the buffer, otherwise line numbers will be invalid. */
|
||||
appended_lines_mark((linenr_T)n, 1L);
|
||||
|
||||
vim_free(str);
|
||||
restore_buffer(savebuf);
|
||||
if (save_curbuf == NULL)
|
||||
restore_win(save_curwin, save_curtab, TRUE);
|
||||
else
|
||||
restore_buffer(save_curbuf);
|
||||
update_screen(VALID);
|
||||
|
||||
if (VimTryEnd())
|
||||
@@ -4036,7 +4049,6 @@ InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change)
|
||||
PyInt i;
|
||||
PyInt size = PyList_Size(lines);
|
||||
char **array;
|
||||
buf_T *savebuf;
|
||||
|
||||
array = PyMem_New(char *, size);
|
||||
if (array == NULL)
|
||||
@@ -4061,7 +4073,10 @@ InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change)
|
||||
|
||||
PyErr_Clear();
|
||||
VimTryStart();
|
||||
switch_buffer(&savebuf, buf);
|
||||
if (find_win_for_buf(buf, &wp, &tp) == FAIL
|
||||
|| switch_win(&save_curwin, &save_curtab, wp, tp, TRUE)
|
||||
== FAIL)
|
||||
switch_buffer(&save_curbuf, buf);
|
||||
|
||||
if (u_save((linenr_T)n, (linenr_T)(n + 1)) == FAIL)
|
||||
RAISE_UNDO_FAIL;
|
||||
@@ -4087,11 +4102,13 @@ InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change)
|
||||
}
|
||||
|
||||
/* Free the array of lines. All of its contents have now
|
||||
* been freed.
|
||||
*/
|
||||
* been freed. */
|
||||
PyMem_Free(array);
|
||||
|
||||
restore_buffer(savebuf);
|
||||
if (save_curbuf == NULL)
|
||||
restore_win(save_curwin, save_curtab, TRUE);
|
||||
else
|
||||
restore_buffer(save_curbuf);
|
||||
update_screen(VALID);
|
||||
|
||||
if (VimTryEnd())
|
||||
|
||||
@@ -52,6 +52,7 @@ void do_modelines __ARGS((int flags));
|
||||
int read_viminfo_bufferlist __ARGS((vir_T *virp, int writing));
|
||||
void write_viminfo_bufferlist __ARGS((FILE *fp));
|
||||
char_u *buf_spname __ARGS((buf_T *buf));
|
||||
int find_win_for_buf __ARGS((buf_T *buf, win_T **wp, tabpage_T **tp));
|
||||
void buf_addsign __ARGS((buf_T *buf, int id, linenr_T lnum, int typenr));
|
||||
linenr_T buf_change_sign_type __ARGS((buf_T *buf, int markId, int typenr));
|
||||
int buf_getsigntype __ARGS((buf_T *buf, linenr_T lnum, int type));
|
||||
|
||||
+42
-6
@@ -3535,7 +3535,8 @@ static void copy_sub __ARGS((regsub_T *to, regsub_T *from));
|
||||
static void copy_sub_off __ARGS((regsub_T *to, regsub_T *from));
|
||||
static int sub_equal __ARGS((regsub_T *sub1, regsub_T *sub2));
|
||||
static int match_backref __ARGS((regsub_T *sub, int subidx, int *bytelen));
|
||||
static int has_state_with_pos __ARGS((nfa_list_T *l, nfa_state_T *state, regsubs_T *subs));
|
||||
static int has_state_with_pos __ARGS((nfa_list_T *l, nfa_state_T *state, regsubs_T *subs, nfa_pim_T *pim));
|
||||
static int pim_equal __ARGS((nfa_pim_T *one, nfa_pim_T *two));
|
||||
static int state_in_list __ARGS((nfa_list_T *l, nfa_state_T *state, regsubs_T *subs));
|
||||
static regsubs_T *addstate __ARGS((nfa_list_T *l, nfa_state_T *state, regsubs_T *subs_arg, nfa_pim_T *pim, int off));
|
||||
static void addstate_here __ARGS((nfa_list_T *l, nfa_state_T *state, regsubs_T *subs, nfa_pim_T *pim, int *ip));
|
||||
@@ -3701,10 +3702,11 @@ report_state(char *action,
|
||||
* positions as "subs".
|
||||
*/
|
||||
static int
|
||||
has_state_with_pos(l, state, subs)
|
||||
has_state_with_pos(l, state, subs, pim)
|
||||
nfa_list_T *l; /* runtime state list */
|
||||
nfa_state_T *state; /* state to update */
|
||||
regsubs_T *subs; /* pointers to subexpressions */
|
||||
nfa_pim_T *pim; /* postponed match or NULL */
|
||||
{
|
||||
nfa_thread_T *thread;
|
||||
int i;
|
||||
@@ -3718,12 +3720,37 @@ has_state_with_pos(l, state, subs)
|
||||
&& (!nfa_has_zsubexpr
|
||||
|| sub_equal(&thread->subs.synt, &subs->synt))
|
||||
#endif
|
||||
)
|
||||
&& pim_equal(&thread->pim, pim))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if "one" and "two" are equal. That includes when both are not
|
||||
* set.
|
||||
*/
|
||||
static int
|
||||
pim_equal(one, two)
|
||||
nfa_pim_T *one;
|
||||
nfa_pim_T *two;
|
||||
{
|
||||
int one_unused = (one == NULL || one->result == NFA_PIM_UNUSED);
|
||||
int two_unused = (two == NULL || two->result == NFA_PIM_UNUSED);
|
||||
|
||||
if (one_unused)
|
||||
/* one is unused: equal when two is also unused */
|
||||
return two_unused;
|
||||
if (two_unused)
|
||||
/* one is used and two is not: not equal */
|
||||
return FALSE;
|
||||
/* compare the position */
|
||||
if (REG_MULTI)
|
||||
return one->end.pos.lnum == two->end.pos.lnum
|
||||
&& one->end.pos.col == two->end.pos.col;
|
||||
return one->end.ptr == two->end.ptr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if "state" leads to a NFA_MATCH without advancing the input.
|
||||
*/
|
||||
@@ -3825,7 +3852,7 @@ state_in_list(l, state, subs)
|
||||
{
|
||||
if (state->lastlist[nfa_ll_index] == l->id)
|
||||
{
|
||||
if (!nfa_has_backref || has_state_with_pos(l, state, subs))
|
||||
if (!nfa_has_backref || has_state_with_pos(l, state, subs, NULL))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -3952,7 +3979,7 @@ skip_add:
|
||||
|
||||
/* Do not add the state again when it exists with the same
|
||||
* positions. */
|
||||
if (has_state_with_pos(l, state, subs))
|
||||
if (has_state_with_pos(l, state, subs, pim))
|
||||
goto skip_add;
|
||||
}
|
||||
|
||||
@@ -4060,9 +4087,13 @@ skip_add:
|
||||
sub = &subs->norm;
|
||||
}
|
||||
|
||||
/* avoid compiler warnings */
|
||||
save_ptr = NULL;
|
||||
save_lpos.lnum = 0;
|
||||
save_lpos.col = 0;
|
||||
|
||||
/* Set the position (with "off" added) in the subexpression. Save
|
||||
* and restore it when it was in use. Otherwise fill any gap. */
|
||||
save_ptr = NULL;
|
||||
if (REG_MULTI)
|
||||
{
|
||||
if (subidx < sub->in_use)
|
||||
@@ -4192,11 +4223,16 @@ skip_add:
|
||||
sub->list.multi[subidx].end.col =
|
||||
(colnr_T)(reginput - regline + off);
|
||||
}
|
||||
/* avoid compiler warnings */
|
||||
save_ptr = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
save_ptr = sub->list.line[subidx].end;
|
||||
sub->list.line[subidx].end = reginput + off;
|
||||
/* avoid compiler warnings */
|
||||
save_lpos.lnum = 0;
|
||||
save_lpos.col = 0;
|
||||
}
|
||||
|
||||
subs = addstate(l, state->out, subs, pim, off);
|
||||
|
||||
+1
-2
@@ -4518,7 +4518,7 @@ current_search(count, forward)
|
||||
int result; /* result of various function calls */
|
||||
char_u old_p_ws = p_ws;
|
||||
int flags = 0;
|
||||
pos_T save_VIsual;
|
||||
pos_T save_VIsual = VIsual;
|
||||
int one_char;
|
||||
|
||||
/* wrapping should not occur */
|
||||
@@ -4531,7 +4531,6 @@ current_search(count, forward)
|
||||
if (VIsual_active)
|
||||
{
|
||||
orig_pos = curwin->w_cursor;
|
||||
save_VIsual = VIsual;
|
||||
|
||||
pos = curwin->w_cursor;
|
||||
start_pos = VIsual;
|
||||
|
||||
@@ -9054,6 +9054,9 @@ open_spellbuf()
|
||||
{
|
||||
buf->b_spell = TRUE;
|
||||
buf->b_p_swf = TRUE; /* may create a swap file */
|
||||
#ifdef FEAT_CRYPT
|
||||
buf->b_p_key = empty_option;
|
||||
#endif
|
||||
ml_open(buf);
|
||||
ml_open_file(buf); /* create swap file now */
|
||||
}
|
||||
|
||||
@@ -7,6 +7,10 @@ STARTTEST
|
||||
:set enc=latin1
|
||||
:e!
|
||||
:"
|
||||
:" Check using z= in new buffer (crash fixed by patch 7.4a.028).
|
||||
:set maxmem=512 spell
|
||||
iasdz=:"
|
||||
:"
|
||||
:" Function to test .aff/.dic with list of good and bad words.
|
||||
:func TestOne(aff, dic)
|
||||
set spellfile=
|
||||
|
||||
@@ -339,6 +339,7 @@ STARTTEST
|
||||
:call add(tl, [2, '^\%(.*bar\)\@!.*\zsfoo', ' foo bar '])
|
||||
:call add(tl, [2, '^\%(.*bar\)\@!.*\zsfoo', ' foo xxx ', 'foo'])
|
||||
:call add(tl, [2, '[ ]\@!\p\%([ ]\@!\p\)*:', 'implicit mappings:', 'mappings:'])
|
||||
:call add(tl, [2, 'm\k\+_\@=\%(_\@!\k\)\@<=\k\+e', 'mx__xe', 'mx__xe'])
|
||||
:"
|
||||
:"""" Combining different tests and features
|
||||
:call add(tl, [2, '[[:alpha:]]\{-2,6}', '787abcdiuhsasiuhb4', 'ab'])
|
||||
|
||||
@@ -773,6 +773,9 @@ OK 2 - ^\%(.*bar\)\@!.*\zsfoo
|
||||
OK 0 - [ ]\@!\p\%([ ]\@!\p\)*:
|
||||
OK 1 - [ ]\@!\p\%([ ]\@!\p\)*:
|
||||
OK 2 - [ ]\@!\p\%([ ]\@!\p\)*:
|
||||
OK 0 - m\k\+_\@=\%(_\@!\k\)\@<=\k\+e
|
||||
OK 1 - m\k\+_\@=\%(_\@!\k\)\@<=\k\+e
|
||||
OK 2 - m\k\+_\@=\%(_\@!\k\)\@<=\k\+e
|
||||
OK 0 - [[:alpha:]]\{-2,6}
|
||||
OK 1 - [[:alpha:]]\{-2,6}
|
||||
OK 2 - [[:alpha:]]\{-2,6}
|
||||
|
||||
+23
-1
@@ -1,7 +1,29 @@
|
||||
Test for 'scrollbind' causing an unexpected scroll of one of the windows.
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:source test98a.in
|
||||
:" We don't want the status line to cause problems:
|
||||
:set laststatus=0
|
||||
:let g:totalLines = &lines * 20
|
||||
:let middle = g:totalLines / 2
|
||||
:wincmd n
|
||||
:wincmd o
|
||||
:for i in range(1, g:totalLines)
|
||||
: call setline(i, 'LINE ' . i)
|
||||
:endfor
|
||||
:exe string(middle)
|
||||
:normal zt
|
||||
:normal M
|
||||
:aboveleft vert new
|
||||
:for i in range(1, g:totalLines)
|
||||
: call setline(i, 'line ' . i)
|
||||
:endfor
|
||||
:exe string(middle)
|
||||
:normal zt
|
||||
:normal M
|
||||
:" Execute the following two command at once to reproduce the problem.
|
||||
:setl scb | wincmd p
|
||||
:setl scb
|
||||
:wincmd w
|
||||
:let topLineLeft = line('w0')
|
||||
:wincmd p
|
||||
:let topLineRight = line('w0')
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
" We don't want the status line to cause problems:
|
||||
set laststatus=0
|
||||
redraw!
|
||||
let g:totalLines = &lines * 20
|
||||
let middle = g:totalLines / 2
|
||||
wincmd n
|
||||
wincmd o
|
||||
for i in range(1, g:totalLines)
|
||||
call setline(i, 'LINE ' . i)
|
||||
endfor
|
||||
|
||||
exe string(middle)
|
||||
normal zt
|
||||
normal M
|
||||
|
||||
aboveleft vert new
|
||||
for i in range(1, g:totalLines)
|
||||
call setline(i, 'line ' . i)
|
||||
endfor
|
||||
exe string(middle)
|
||||
normal zt
|
||||
normal M
|
||||
setl scb
|
||||
|
||||
wincmd p
|
||||
|
||||
setl scb
|
||||
wincmd w
|
||||
@@ -742,6 +742,24 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
35,
|
||||
/**/
|
||||
34,
|
||||
/**/
|
||||
33,
|
||||
/**/
|
||||
32,
|
||||
/**/
|
||||
31,
|
||||
/**/
|
||||
30,
|
||||
/**/
|
||||
29,
|
||||
/**/
|
||||
28,
|
||||
/**/
|
||||
27,
|
||||
/**/
|
||||
26,
|
||||
/**/
|
||||
|
||||
+2
-1
@@ -6587,7 +6587,8 @@ restore_snapshot_rec(sn, fr)
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||
#if defined(FEAT_EVAL) || defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) \
|
||||
|| defined(PROTO)
|
||||
/*
|
||||
* Set "win" to be the curwin and "tp" to be the current tab page.
|
||||
* restore_win() MUST be called to undo.
|
||||
|
||||
Reference in New Issue
Block a user