0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 9.1.1486: documentation issues with Wayland

Problem:  documentation issues with Wayland
          (after v9.1.1485)
Solution: Tweak documentation style. Capitalize the first letter of
          Wayland (Hirohito Higashi)

related: #17619

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Hirohito Higashi 2025-06-28 18:18:21 +02:00 committed by Christian Brabandt
parent d3d54f473f
commit 73b9650519
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
19 changed files with 89 additions and 87 deletions

View File

@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.1. Last change: 2025 Jun 27 *builtin.txt* For Vim version 9.1. Last change: 2025 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -13039,7 +13039,7 @@ vreplace Compiled with |gR| and |gr| commands. (always true)
vtp Compiled for vcon support |+vtp| (check vcon to find vtp Compiled for vcon support |+vtp| (check vcon to find
out if it works in the current console). out if it works in the current console).
wayland Compiled with Wayland protocol support. wayland Compiled with Wayland protocol support.
wayland_clipboard Compiled with support for Wayland selections/clipboard wayland_clipboard Compiled with support for Wayland selections/clipboard
wildignore Compiled with 'wildignore' option. wildignore Compiled with 'wildignore' option.
wildmenu Compiled with 'wildmenu' option. wildmenu Compiled with 'wildmenu' option.
win16 old version for MS-Windows 3.1 (always false) win16 old version for MS-Windows 3.1 (always false)

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 9.1. Last change: 2025 Jun 27 *eval.txt* For Vim version 9.1. Last change: 2025 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -2242,11 +2242,11 @@ v:charconvert_to
*v:clipmethod* *v:clipmethod*
v:clipmethod The current method of accessing the clipboard that is being v:clipmethod The current method of accessing the clipboard that is being
used. Can either have the value of: used. Can either have the value of:
wayland The Wayland protocol is being used. wayland The Wayland protocol is being used.
x11 X11 selections are being used. x11 X11 selections are being used.
none The above methods are unavailable none The above methods are unavailable or
or cannot be used. cannot be used.
See 'clipmethod' for more details. See 'clipmethod' for more details.
*v:cmdarg* *cmdarg-variable* *v:cmdarg* *cmdarg-variable*

View File

