Mercurial > vim
diff src/evalfunc.c @ 11315:0c091a7c588c v8.0.0543
patch 8.0.0543: test_edit causes older xfce4-terminal to close
commit https://github.com/vim/vim/commit/ba6ec182973af726ce9b7b7eb3753fc3a7ae7d1b
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 4 22:41:10 2017 +0200
patch 8.0.0543: test_edit causes older xfce4-terminal to close
Problem: Test_edit causes older xfce4-terminal to close. (Dominique Pelle)
Solution: Reduce number of columns to 2000. Try to restore the window
position.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 04 Apr 2017 22:45:05 +0200 |
parents | ae5f9f26f81c |
children | 98abcd1227dc |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -5242,24 +5242,6 @@ f_getwininfo(typval_T *argvars, typval_T } /* - * "getwinposx()" function - */ - static void -f_getwinposx(typval_T *argvars UNUSED, typval_T *rettv) -{ - rettv->vval.v_number = -1; -#ifdef FEAT_GUI - if (gui.in_use) - { - int x, y; - - if (gui_mch_get_winpos(&x, &y) == OK) - rettv->vval.v_number = x; - } -#endif -} - -/* * "win_findbuf()" function */ static void @@ -5307,6 +5289,32 @@ f_win_id2win(typval_T *argvars, typval_T } /* + * "getwinposx()" function + */ + static void +f_getwinposx(typval_T *argvars UNUSED, typval_T *rettv) +{ + rettv->vval.v_number = -1; +#ifdef FEAT_GUI + if (gui.in_use) + { + int x, y; + + if (gui_mch_get_winpos(&x, &y) == OK) + rettv->vval.v_number = x; + } +#endif +#if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE) + { + int x, y; + + if (term_get_winpos(&x, &y) == OK) + rettv->vval.v_number = x; + } +#endif +} + +/* * "getwinposy()" function */ static void @@ -5322,6 +5330,14 @@ f_getwinposy(typval_T *argvars UNUSED, t rettv->vval.v_number = y; } #endif +#if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE) + { + int x, y; + + if (term_get_winpos(&x, &y) == OK) + rettv->vval.v_number = y; + } +#endif } /*