summaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-21 16:04:21 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-21 16:04:21 +0100
commitd155d7a8519987361169459b8d464ae1caef5e9c (patch)
tree26d437fd67b33ca1b57aca568d4da40151bc9a81 /src/os_unix.c
parent162b71479bd4dcdb3a2ef9198a1444f6f99e6843 (diff)
downloadvim-git-d155d7a8519987361169459b8d464ae1caef5e9c.tar.gz
patch 8.1.0615: get_tv function names are not consistentv8.1.0615
Problem: Get_tv function names are not consistent. Solution: Rename to tv_get.
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index ecb348c4d..d2a8a0ab2 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1678,13 +1678,13 @@ x_IOerror_check(Display *dpy UNUSED)
/*
* 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 @@ x_IOerror_handler(Display *dpy UNUSED)
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 @@ mch_job_start(char **argv, job_T *job, jobopt_T *options, int is_terminal)
{
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 @@ setup_term_clip(void)
{
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