@ -1,4 +1,4 @@
*index.txt* For Vim version 9.1. Last change: 2025 Jun 27 *index.txt* For Vim version 9.1. Last change: 2025 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1264,6 +1264,7 @@ tag command action ~
|:class| :class start of a class declaration |:class| :class start of a class declaration
|:clast| :cla[st] go to the specified error, default last one |:clast| :cla[st] go to the specified error, default last one
|:clearjumps| :cle[arjumps] clear the jump list |:clearjumps| :cle[arjumps] clear the jump list
|:clipreset| :clip[reset] reset 'clipmethod'
|:clist| :cl[ist] list all errors |:clist| :cl[ist] list all errors
|:close| :clo[se] close current window |:close| :clo[se] close current window
|:cmap| :cm[ap] like ":map" but for Command-line mode |:cmap| :cm[ap] like ":map" but for Command-line mode
@ -1587,7 +1588,6 @@ tag command action ~
|:redrawtabpanel| :redrawtabp[anel] force a redraw of the tabpanel |:redrawtabpanel| :redrawtabp[anel] force a redraw of the tabpanel
|:registers| :reg[isters] display the contents of registers |:registers| :reg[isters] display the contents of registers
|:resize| :res[ize] change current window height |:resize| :res[ize] change current window height
|:clipreset| :clip[reset] reset 'clipmethod'
|:retab| :ret[ab] change tab size |:retab| :ret[ab] change tab size
|:return| :retu[rn] return from a user function |:return| :retu[rn] return from a user function
|:rewind| :rew[ind] go to the first file in the argument list |:rewind| :rew[ind] go to the first file in the argument list

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 9.1. Last change: 2025 Jun 27 *options.txt* For Vim version 9.1. Last change: 2025 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1810,14 +1810,13 @@ A jump table for the options with a short description can be found at |Q_op|.
register '*' for all yank, delete, change and put register '*' for all yank, delete, change and put
operations which would normally go to the unnamed operations which would normally go to the unnamed
register. When "unnamed" is also included to the register. When "unnamed" is also included to the
option, yank operations (but not delete, change or option, yank operations (but not delete, change or put)
put) will additionally copy the text into register will additionally copy the text into register '*'. If
'*'. If wayland is being used and the compositor does wayland is being used and the compositor does not
not support the primary-selection-unstable-v1 support the primary-selection-unstable-v1 protocol,
protocol, then the regular selection is used in its then the regular selection is used in its place. Only
place. Only available with the |+X11| or available with the |+X11| or |+wayland_clipboard|
|+wayland_clipboard| feature. Availability can be feature. Availability can be checked with: >
checked with: >
if has('unnamedplus') if has('unnamedplus')
< <
*clipboard-autoselect* *clipboard-autoselect*
@ -1859,17 +1858,18 @@ A jump table for the options with a short description can be found at |Q_op|.
compositor. This is useful in this situation: compositor. This is useful in this situation:
- Running Vim in a console. - Running Vim in a console.
- $DISPLAY/$WAYLAND_DISPLAY is set to start - $DISPLAY/$WAYLAND_DISPLAY is set to start
applications on another display. applications on another display.
- You do not want to connect to the X server/Wayland - You do not want to connect to the X server/Wayland
compositor in the console, but do want this in a compositor in the console, but do want this in a
terminal emulator. terminal emulator.
To never connect to the X server/Wayland compositor To never connect to the X server/Wayland compositor
use: > use: >
exclude:.* exclude:.*
< This has the same effect as using the |-X| or |-Y| argument. < This has the same effect as using the |-X| or |-Y|
argument.
Note that when there is no connection to the X server Note that when there is no connection to the X server
the window title won't be restored and the clipboard the window title won't be restored and the clipboard
cannot be accessed. This is the same for Wayland, cannot be accessed. This is the same for Wayland,
except there is no title restoring. except there is no title restoring.
The value of 'magic' is ignored, {pattern} is The value of 'magic' is ignored, {pattern} is
interpreted as if 'magic' was on. interpreted as if 'magic' was on.
@ -1880,10 +1880,9 @@ A jump table for the options with a short description can be found at |Q_op|.
'clipmethod' 'cpm' string (default for Unix: "wayland,x11", 'clipmethod' 'cpm' string (default for Unix: "wayland,x11",
for VMS: "x11", for VMS: "x11",
otherwise: "") otherwise: "")
global global
{only when the |+xterm_clipboard| or |+wayland_clipboard| {only when the |+xterm_clipboard| or
features are included} |+wayland_clipboard| features are included}
Specifies which method of accessing the system clipboard is used, Specifies which method of accessing the system clipboard is used,
depending on which method works first or is available. Supported depending on which method works first or is available. Supported
methods are: methods are:
@ -1895,10 +1894,10 @@ A jump table for the options with a short description can be found at |Q_op|.
macOS. The GUI or system way of accessing the clipboard is always macOS. The GUI or system way of accessing the clipboard is always
used instead. used instead.
The option value is a list of comma separated items. The list is parsed The option value is a list of comma separated items. The list is
left to right in order, and the first method that Vim determines is parsed left to right in order, and the first method that Vim
available or is working is used as the actual method for accessing the determines is available or is working is used as the actual method for
clipboard. accessing the clipboard.
The current method that is being used can be found in the |v:clipmethod| The current method that is being used can be found in the |v:clipmethod|
variable. variable.
@ -10081,19 +10080,19 @@ A jump table for the options with a short description can be found at |Q_op|.
global global
{only when the |+wayland| feature is included} {only when the |+wayland| feature is included}
Specifies the Wayland seat to use for Wayland functionality, Specifies the Wayland seat to use for Wayland functionality,
specifically the clipboard. If the seat does not exist, then the specifically the clipboard. If the seat does not exist, then the
option will still be set to the new value, with the Wayland clipboard option will still be set to the new value, with the Wayland clipboard
being unavailable as a result. If an empty value is passed then Vim being unavailable as a result. If an empty value is passed then Vim
will attempt to use the value of $XDG_SEAT if it exists, if not then will attempt to use the value of $XDG_SEAT if it exists, if not then
it resorts to using the first seat found available. Updating this it resorts to using the first seat found available. Updating this
option will also update |v:clipmethod|. option will also update |v:clipmethod|.
*'wlsteal'* *'wst'* *'nowlsteal'* *'nowst'* *'wlsteal'* *'wst'* *'nowlsteal'* *'nowst'*
'wlsteal' 'wst' boolean (default off) 'wlsteal' 'wst' boolean (default off)
global global
{only when the |+wayland_clipboard| feature is included} {only when the |+wayland_clipboard| feature is included}
When enabled, then allow Vim to steal focus by creating a temporary When enabled, then allow Vim to steal focus by creating a temporary
surface, in order to access the clipboard. For more information see surface, in order to access the clipboard. For more information see
|wayland-focus-steal|. |wayland-focus-steal|.
*'wltimeoutlen'* *'wtm'* *'wltimeoutlen'* *'wtm'*

