Compare commits

...

3 Commits

Author SHA1 Message Date
Bram Moolenaar
a8f96397a1 updated for version 7.4a.034
Problem:    The tabline may flicker when opening a new tab after 7.3.759 on
            Win32.
Solution:   Move call to TabCtrl_SetCurSel(). (Ken Takata)
2013-07-17 21:59:13 +02:00
Bram Moolenaar
b7a846d0e0 updated for version 7.4a.033
Problem:    Test 98 always passes.
Solution:   Include test98a.in in test98.in, execute the crucial command in
            one line. (Yukihiro Nakadaira)
2013-07-17 21:40:31 +02:00
Bram Moolenaar
69b52456fc updated for version 7.4a.032
Problem:    New regexp engine: Does not match shorter alternative. (Ingo
            Karkat)
Solution:   Do not drop a new state when the PIM info is different.
2013-07-17 21:10:51 +02:00
5 changed files with 66 additions and 39 deletions

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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')

View File

@@ -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

View File

@@ -727,6 +727,12 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
34,
/**/
33,
/**/
32,
/**/
31,
/**/