Skip to content

Commit 09b3b4c

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 4858f11 + 75a0f3c commit 09b3b4c

130 files changed

Lines changed: 1929 additions & 7384 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Filelist

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,6 @@ SRC_UNIX = \
446446
src/create_cmdidxs.vim \
447447
src/create_nvcmdidxs.c \
448448
src/create_nvcmdidxs.vim \
449-
src/gui_at_fs.c \
450-
src/gui_at_sb.c \
451-
src/gui_at_sb.h \
452-
src/gui_athena.c \
453449
src/gui_gtk.c \
454450
src/gui_gtk_f.c \
455451
src/gui_gtk_f.h \
@@ -474,7 +470,6 @@ SRC_UNIX = \
474470
src/osdef1.h.in \
475471
src/osdef2.h.in \
476472
src/pathdef.sh \
477-
src/proto/gui_athena.pro \
478473
src/proto/gui_gtk.pro \
479474
src/proto/gui_gtk_x11.pro \
480475
src/proto/gui_gtk_gresources.pro \

runtime/doc/builtin.txt

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ exists_compiled({expr}) Number |TRUE| if {expr} exists at compile time
161161
exp({expr}) Float exponential of {expr}
162162
expand({expr} [, {nosuf} [, {list}]])
163163
any expand special keywords in {expr}
164-
expandcmd({expr}) String expand {expr} like with `:edit`
164+
expandcmd({string} [, {options}])
165+
String expand {string} like with `:edit`
165166
extend({expr1}, {expr2} [, {expr3}])
166167
List/Dict insert items of {expr2} into {expr1}
167168
extendnew({expr1}, {expr2} [, {expr3}])
@@ -2293,16 +2294,28 @@ expand({string} [, {nosuf} [, {list}]]) *expand()*
22932294
Can also be used as a |method|: >
22942295
Getpattern()->expand()
22952296
2296-
expandcmd({string}) *expandcmd()*
2297+
expandcmd({string} [, {options}]) *expandcmd()*
22972298
Expand special items in String {string} like what is done for
22982299
an Ex command such as `:edit`. This expands special keywords,
22992300
like with |expand()|, and environment variables, anywhere in
23002301
{string}. "~user" and "~/path" are only expanded at the
23012302
start.
2302-
Returns the expanded string. Example: >
2303-
:echo expandcmd('make %<.o')
23042303

2305-
< Can also be used as a |method|: >
2304+
The following items are supported in the {options} Dict
2305+
argument:
2306+
errmsg If set to TRUE, error messages are displayed
2307+
if an error is encountered during expansion.
2308+
By default, error messages are not displayed.
2309+
2310+
Returns the expanded string. If an error is encountered
2311+
during expansion, the unmodified {string} is returned.
2312+
2313+
Example: >
2314+
:echo expandcmd('make %<.o')
2315+
make /path/runtime/doc/builtin.o
2316+
:echo expandcmd('make %<.o', {'errmsg': v:true})
2317+
<
2318+
Can also be used as a |method|: >
23062319
GetCommand()->expandcmd()
23072320
<
23082321
extend({expr1}, {expr2} [, {expr3}]) *extend()*

runtime/doc/channel.txt

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,13 @@ To open a channel: >
119119
120120
Use |ch_status()| to see if the channel could be opened.
121121

122-
{address} has the form "hostname:port". E.g., "localhost:8765".
123-
124-
When using an IPv6 address, enclose it within square brackets. E.g.,
125-
"[2001:db8::1]:8765".
122+
*channel-address*
123+
{address} can be a domain name or an IP address, followed by a port number, or
124+
a Unix-domain socket path prefixed by "unix:". E.g. >
125+
www.example.com:80 " domain + port
126+
127.0.0.1:1234 " IPv4 + port
127+
[2001:db8::1]:8765 " IPv6 + port
128+
unix:/tmp/my-socket " Unix-domain socket path
126129
127130
{options} is a dictionary with optional entries: *channel-open-options*
128131

@@ -579,10 +582,15 @@ ch_info({handle}) *ch_info()*
579582
When opened with ch_open():
580583
"hostname" the hostname of the address
581584
"port" the port of the address
585+
"path" the path of the Unix-domain socket
582586
"sock_status" "open" or "closed"
583587
"sock_mode" "NL", "RAW", "JSON" or "JS"
584588
"sock_io" "socket"
585589
"sock_timeout" timeout in msec
590+
591+
Note that "pair" is only present for Unix-domain sockets, for
592+
regular ones "hostname" and "port" are present instead.
593+
586594
When opened with job_start():
587595
"out_status" "open", "buffered" or "closed"
588596
"out_mode" "NL", "RAW", "JSON" or "JS"
@@ -641,11 +649,8 @@ ch_open({address} [, {options}]) *ch_open()*
641649
Open a channel to {address}. See |channel|.
642650
Returns a Channel. Use |ch_status()| to check for failure.
643651