View File

@ -1,4 +1,4 @@
*quickref.txt* For Vim version 9.1. Last change: 2025 Jun 27 *quickref.txt* For Vim version 9.1. Last change: 2025 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -646,7 +646,7 @@ Short explanation of each option: *option-list*
'cinscopedecls' 'cinsd' words that are recognized by 'cino-g' 'cinscopedecls' 'cinsd' words that are recognized by 'cino-g'
'cinwords' 'cinw' words where 'si' and 'cin' add an indent 'cinwords' 'cinw' words where 'si' and 'cin' add an indent
'clipboard' 'cb' use the clipboard as the unnamed register 'clipboard' 'cb' use the clipboard as the unnamed register
'clipmethod' 'cpm' specify order of what clipboard methods to use 'clipmethod' 'cpm' specify order of what clipboard methods to use
'cmdheight' 'ch' number of lines to use for the command-line 'cmdheight' 'ch' number of lines to use for the command-line
'cmdwinheight' 'cwh' height of the command-line window 'cmdwinheight' 'cwh' height of the command-line window
'colorcolumn' 'cc' columns to highlight 'colorcolumn' 'cc' columns to highlight
@ -1019,9 +1019,9 @@ Short explanation of each option: *option-list*
'winminwidth' 'wmw' minimal number of columns for any window 'winminwidth' 'wmw' minimal number of columns for any window
'winptydll' name of the winpty dynamic library 'winptydll' name of the winpty dynamic library
'winwidth' 'wiw' minimal number of columns for current window 'winwidth' 'wiw' minimal number of columns for current window
'wlseat' 'wse' the wayland seat to use 'wlseat' 'wse' the Wayland seat to use
'wlsteal' 'wst' allow focus stealing functionality for wayland 'wlsteal' 'wst' allow focus stealing functionality for Wayland
'wltimeoutlen' 'wtm' timeout to use when polling in wayland 'wltimeoutlen' 'wtm' timeout to use when polling in Wayland
'wrap' long lines wrap and continue on the next line 'wrap' long lines wrap and continue on the next line
'wrapmargin' 'wm' chars from the right where wrapping starts 'wrapmargin' 'wm' chars from the right where wrapping starts
'wrapscan' 'ws' searches wrap around the end of the file 'wrapscan' 'ws' searches wrap around the end of the file

View File

@ -1,4 +1,4 @@
*starting.txt* For Vim version 9.1. Last change: 2025 Jun 27 *starting.txt* For Vim version 9.1. Last change: 2025 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -560,9 +560,9 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
This does not enable the XSMP handler though. This does not enable the XSMP handler though.
*-Y* *-Y*
-Y Do not try connecting to the Wayland compositor. Is only -Y Do not try connecting to the Wayland compositor. Is only
relevant for Unix when compiled with the |+wayland| feature, relevant for Unix when compiled with the |+wayland| feature,
otherwise it's ignored. Note that this will make any feature otherwise it's ignored. Note that this will make any feature
that uses Wayland unavailable, such as the clipboard. that uses Wayland unavailable, such as the clipboard.
*-s* *-s*

