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.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 6f33016..08f0a41 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -5242,24 +5242,6 @@
}
/*
- * "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 @@
}
/*
+ * "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 @@
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
}
/*