644-
{address} is a String and has the form "hostname:port", e.g.,
645-
"localhost:8765".
646-
647-
When using an IPv6 address, enclose it within square brackets.
648-
E.g., "[2001:db8::1]:8765".
652+
{address} is a String, see |channel-address| for the possible
653+
accepted forms.
649654

650655
If {options} is given it must be a |Dictionary|.
651656
See |channel-open-options|.

runtime/doc/gui.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Other GUI documentation:
2626

2727
First you must make sure you actually have a version of Vim with the GUI code
2828
included. You can check this with the ":version" command, it says "with xxx
29-
GUI", where "xxx" is MacVim, X11-Motif, X11-Athena, Photon, GTK2, GTK3, etc., or
29+
GUI", where "xxx" is MacVim, X11-Motif, Photon, GTK2, GTK3, etc., or
3030
"MS-Windows 32 bit GUI version".
3131

3232
How to start the GUI depends on the system used. Mostly you can run the
@@ -109,7 +109,7 @@ There are a number of options which only have meaning in the GUI version of
109109
Vim. These are 'guicursor', 'guifont', 'guipty' and 'guioptions'. They are
110110
documented in |options.txt| with all the other options.
111111

112-
If using the Motif or Athena version of the GUI (but not for the GTK+ or
112+
If using the Motif version of the GUI (but not for the GTK+ or
113113
Win32 version), a number of X resources are available. See |gui-resources|.
114114

115115
Another way to set the colors for different occasions is with highlight
@@ -237,7 +237,7 @@ takes too much time or you don't like the cursor jumping to another line,
237237
include the 'h' flag in 'guioptions'. Then the scrolling is limited by the
238238
text of the current cursor line.
239239

240-
*athena-intellimouse*
240+
*motif-intellimouse*
241241
If you have an Intellimouse and an X server that supports using the wheel,
242242
then you can use the wheel to scroll the text up and down in gvim. This works
243243
with XFree86 4.0 and later, and with some older versions when you add patches.
@@ -262,6 +262,7 @@ Other options that are relevant:
262262
'mousefocus' window focus follows mouse pointer |gui-mouse-focus|
263263
'mousemodel' what mouse button does which action
264264
'mousehide' hide mouse pointer while typing text
265+
'mousemoveevent' enable mouse move events so that <MouseMove> can be mapped
265266
'selectmode' whether to start Select mode or Visual mode
266267

267268
A quick way to set these is with the ":behave" command.
@@ -407,6 +408,9 @@ These mappings make selection work the way it probably should in a Motif
407408
application, with shift-left mouse allowing for extending the visual area
408409
rather than the right mouse button.
409410

411+
<MouseMove> may be mapped, but 'mousemoveevent' must be enabled to use the
412+
mapping.
413+
410414
Mouse mapping with modifiers does not work for modeless selection.
411415

412416

@@ -743,8 +747,8 @@ because the item will never be selected. Use a single colon to keep it
743747
simple.
744748

745749
*gui-toolbar*
746-
The toolbar is currently available in the MacVim, Win32, Athena, Motif, GTK+
747-
(X11), and Photon GUI. It should turn up in other GUIs in due course. The
750+
The toolbar is currently available in the MacVim, Win32, Motif, GTK+ (X11),
751+
and Photon GUI. It should turn up in other GUIs in due course. The
748752
default toolbar is setup in menu.vim. (Note: The MacVim toolbar is modified
749753
in "$VIM/gvimrc".)
750754
The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
@@ -860,7 +864,7 @@ The window toolbar uses the ToolbarLine and ToolbarButton highlight groups.
860864
When splitting the window the window toolbar is not copied to the new window.
861865

862866
*popup-menu*
863-
In the Win32, MacVim, GTK+, Motif, Athena and Photon GUI, you can define the
867+
In the Win32, MacVim, GTK+, Motif, and Photon GUI, you can define the
864868
special menu "PopUp". This is the menu that is displayed when the right mouse
865869
button is pressed, if 'mousemodel' is set to popup or popup_setpos.
866870
Example: >

runtime/doc/gui_x11.txt

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
*gui_x11.txt* For Vim version 8.2. Last change: 2020 Jun 05
1+
*gui_x11.txt* For Vim version 8.2. Last change: 2022 Apr 03
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
55

66

77
Vim's Graphical User Interface *gui-x11* *GUI-X11*
8-
*Athena* *Motif*
8+
*Motif*
99
1. Starting the X11 GUI |gui-x11-start|
1010
2. GUI Resources |gui-resources|
1111
3. Shell Commands |gui-pty|
@@ -73,7 +73,7 @@ flag in 'guioptions'. |-f|. MacVim does not support this flag in
7373
==============================================================================
7474
2. GUI Resources *gui-resources* *.Xdefaults*
7575

76-
If using the Motif or Athena version of the GUI (not for the KDE, GTK+ or Win32
76+
If using the Motif version of the GUI (not for the KDE, GTK+ or Win32
7777
version), a number of X resources are available. You should use Vim's class
7878
"Vim" when setting these. They are as follows:
7979

@@ -105,7 +105,6 @@ version), a number of X resources are available. You should use Vim's class
105105
is same size as terminal that started it).
106106
scrollbarWidth Thickness of scrollbars.
107107
borderWidth Thickness of border around text area.
108-
menuHeight Height of the menu bar (only for Athena).
109108