View File

@ -1,4 +1,4 @@
*various.txt* For Vim version 9.1. Last change: 2025 Jun 27 *various.txt* For Vim version 9.1. Last change: 2025 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -794,12 +794,12 @@ K Run a program to lookup the keyword under the
If the value was never specified, then it uses the If the value was never specified, then it uses the
value of $DISPLAY environment variable as it was when value of $DISPLAY environment variable as it was when
Vim was started. This will also update |v:clipmethod|. Vim was started. This will also update |v:clipmethod|.
{only available when compiled with the |+xterm_clipboard| {only available when compiled with the
feature} |+xterm_clipboard| feature}
*:clipreset* *:clip* *:clipreset* *:clip*
:clip[reset] Attempts to choose a new method for accessing the :clip[reset] Attempts to choose a new method for accessing the
clipboard, using the 'clipmethod' option. This is clipboard, using the 'clipmethod' option. This is
useful when the current method has become unavailable, useful when the current method has become unavailable,
and you want to try using another method. and you want to try using another method.
{only available when compiled with the |+clipboard| {only available when compiled with the |+clipboard|

View File

@ -1,4 +1,4 @@
*wayland.txt* For Vim version 9.1. Last change: 2025 Jun 27 *wayland.txt* For Vim version 9.1. Last change: 2025 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -15,7 +15,7 @@ Wayland Protocol Support *wayland*
*wayland-seat* *wayland-seat*
Functionality such as the clipboard for Wayland requires a seat to use. A Functionality such as the clipboard for Wayland requires a seat to use. A
Wayland seat can consist of a keyboard, pointer, and touch device(s). The Wayland seat can consist of a keyboard, pointer, and touch device(s). The
seat to use can be set with the 'wlseat' option. Only useful if you use seat to use can be set with the 'wlseat' option. Only useful if you use
multiple Wayland seats in the same Wayland session. multiple Wayland seats in the same Wayland session.
*wayland-gui* *wayland-gui*
@ -26,24 +26,25 @@ should equal to "none" when running the GUI.
Wayland commands: Wayland commands:
*:wlrestore* *:wl* *:wlrestore* *:wl*
:wl[estore] [display] Reinitializes the connection to the wayland compositor. :wl[restore] [display] Reinitializes the connection to the Wayland compositor.
Useful when running Vim in a screen/tmux session that Useful when running Vim in a screen/tmux session that
continues running after the Wayland compositor continues running after the Wayland compositor
restarts. restarts.
[display] should be in the format of the [display] should be in the format of the
$WAYLAND_DISPLAY environment variable (e.g. $WAYLAND_DISPLAY environment variable (e.g.
"wayland-0"). If [display] is omitted, then it "wayland-0"). If [display] is omitted, then it
reinitializes the connection using the same value as reinitializes the connection using the same value as
was used for the previous execution of this command. was used for the previous execution of this command.
If the value was never specified, then it uses the If the value was never specified, then it uses the
value of $WAYLAND_DISPLAY environment variable. This value of $WAYLAND_DISPLAY environment variable. This
will also update |v:clipmethod|. will also update |v:clipmethod|.
{only available when compiled with the |+wayland| feature} {only available when compiled with the |+wayland|
feature}
Wayland errors: Wayland errors:
*E1548* *E1548*
Vim failed communicating with the wayland compositor. This is likely due to Vim failed communicating with the Wayland compositor. This is likely due to
the Wayland compositor process being killed. Try the `:wlrestore` command to the Wayland compositor process being killed. Try the `:wlrestore` command to
try connecting again. try connecting again.
@ -61,15 +62,15 @@ should be bunded with libwayland on your system: >
If you don't get any match, then please see |wayland-focus-steal| for more If you don't get any match, then please see |wayland-focus-steal| for more
information. information.
If you come from X11, then the regular wayland selection is equivalent to the If you come from X11, then the regular Wayland selection is equivalent to the
CLIPBOARD selection in X11, and the primary wayland selection equates to the CLIPBOARD selection in X11, and the primary Wayland selection equates to the
X11 primary selection. Accessing these selections is the same as X11 in Vim, X11 primary selection. Accessing these selections is the same as X11 in Vim,
in which the + register is the regular selection, and the * register is the in which the + register is the regular selection, and the * register is the
primary selection, note that your compositor may not support primary primary selection, note that your compositor may not support primary
selections, see |wayland-primary-selection| for more details. selections, see |wayland-primary-selection| for more details.
*wayland-persist* *wayland-persist*
If you use X11 cut buffers, no such things exist on Wayland. Instead to If you use X11 cut buffers, no such things exist on Wayland. Instead to
emulate such functionality, a separate clipboard manager must be used in order emulate such functionality, a separate clipboard manager must be used in order
to persist selection data when a Wayland client exists. to persist selection data when a Wayland client exists.
@ -78,7 +79,7 @@ If your version of Vim comes compiled with both X11 and Wayland support, then
Vim determines which one to use when accessing the clipboard using the Vim determines which one to use when accessing the clipboard using the
'clipmethod' option. 'clipmethod' option.
*wayland-primary-selection* *wayland-primary-selection*
If you find X11 style primary selections useful, Wayland also implements this If you find X11 style primary selections useful, Wayland also implements this
behaviour in its own protocols: behaviour in its own protocols:
@ -88,10 +89,10 @@ behaviour in its own protocols:
- Data control protocol available on your system, such as the ext or wlr - Data control protocol available on your system, such as the ext or wlr
protocols, then primary selection is also supported. This is unless you are protocols, then primary selection is also supported. This is unless you are
using version 1 (not the same as the 'v1' in the protocol name), of the using version 1 (not the same as the 'v1' in the protocol name), of the
wlr-data-control protocol. Then the primary selection protocol will be used wlr-data-control protocol. Then the primary selection protocol will be used
as a fallback. as a fallback.
*wayland-focus-steal* *wayland-gnome* *wayland-focus-steal* *wayland-gnome*
If you are using the GNOME desktop environment on Wayland, as of this writing, If you are using the GNOME desktop environment on Wayland, as of this writing,
there is no method of accessing/modifying the clipboard for external clients there is no method of accessing/modifying the clipboard for external clients
such as Vim without being focused. Focused in this case means the client has such as Vim without being focused. Focused in this case means the client has

4
src/auto/configure vendored
View File

@ -9107,8 +9107,8 @@ test -z "$with_wayland" && with_wayland=yes
if test "$with_wayland" = yes; then if test "$with_wayland" = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; } printf "%s\n" "yes" >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if wayland client header files can be found" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Wayland client header files can be found" >&5
printf %s "checking if wayland client header files can be found... " >&6; } printf %s "checking if Wayland client header files can be found... " >&6; }
cppflags_save=$CPPFLAGS cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext

