forked from aniani/vim
updated for version 7.4.556
Problem: Failed commands in Python interface not handled correctly. Solution: Restore window and buffer on failure.
This commit is contained in:
parent
36ff08479f
commit
ae38d05271
@ -3172,6 +3172,7 @@ set_option_value_for(
|
|||||||
if (switch_win(&save_curwin, &save_curtab, (win_T *)from,
|
if (switch_win(&save_curwin, &save_curtab, (win_T *)from,
|
||||||
win_find_tabpage((win_T *)from), FALSE) == FAIL)
|
win_find_tabpage((win_T *)from), FALSE) == FAIL)
|
||||||
{
|
{
|
||||||
|
restore_win(save_curwin, save_curtab, TRUE);
|
||||||
if (VimTryEnd())
|
if (VimTryEnd())
|
||||||
return -1;
|
return -1;
|
||||||
PyErr_SET_VIM(N_("problem while switching windows"));
|
PyErr_SET_VIM(N_("problem while switching windows"));
|
||||||
@ -4032,9 +4033,13 @@ switch_to_win_for_buf(
|
|||||||
win_T *wp;
|
win_T *wp;
|
||||||
tabpage_T *tp;
|
tabpage_T *tp;
|
||||||
|
|
||||||
if (find_win_for_buf(buf, &wp, &tp) == FAIL
|
if (find_win_for_buf(buf, &wp, &tp) == FAIL)
|
||||||
|| switch_win(save_curwinp, save_curtabp, wp, tp, TRUE) == FAIL)
|
|
||||||
switch_buffer(save_curbufp, buf);
|
switch_buffer(save_curbufp, buf);
|
||||||
|
else if (switch_win(save_curwinp, save_curtabp, wp, tp, TRUE) == FAIL)
|
||||||
|
{
|
||||||
|
restore_win(*save_curwinp, *save_curtabp, TRUE);
|
||||||
|
switch_buffer(save_curbufp, buf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
556,
|
||||||
/**/
|
/**/
|
||||||
555,
|
555,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user