110109
A special font for italic, bold, and italic-bold text will only be used if
111110
the user has specified one via a resource. No attempt is made to guess what
@@ -144,12 +143,9 @@ which make Motif applications look even better, highly recommended!
144143

145144
The "Vim*fontList" is to set the menu font for Motif. Example: >
146145
Vim*menuBar*fontList: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
147-
With Athena: >
148-
Vim*menuBar*SmeBSB*font: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
149-
Vim*menuBar*MenuButton*font: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
150146
151147
NOTE: A more portable, and indeed more correct, way to specify the menu font
152-
in either Motif or Athena is through the resource: >
148+
in Motif is through the resource: >
153149
Vim.menuFont: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
154150
Or, when compiled with the |+xfontset| feature: >
155151
Vim.menuFontSet: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
@@ -264,7 +260,7 @@ For example: >
264260
:10vmenu File.Print :w !lpr -Php3
265261
<
266262
*X11-icon*
267-
Vim uses a black&white icon by default when compiled with Motif or Athena. A
263+
Vim uses a black&white icon by default when compiled with Motif. A
268264
colored Vim icon is included as $VIMRUNTIME/vim32x32.xpm. For GTK+, this is
269265
the builtin icon used. Unfortunately, how you should install it depends on
270266
your window manager. When you use this, remove the 'i' flag from
@@ -603,8 +599,7 @@ GTK+ files on your system. When both GTK+ 2 and GTK+ 3 are available, GTK+ 2
603599
will be chosen unless --enable-gui=gtk3 is passed explicitly to configure.
604600

605601
If the GTK+ files cannot be found, then the Motif files will be searched for.
606-
Finally, if this fails, the Athena files will be searched for. If all three
607-
fail, the GUI will be disabled.
602+
If both fail, the GUI will be disabled.
608603

609604
For GTK+, Vim's configuration process uses pkg-config(1) to check if the
610605
GTK+ required for a specified build is properly installed and usable.
@@ -630,10 +625,10 @@ explicitly to configure, and avoid passing --enable-gnome-check to that, as
630625
the functionality of the GNOME 2 support has already been consolidated in
631626
GTK+ 3.
632627

633-
Otherwise, if you are using Motif or Athena, when you have the Motif or Athena
634-
files in a directory where configure doesn't look, edit the Makefile to enter
635-
the names of the directories. Search for "GUI_INC_LOC" for an example to set
636-
the Motif directories, "CONF_OPT_X" for Athena.
628+
Otherwise, if you are using Motif, when you have the Motif files in a
629+
directory where configure doesn't look, edit the Makefile to enter the names
630+
of the directories. Search for "GUI_INC_LOC" for an example to set
631+
the Motif directories.
637632

638633
*gui-x11-gtk*
639634
Currently, Vim supports both GTK+ 2 and GTK+ 3.
@@ -652,18 +647,11 @@ few problems, but you might make it compile and run with a bit of work, please
652647
send me the patches if you do). The newest releases of LessTif have been
653648
reported to work fine too.
654649

