patch 8.1.0615: get_tv function names are not consistent
Problem: Get_tv function names are not consistent.
Solution: Rename to tv_get.
diff --git a/src/os_unix.c b/src/os_unix.c
index ecb348c..d2a8a0a 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1678,13 +1678,13 @@
/*
* An X IO Error handler, used to catch terminal errors.
*/
-static int xterm_dpy_was_reset = FALSE;
+static int xterm_dpy_retry_count = 0;
static int
x_IOerror_handler(Display *dpy UNUSED)
{
xterm_dpy = NULL;
- xterm_dpy_was_reset = TRUE;
+ xterm_dpy_retry_count = 5; // Try reconnecting five times
x11_window = 0;
x11_display = NULL;
xterm_Shell = (Widget)0;
@@ -1704,9 +1704,9 @@
static void
may_restore_clipboard(void)
{
- if (xterm_dpy_was_reset)
+ if (xterm_dpy_retry_count > 0)
{
- xterm_dpy_was_reset = FALSE;
+ --xterm_dpy_retry_count;
# ifndef LESSTIF_VERSION
/* This has been reported to avoid Vim getting stuck. */
@@ -5553,7 +5553,7 @@
{
typval_T *item = &dict_lookup(hi)->di_tv;
- vim_setenv((char_u*)hi->hi_key, get_tv_string(item));
+ vim_setenv((char_u*)hi->hi_key, tv_get_string(item));
--todo;
}
}
@@ -7494,6 +7494,8 @@
{
xterm_dpy = XtOpenDisplay(app_context, xterm_display,
"vim_xterm", "Vim_xterm", NULL, 0, &z, &strp);
+ if (xterm_dpy != NULL)
+ xterm_dpy_retry_count = 0;
#if defined(HAVE_SETJMP_H)
mch_endjmp();
#endif