0
0
mirror of https://github.com/vim/vim.git synced 2025-10-13 06:54:15 -04:00

patch 8.1.1131: getwinpos() does not work in the MS-Windows console

Problem:    getwinpos() does not work in the MS-Windows console.
Solution:   Implement getwinpos().
This commit is contained in:
Bram Moolenaar
2019-04-06 22:01:24 +02:00
parent 1164023828
commit 16c34c3765
5 changed files with 33 additions and 16 deletions

View File

@@ -5985,7 +5985,9 @@ f_getwinpos(typval_T *argvars UNUSED, typval_T *rettv)
if (rettv_list_alloc(rettv) == FAIL)
return;
#if defined(FEAT_GUI) || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE))
#if defined(FEAT_GUI) \
|| (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)) \
|| defined(MSWIN)
{
varnumber_T timeout = 100;
@@ -6007,7 +6009,10 @@ f_getwinpos(typval_T *argvars UNUSED, typval_T *rettv)
f_getwinposx(typval_T *argvars UNUSED, typval_T *rettv)
{
rettv->vval.v_number = -1;
#if defined(FEAT_GUI) || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE))
#if defined(FEAT_GUI) \
|| (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)) \
|| defined(MSWIN)
{
int x, y;
@@ -6024,7 +6029,9 @@ f_getwinposx(typval_T *argvars UNUSED, typval_T *rettv)
f_getwinposy(typval_T *argvars UNUSED, typval_T *rettv)
{
rettv->vval.v_number = -1;
#if defined(FEAT_GUI) || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE))
#if defined(FEAT_GUI) \
|| (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)) \
|| defined(MSWIN)
{
int x, y;