655-
*gui-x11-athena*
656-
The Athena version uses the Xaw widget set by default. If you have the 3D
657-
version, you might want to link with Xaw3d instead. This will make the
658-
menus look a bit better. Edit the Makefile and look for "XAW_LIB". The
659-
scrollbars will remain the same, because Vim has its own, which are already
660-
3D (in fact, they look more like Motif).
661-
662-
*gui-x11-neXtaw*
663-
The neXtaw version is mostly like Athena, but uses different widgets.
650+
*gui-x11-athena* *gui-x11-neXtaw*
651+
Support for the Athena GUI and neXtaw was removed in patch 8.2.4677.
664652

665653
*gui-x11-misc*
666-
In general, do not try to mix files from different GTK+, Motif, Athena and X11
654+
In general, do not try to mix files from different GTK+, Motif and X11
667655
versions. This will cause problems. For example, using header files for
668656
X11R5 with a library for X11R6 probably doesn't work (although the linking
669657
won't give an error message, Vim will crash later).

runtime/doc/options.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5649,6 +5649,18 @@ A jump table for the options with a short description can be found at |Q_op|.
56495649

56505650
The 'mousemodel' option is set by the |:behave| command.
56515651

5652+
*'mousemoveevent'* *'mousemev'*
5653+
'mousemoveevent' 'mousemev' boolean (default off)
5654+
global
5655+
{only works in the GUI}
5656+
When on, mouse move events are delivered to the input queue and are
5657+
available for mapping. The default, off, avoids the mouse movement
5658+
overhead except when needed. See |gui-mouse-mapping|.
5659+
Warning: Setting this option can make pending mappings to be aborted
5660+
when the mouse is moved.
5661+
Currently only works in the GUI, may be made to work in a terminal
5662+
later.
5663+
56525664
*'mouseshape'* *'mouses'* *E547*
56535665
'mouseshape' 'mouses' string (default "i-r:beam,s:updown,sd:udsizing,
56545666
vs:leftright,vd:lrsizing,m:no,

runtime/doc/popup.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@ popup_create({what}, {options}) *popup_create()*
271271
'buftype' set to "popup". That buffer will be wiped out once
272272
the popup closes.
273273

274+
if {what} is a buffer number and loading the buffer runs into
275+
an existing swap file, it is silently opened read-only, as if
276+
a |SwapExists| autocommand had set |v:swapchoice| to 'o'.
277+
This is because we assume the buffer is only used for viewing.
278+
274279
{options} is a dictionary with many possible entries.
275280
See |popup_create-arguments| for details.
276281

runtime/doc/testing.txt

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ test_gui_event({event}, {args})
131131
forward: set to 1 for forward search.
132132

133133
"mouse":
134-
Inject a mouse button click event. The supported items in
135-
{args} are:
134+
Inject either a mouse button click, or a mouse move, event.
135+
The supported items in {args} are:
136136
button: mouse button. The supported values are:
137137
0 right mouse button
138138
1 middle mouse button
@@ -151,6 +151,28 @@ test_gui_event({event}, {args})
151151
4 shift is pressed
152152
8 alt is pressed
153153
16 ctrl is pressed
154+
move: Optional; if used and TRUE then a mouse move
155+
event can be generated.
156+
Only {args} row: and col: are used and
157+
required; they are interpreted as pixels.
158+
Only results in an event when 'mousemoveevent'
159+
is set or a popup uses mouse move events.
160+
161+
"scrollbar":
162+
Set or drag the left, right or horizontal scrollbar. Only
163+
works when the scrollbar actually exists. The supported
164+
items in {args} are:
165+
which: scrollbar. The supported values are:
166+
left Left scrollbar of the current window
167+
right Right scrollbar of the current window
168+
hor Horizontal scrollbar
169+
value: amount to scroll. For the vertical scrollbars
170+
the value can be 1 to the line-count of the
171+
buffer. For the horizontal scrollbar the
172+
value can be between 1 and the maximum line
173+
length, assuming 'wrap' is not set.
174+
dragging: 1 to drag the scrollbar and 0 to click in the
175+
scrollbar.
154176

155177
"scrollbar":
156178
Set or drag the left, right or horizontal scrollbar. Only

runtime/filetype.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,9 @@ au BufNewFile,BufRead *.ex call dist#ft#ExCheck()
420420
au BufRead,BufNewFile mix.lock,*.exs setf elixir
421421
au BufRead,BufNewFile *.eex,*.leex setf eelixir
422422

423+
" Elvish
424+
au BufRead,BufNewFile *.elv setf elvish
425+
423426
" Euphoria 3 or 4
424427
au BufNewFile,BufRead *.eu,*.ew,*.exu,*.exw call dist#ft#EuphoriaCheck()
425428
if has("fname_case")

0 commit comments

Comments
 (0)