View File

@ -2676,7 +2676,7 @@ clip_wl_lose_selection(Clipboard_T *cbd)
} }
/* /*
* Send the current selection to the clipboard. Do nothing for wayland because * Send the current selection to the clipboard. Do nothing for Wayland because
* we will fill in the selection only when requested by another client. * we will fill in the selection only when requested by another client.
*/ */
void void
@ -2797,14 +2797,14 @@ choose_clipmethod(void)
if (method == CLIPMETHOD_FAIL) if (method == CLIPMETHOD_FAIL)
return e_invalid_argument; return e_invalid_argument;
// If GUI is running or we are not on a system with wayland or x11, then always // If GUI is running or we are not on a system with Wayland or X11, then always
// return CLIPMETHOD_NONE. System or GUI clipboard handling always overrides. // return CLIPMETHOD_NONE. System or GUI clipboard handling always overrides.
#if defined(FEAT_XCLIPBOARD) || defined(FEAT_WAYLAND_CLIPBOARD) #if defined(FEAT_XCLIPBOARD) || defined(FEAT_WAYLAND_CLIPBOARD)
#if defined(FEAT_GUI) #if defined(FEAT_GUI)
if (gui.in_use) if (gui.in_use)
{ {
#ifdef FEAT_WAYLAND #ifdef FEAT_WAYLAND
// We only interact with wayland for the clipboard, we can just deinit // We only interact with Wayland for the clipboard, we can just deinit
// everything. // everything.
wayland_uninit_client(); wayland_uninit_client();
#endif #endif

View File

@ -2407,7 +2407,7 @@ AC_ARG_WITH(wayland,
test -z "$with_wayland" && with_wayland=yes test -z "$with_wayland" && with_wayland=yes
if test "$with_wayland" = yes; then if test "$with_wayland" = yes; then
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_MSG_CHECKING(if wayland client header files can be found) AC_MSG_CHECKING(if Wayland client header files can be found)
cppflags_save=$CPPFLAGS cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <wayland-client.h>], )], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <wayland-client.h>], )],

