summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-04-06 17:47:40 +0200
committerBram Moolenaar <Bram@vim.org>2019-04-06 17:47:40 +0200
commitfa1e90cd4d1bebd66da22df4625f70963f091f17 (patch)
tree4d129283fee69272fd52f7d88e27b7822b21a3f2 /src/ui.c
parentd9eefe3155277cec71105f52d34a76f7a3237e7f (diff)
downloadvim-git-fa1e90cd4d1bebd66da22df4625f70963f091f17.tar.gz
patch 8.1.1125: libvterm does not handle the window position reportv8.1.1125
Problem: Libvterm does not handle the window position report. Solution: Let libvterm call the fallback CSI handler when not handling CSI sequence. Handle the window position report in Vim.
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ui.c b/src/ui.c
index 5c9077c05..44328521f 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -627,6 +627,27 @@ ui_new_shellsize(void)
}
}
+#if (defined(FEAT_EVAL) \
+ && (defined(FEAT_GUI) \
+ || (defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)))) \
+ || defined(PROTO)
+/*
+ * Get the window position in pixels, if possible.
+ * Return FAIL when not possible.
+ */
+ int
+ui_get_winpos(int *x, int *y, varnumber_T timeout)
+{
+# ifdef FEAT_GUI
+ if (gui.in_use)
+ return gui_mch_get_winpos(x, y);
+# endif
+# if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)
+ return term_get_winpos(x, y, timeout);
+# endif
+}
+#endif
+
void
ui_breakcheck(void)
{