patch 8.1.1307: cannot reconnect to the X server after it restarted
Problem: Cannot reconnect to the X server after it restarted.
Solution: Add the :xrestore command. (Adrian Kocis, closes #844)
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 792a715..8437f24 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1714,6 +1714,7 @@
|:xmapclear| :xmapc[lear] remove all mappings for Visual mode
|:xmap| :xm[ap] like ":map" but for Visual mode
|:xmenu| :xme[nu] add menu for Visual mode
+|:xrestore| :xr[estore] restores the X server connection
|:xnoremap| :xn[oremap] like ":noremap" but for Visual mode
|:xnoremenu| :xnoreme[nu] like ":noremenu" but for Visual mode
|:xunmap| :xu[nmap] like ":unmap" but for Visual mode
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 7988927..9b61e8b 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -704,6 +704,21 @@
available when compiled with the |+netbeans_intg|
feature}
+ *:xrestore* *:xr*
+:xr[estore] [display] Reinitializes the connection to the X11 server. Useful
+ after the X server restarts, e.g. when running Vim for
+ long time inside screen/tmux and connecting from
+ different machines).
+ [display] should be in the format of the $DISPLAY
+ environment variable (e.g. "localhost:10.0")
+ If [display] is omitted, then it reinitializes the
+ connection to the X11 server using the same value as
+ was used for the previous execution of this command.
+ If the value was never specified, then it uses the
+ value of $DISPLAY environment variable as it was when
+ Vim was started.
+ {only available when compiled with the |+clipboard|
+ feature}
*g_CTRL-A*
g CTRL-A Only when Vim was compiled with MEM_PROFILING defined