View File

@ -813,7 +813,7 @@
#endif #endif
/* /*
* +wayland Unix only. Include code for the wayland protocol, * +wayland Unix only. Include code for the Wayland protocol,
* only works if HAVE_WAYLAND is defined. * only works if HAVE_WAYLAND is defined.
*/ */
#if defined(FEAT_NORMAL) && defined(UNIX) #if defined(FEAT_NORMAL) && defined(UNIX)

View File

@ -2079,7 +2079,7 @@ EXTERN clipmethod_T clipmethod INIT(= CLIPMETHOD_NONE);
#ifdef FEAT_WAYLAND #ifdef FEAT_WAYLAND
// Don't connect to wayland compositor if TRUE // Don't connect to Wayland compositor if TRUE
EXTERN int wayland_no_connect INIT(= FALSE); EXTERN int wayland_no_connect INIT(= FALSE);
// Wayland display name (ex. wayland-0). Can be NULL // Wayland display name (ex. wayland-0). Can be NULL

View File

@ -684,11 +684,11 @@ vim_main2(void)
{ {
if (wayland_init_client(wayland_display_name) == OK) if (wayland_init_client(wayland_display_name) == OK)
{ {
TIME_MSG("connected to wayland display"); TIME_MSG("connected to Wayland display");
# ifdef FEAT_WAYLAND_CLIPBOARD # ifdef FEAT_WAYLAND_CLIPBOARD
if (wayland_cb_init((char*)p_wse) == OK) if (wayland_cb_init((char*)p_wse) == OK)
TIME_MSG("setup wayland clipboard"); TIME_MSG("setup Wayland clipboard");
} }
# endif # endif
} }
@ -2482,7 +2482,7 @@ command_line_scan(mparm_T *parmp)
x_no_connect = TRUE; x_no_connect = TRUE;
#endif #endif
break; break;
case 'Y': // "-Y" don't connect to wayland compositor case 'Y': // "-Y" don't connect to Wayland compositor
#if defined(FEAT_WAYLAND) #if defined(FEAT_WAYLAND)
wayland_no_connect = TRUE; wayland_no_connect = TRUE;
#endif #endif
@ -3693,7 +3693,7 @@ usage(void)
main_msg(_("-X\t\t\tDo not connect to X server")); main_msg(_("-X\t\t\tDo not connect to X server"));
#endif #endif
#if defined(FEAT_WAYLAND) #if defined(FEAT_WAYLAND)
main_msg(_("-Y\t\t\tDo not connect to wayland compositor")); main_msg(_("-Y\t\t\tDo not connect to Wayland compositor"));
#endif #endif
#ifdef FEAT_CLIENTSERVER #ifdef FEAT_CLIENTSERVER
main_msg(_("--remote <files>\tEdit <files> in a Vim server if possible")); main_msg(_("--remote <files>\tEdit <files> in a Vim server if possible"));

