Mercurial > vim
diff src/ui.c @ 16241:c1698187c482 v8.1.1125
patch 8.1.1125: libvterm does not handle the window position report
commit https://github.com/vim/vim/commit/fa1e90cd4d1bebd66da22df4625f70963f091f17
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 6 17:47:40 2019 +0200
patch 8.1.1125: libvterm does not handle the window position report
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 06 Apr 2019 18:00:05 +0200 |
parents | ddd82b1c9e9d |
children | 3b79a3029947 |
line wrap: on
line diff
--- 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) {