View File

@ -3650,7 +3650,7 @@ expand_set_scrollopt(optexpand_T *args, int *numMatches, char_u ***matches)
did_set_wlseat(optset_T *args UNUSED) did_set_wlseat(optset_T *args UNUSED)
{ {
#ifdef FEAT_WAYLAND_CLIPBOARD #ifdef FEAT_WAYLAND_CLIPBOARD
// If there isn't any seat named 'wlseat', then let the wayland clipboard be // If there isn't any seat named 'wlseat', then let the Wayland clipboard be
// unavailable. Ignore errors returned. // unavailable. Ignore errors returned.
wayland_cb_reload(); wayland_cb_reload();
#endif #endif

View File

@ -1319,7 +1319,7 @@ static void *clip_plus_save = NULL;
|| defined(FEAT_WAYLAND_CLIPBOARD)) || defined(FEAT_WAYLAND_CLIPBOARD))
/* /*
* Called when Vim is going to sleep or execute a shell command. * Called when Vim is going to sleep or execute a shell command.
* We can't respond to requests for the X or wayland selections. * We can't respond to requests for the X or Wayland selections.
* Lose them, otherwise other applications will hang. But first * Lose them, otherwise other applications will hang. But first
* copy the text to cut buffer 0 (for X11). Wayland users must have * copy the text to cut buffer 0 (for X11). Wayland users must have
* a clipboard manager to replicate such behaviour. * a clipboard manager to replicate such behaviour.
@ -5608,7 +5608,7 @@ mch_call_shell_fork(
clip_update(); clip_update();
# endif # endif
#ifdef FEAT_WAYLAND #ifdef FEAT_WAYLAND
// Handle wayland events such as sending data as the source // Handle Wayland events such as sending data as the source
// client. // client.
wayland_client_update(); wayland_client_update();
#endif #endif
@ -5682,7 +5682,7 @@ finished:
clip_update(); clip_update();
#endif #endif
#ifdef FEAT_WAYLAND #ifdef FEAT_WAYLAND
// Handle wayland events such as sending data as the source // Handle Wayland events such as sending data as the source
// client. // client.
wayland_client_update(); wayland_client_update();
#endif #endif

View File

@ -115,7 +115,7 @@ func Test_wayland_wlrestore()
call assert_equal(l:wayland_display, v:wayland_display) call assert_equal(l:wayland_display, v:wayland_display)
" Check if calling wlrestore without arguments uses the existing wayland " Check if calling wlrestore without arguments uses the existing Wayland
" display. " display.
wlrestore! wlrestore!
call assert_equal(l:wayland_display, v:wayland_display) call assert_equal(l:wayland_display, v:wayland_display)
@ -151,7 +151,7 @@ func Test_wayland_wlrestore()
call EndWaylandCompositor(l:wayland_display) call EndWaylandCompositor(l:wayland_display)
endfunc endfunc
" Test behaviour when wayland display connection is lost " Test behaviour when Wayland display connection is lost
func Test_wayland_connection_lost() func Test_wayland_connection_lost()
call s:PreTest() call s:PreTest()
@ -356,7 +356,7 @@ func Test_wayland_plus_star_not_same()
bw! bw!
endfunc endfunc
" Test if autoselect option in 'clipboard' works properly for wayland " Test if autoselect option in 'clipboard' works properly for Wayland
func Test_wayland_autoselect_works() func Test_wayland_autoselect_works()
call s:PreTest() call s:PreTest()
call s:CheckXConnection() call s:CheckXConnection()

View File

@ -719,6 +719,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1486,
/**/ /**/
1485, 1485,
/**/ /**/

View File

@ -8,7 +8,7 @@
*/ */
/* /*
* wayland.c: Stuff related to wayland * wayland.c: Stuff related to Wayland
*/ */
#include "vim.h" #include "vim.h"
@ -49,7 +49,7 @@ typedef struct {
#endif #endif
} vwl_global_objects_T; } vwl_global_objects_T;
// Struct wrapper for wayland display and registry // Struct wrapper for Wayland display and registry
typedef struct { typedef struct {
struct wl_display *proxy; struct wl_display *proxy;
int fd; // File descriptor for display int fd; // File descriptor for display
@ -946,7 +946,7 @@ vwl_seat_get_keyboard(vwl_seat_T *seat)
} }
/* /*
* Connects to the wayland display with given name and binds to global objects * Connects to the Wayland display with given name and binds to global objects
* as needed. If display is NULL then the $WAYLAND_DISPLAY environment variable * as needed. If display is NULL then the $WAYLAND_DISPLAY environment variable
* will be used (handled by libwayland). Returns FAIL on failure and OK on * will be used (handled by libwayland). Returns FAIL on failure and OK on
* success * success
@ -970,7 +970,7 @@ fail:
} }
/* /*
* Disconnect wayland client and free up all resources used. * Disconnect Wayland client and free up all resources used.
*/ */
void void
wayland_uninit_client(void) wayland_uninit_client(void)
@ -984,7 +984,7 @@ wayland_uninit_client(void)
} }
/* /*
* Return TRUE if wayland display connection is valid and ready. * Return TRUE if Wayland display connection is valid and ready.
*/ */
int int
wayland_client_is_connected(int quiet) wayland_client_is_connected(int quiet)
@ -1884,7 +1884,7 @@ vwl_clipboard_free_mime_types(vwl_clipboard_selection_T *clip_sel)
} }
/* /*
* Setup required objects to interact with wayland selections/clipboard on given * Setup required objects to interact with Wayland selections/clipboard on given
* seat. Returns OK on success and FAIL on failure. * seat. Returns OK on success and FAIL on failure.
*/ */
int int
@ -2325,7 +2325,7 @@ wayland_cb_selection_is_owned(wayland_selection_T selection)
} }
/* /*
* Return TRUE if the wayland clipboard/selections are ready to use. * Return TRUE if the Wayland clipboard/selections are ready to use.
*/ */
int int
wayland_cb_is_ready(void) wayland_cb_is_ready(void)
@ -2339,7 +2339,7 @@ wayland_cb_is_ready(void)
} }
/* /*
* Reload wayland clipboard, useful if changing seat. * Reload Wayland clipboard, useful if changing seat.
*/ */
int int
wayland_cb_reload(void) wayland_cb_reload(void)
@ -2391,7 +2391,7 @@ wayland_may_restore_connection(void)
} }
/* /*
* Disconnect then reconnect wayland connection, and update clipmethod. * Disconnect then reconnect Wayland connection, and update clipmethod.
*/ */
void void
ex_wlrestore(exarg_T *eap) ex_wlrestore(exarg_T *eap)
@ -2405,7 +2405,7 @@ ex_wlrestore(exarg_T *eap)
display = (char*)eap->arg; display = (char*)eap->arg;
// Return early if shebang is not passed, we are still connected, and if not // Return early if shebang is not passed, we are still connected, and if not
// changing to a new wayland display. // changing to a new Wayland display.
if (!eap->forceit && wayland_client_is_connected(TRUE) && if (!eap->forceit && wayland_client_is_connected(TRUE) &&
(display == wayland_display_name || (display == wayland_display_name ||
(wayland_display_name != NULL && (wayland_display_name != NULL &&
@ -2434,14 +2434,14 @@ ex_wlrestore(exarg_T *eap)
if (wayland_init_client(display) == OK) if (wayland_init_client(display) == OK)
{ {
smsg(_("restoring wayland display %s"), wayland_display_name); smsg(_("restoring Wayland display %s"), wayland_display_name);
#ifdef FEAT_WAYLAND_CLIPBOARD #ifdef FEAT_WAYLAND_CLIPBOARD
wayland_cb_init((char*)p_wse); wayland_cb_init((char*)p_wse);
#endif #endif
} }
else else
msg(_("failed restoring, lost connection to wayland display")); msg(_("failed restoring, lost connection to Wayland display"));
vim_free(display); vim_free(display);