mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge branch 'master' into colored-cmdline
This commit is contained in:
commit
474aa823dc
@ -920,7 +920,7 @@ TermClose When a terminal buffer ends.
|
|||||||
{Nvim} *TermOpen*
|
{Nvim} *TermOpen*
|
||||||
TermOpen When a terminal buffer is starting. This can
|
TermOpen When a terminal buffer is starting. This can
|
||||||
be used to configure the terminal emulator by
|
be used to configure the terminal emulator by
|
||||||
setting buffer variables. |terminal-emulator|
|
setting buffer variables. |terminal|
|
||||||
*TermResponse*
|
*TermResponse*
|
||||||
TermResponse After the response to |t_RV| is received from
|
TermResponse After the response to |t_RV| is received from
|
||||||
the terminal. The value of |v:termresponse|
|
the terminal. The value of |v:termresponse|
|
||||||
@ -967,9 +967,9 @@ VimEnter After doing all the startup stuff, including
|
|||||||
VimLeave Before exiting Vim, just after writing the
|
VimLeave Before exiting Vim, just after writing the
|
||||||
.shada file. Executed only once, like
|
.shada file. Executed only once, like
|
||||||
VimLeavePre.
|
VimLeavePre.
|
||||||
To detect an abnormal exit use |v:dying|.
|
< Use |v:dying| to detect an abnormal exit.
|
||||||
When v:dying is 2 or more this event is not
|
Use |v:exiting| to get the exit code.
|
||||||
triggered.
|
Not triggered if |v:dying| is 2 or more.
|
||||||
*VimLeavePre*
|
*VimLeavePre*
|
||||||
VimLeavePre Before exiting Vim, just before writing the
|
VimLeavePre Before exiting Vim, just before writing the
|
||||||
.shada file. This is executed only once,
|
.shada file. This is executed only once,
|
||||||
@ -977,9 +977,9 @@ VimLeavePre Before exiting Vim, just before writing the
|
|||||||
happens to be the current buffer when exiting.
|
happens to be the current buffer when exiting.
|
||||||
Mostly useful with a "*" pattern. >
|
Mostly useful with a "*" pattern. >
|
||||||
:autocmd VimLeavePre * call CleanupStuff()
|
:autocmd VimLeavePre * call CleanupStuff()
|
||||||
< To detect an abnormal exit use |v:dying|.
|
< Use |v:dying| to detect an abnormal exit.
|
||||||
When v:dying is 2 or more this event is not
|
Use |v:exiting| to get the exit code.
|
||||||
triggered.
|
Not triggered if |v:dying| is 2 or more.
|
||||||
*VimResized*
|
*VimResized*
|
||||||
VimResized After the Vim window was resized, thus 'lines'
|
VimResized After the Vim window was resized, thus 'lines'
|
||||||
and/or 'columns' changed. Not when starting
|
and/or 'columns' changed. Not when starting
|
||||||
|
@ -63,12 +63,6 @@ NVIM IS... WELL DOCUMENTED *design-documented*
|
|||||||
- Documentation should be comprehensive and understandable. Use examples.
|
- Documentation should be comprehensive and understandable. Use examples.
|
||||||
- Don't make the text unnecessarily long. Less documentation means that an
|
- Don't make the text unnecessarily long. Less documentation means that an
|
||||||
item is easier to find.
|
item is easier to find.
|
||||||
- Do not prefix doc-tags with "nvim-". Use |vim_diff.txt| to document
|
|
||||||
differences from Vim. The {Nvim} annotation is also available
|
|
||||||
to mark a specific feature. No other distinction is necessary.
|
|
||||||
- If a feature is removed, delete its doc entry and move its tag to
|
|
||||||
|vim_diff.txt|.
|
|
||||||
- Move deprecated features to |deprecated.txt|.
|
|
||||||
|
|
||||||
|
|
||||||
NVIM IS... HIGH SPEED AND SMALL IN SIZE *design-speed-size*
|
NVIM IS... HIGH SPEED AND SMALL IN SIZE *design-speed-size*
|
||||||
@ -113,7 +107,7 @@ include the kitchen sink... but it's good for plumbing."
|
|||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
Developer guidelines *dev-help*
|
Developer guidelines *dev*
|
||||||
|
|
||||||
|
|
||||||
JARGON *dev-jargon*
|
JARGON *dev-jargon*
|
||||||
@ -192,6 +186,18 @@ defined if a valid external Python host is found. That works well with the
|
|||||||
Python host isn't installed then the plugin will "think" it is running in
|
Python host isn't installed then the plugin will "think" it is running in
|
||||||
a Vim compiled without the |+python| feature.
|
a Vim compiled without the |+python| feature.
|
||||||
|
|
||||||
|
DOCUMENTATION *dev-doc*
|
||||||
|
|
||||||
|
- Do not prefix help tags with "nvim-". Use |vim_diff.txt| to document
|
||||||
|
differences from Vim; no other distinction is necessary.
|
||||||
|
- If a Vim feature is removed, delete its help section and move its tag to
|
||||||
|
|vim_diff.txt|.
|
||||||
|
- Move deprecated features to |deprecated.txt|.
|
||||||
|
- Use consistent language.
|
||||||
|
- "terminal" in a help tag always means "the embedded terminal emulator", not
|
||||||
|
"the user host terminal".
|
||||||
|
- Use "tui-" to prefix help tags related to the host terminal, and "TUI"
|
||||||
|
in prose if possible.
|
||||||
|
|
||||||
API *dev-api*
|
API *dev-api*
|
||||||
|
|
||||||
|
@ -7662,7 +7662,7 @@ termopen({cmd}[, {opts}]) {Nvim} *termopen()*
|
|||||||
and `$TERM` is set to "xterm-256color".
|
and `$TERM` is set to "xterm-256color".
|
||||||
Returns the same values as |jobstart()|.
|
Returns the same values as |jobstart()|.
|
||||||
|
|
||||||
See |terminal-emulator| for more information.
|
See |terminal| for more information.
|
||||||
|
|
||||||
test_garbagecollect_now() *test_garbagecollect_now()*
|
test_garbagecollect_now() *test_garbagecollect_now()*
|
||||||
Like garbagecollect(), but executed right away. This must
|
Like garbagecollect(), but executed right away. This must
|
||||||
|
@ -96,7 +96,7 @@ General subjects ~
|
|||||||
|howto.txt| how to do the most common editing tasks
|
|howto.txt| how to do the most common editing tasks
|
||||||
|tips.txt| various tips on using Vim
|
|tips.txt| various tips on using Vim
|
||||||
|message.txt| (error) messages and explanations
|
|message.txt| (error) messages and explanations
|
||||||
|develop.txt| development of Vim
|
|develop.txt| development of Nvim
|
||||||
|debug.txt| debugging Vim itself
|
|debug.txt| debugging Vim itself
|
||||||
|uganda.txt| Vim distribution conditions and what to do with your money
|
|uganda.txt| Vim distribution conditions and what to do with your money
|
||||||
|
|
||||||
@ -134,7 +134,6 @@ Advanced editing ~
|
|||||||
Special issues ~
|
Special issues ~
|
||||||
|print.txt| printing
|
|print.txt| printing
|
||||||
|remote.txt| using Vim as a server or client
|
|remote.txt| using Vim as a server or client
|
||||||
|term.txt| using different terminals and mice
|
|
||||||
|digraph.txt| list of available digraphs
|
|digraph.txt| list of available digraphs
|
||||||
|mbyte.txt| multi-byte text support
|
|mbyte.txt| multi-byte text support
|
||||||
|mlang.txt| non-English language support
|
|mlang.txt| non-English language support
|
||||||
|
@ -10,15 +10,18 @@ Nvim embeds a VT220/xterm terminal emulator based on libvterm. The terminal is
|
|||||||
presented as a special buffer type, asynchronously updated from the virtual
|
presented as a special buffer type, asynchronously updated from the virtual
|
||||||
terminal as data is received from the program connected to it.
|
terminal as data is received from the program connected to it.
|
||||||
|
|
||||||
Terminal buffers behave mostly like normal 'nomodifiable' buffers, except:
|
Terminal buffers behave like normal buffers, except:
|
||||||
- Plugins can set 'modifiable' to modify text, but lines cannot be deleted.
|
- With 'modifiable', lines can be edited but not deleted.
|
||||||
- 'scrollback' controls how many off-screen lines are kept.
|
- 'scrollback' controls how many lines are kept.
|
||||||
- Terminal output is followed if the cursor is on the last line.
|
- Output is followed if the cursor is on the last line.
|
||||||
|
- 'modified' is the default. You can set 'nomodified' to avoid a warning when
|
||||||
|
closing the terminal buffer.
|
||||||
|
- 'bufhidden' defaults to "hide".
|
||||||
|
|
||||||
Type <M-]> to see the table of contents.
|
Type <M-]> to see the table of contents.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
Spawning *terminal-emulator-spawning*
|
Start *terminal-start*
|
||||||
|
|
||||||
There are 3 ways to create a terminal buffer:
|
There are 3 ways to create a terminal buffer:
|
||||||
|
|
||||||
@ -35,13 +38,12 @@ There are 3 ways to create a terminal buffer:
|
|||||||
autocmd VimEnter * nested split term://sh
|
autocmd VimEnter * nested split term://sh
|
||||||
< This is only mentioned for reference; use |:terminal| instead.
|
< This is only mentioned for reference; use |:terminal| instead.
|
||||||
|
|
||||||
When the terminal spawns the program, the buffer will start to mirror the
|
When the terminal starts, the buffer contents are updated and the buffer is
|
||||||
terminal display and change its name to `term://{cwd}//{pid}:{cmd}`.
|
named in the form of `term://{cwd}//{pid}:{cmd}`. This naming scheme is used
|
||||||
The "term://..." scheme enables |:mksession| to "restore" a terminal buffer by
|
by |:mksession| to restore a terminal buffer (by restarting the {cmd}).
|
||||||
restarting the {cmd} when the session is loaded.
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
Input *terminal-emulator-input*
|
Input *terminal-input*
|
||||||
|
|
||||||
To send input, enter |Terminal-mode| using any command that would enter "insert
|
To send input, enter |Terminal-mode| using any command that would enter "insert
|
||||||
mode" in a normal buffer, such as |i| or |:startinsert|. In this mode all keys
|
mode" in a normal buffer, such as |i| or |:startinsert|. In this mode all keys
|
||||||
@ -83,9 +85,9 @@ Mouse input has the following behavior:
|
|||||||
the terminal wont lose focus and the hovered window will be scrolled.
|
the terminal wont lose focus and the hovered window will be scrolled.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
Configuration *terminal-emulator-configuration*
|
Configuration *terminal-configuration*
|
||||||
|
|
||||||
Options: 'scrollback'
|
Options: 'modified', 'scrollback'
|
||||||
Events: |TermOpen|, |TermClose|
|
Events: |TermOpen|, |TermClose|
|
||||||
Highlight groups: |hl-TermCursor|, |hl-TermCursorNC|
|
Highlight groups: |hl-TermCursor|, |hl-TermCursorNC|
|
||||||
|
|
||||||
@ -99,17 +101,15 @@ global configuration.
|
|||||||
You can change the defaults with a TermOpen autocommand: >
|
You can change the defaults with a TermOpen autocommand: >
|
||||||
au TermOpen * setlocal list
|
au TermOpen * setlocal list
|
||||||
|
|
||||||
Terminal colors can be customized with these variables:
|
TERMINAL COLORS ~
|
||||||
|
|
||||||
- `{g,b}:terminal_color_$NUM`: The terminal color palette, where `$NUM` is the
|
The `{g,b}:terminal_color_$NUM` variables control the terminal color palette,
|
||||||
color index, between 0 and 255 inclusive. This setting only affects UIs with
|
where `$NUM` is the color index between 0 and 255 inclusive. This setting only
|
||||||
RGB capabilities; for normal terminals the color index is simply forwarded.
|
affects UIs with RGB capabilities; for normal terminals the color index is
|
||||||
|
just forwarded. The variables are read only during |TermOpen|.
|
||||||
The `{g,b}:terminal_color_$NUM` variables are processed only when the terminal
|
|
||||||
starts (after |TermOpen|).
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
Status Variables *terminal-emulator-status*
|
Status Variables *terminal-status*
|
||||||
|
|
||||||
Terminal buffers maintain some information about the terminal in buffer-local
|
Terminal buffers maintain some information about the terminal in buffer-local
|
||||||
variables:
|
variables:
|
||||||
|
@ -4794,7 +4794,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
local to buffer
|
local to buffer
|
||||||
Maximum number of lines kept beyond the visible screen. Lines at the
|
Maximum number of lines kept beyond the visible screen. Lines at the
|
||||||
top are deleted if new lines exceed this limit.
|
top are deleted if new lines exceed this limit.
|
||||||
Only in |terminal-emulator| buffers. 'buftype'
|
Only in |terminal| buffers.
|
||||||
-1 means "unlimited" for normal buffers, 100000 otherwise.
|
-1 means "unlimited" for normal buffers, 100000 otherwise.
|
||||||
Minimum is 1.
|
Minimum is 1.
|
||||||
|
|
||||||
|
@ -1,179 +0,0 @@
|
|||||||
*os_win32.txt* Nvim
|
|
||||||
|
|
||||||
|
|
||||||
NVIM REFERENCE MANUAL
|
|
||||||
|
|
||||||
|
|
||||||
*win32* *Win32* *MS-Windows*
|
|
||||||
This file documents the Win32 version of Nvim.
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
1. Known problems *win32-problems*
|
|
||||||
|
|
||||||
When doing file name completion, Vim also finds matches for the short file
|
|
||||||
name. But Vim will still find and use the corresponding long file name. For
|
|
||||||
example, if you have the long file name "this_is_a_test" with the short file
|
|
||||||
name "this_i~1", the command ":e *1" will start editing "this_is_a_test".
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
2. Startup *win32-startup*
|
|
||||||
|
|
||||||
Current directory *win32-curdir*
|
|
||||||
|
|
||||||
If Vim is started with a single file name argument, and it has a full path
|
|
||||||
(starts with "x:\"), Vim assumes it was started from the file explorer and
|
|
||||||
will set the current directory to where that file is. To avoid this when
|
|
||||||
typing a command to start Vim, use a forward slash instead of a backslash.
|
|
||||||
Example: >
|
|
||||||
|
|
||||||
vim c:\text\files\foo.txt
|
|
||||||
|
|
||||||
Will change to the "C:\text\files" directory. >
|
|
||||||
|
|
||||||
vim c:/text\files\foo.txt
|
|
||||||
|
|
||||||
Will use the current directory.
|
|
||||||
|
|
||||||
|
|
||||||
Term option *win32-term*
|
|
||||||
|
|
||||||
The only kind of terminal type that the Win32 version of Vim understands is
|
|
||||||
"win32", which is built-in. If you set 'term' to anything else, you will
|
|
||||||
probably get very strange behavior from Vim. Therefore Vim does not obtain
|
|
||||||
the default value of 'term' from the environment variable "TERM".
|
|
||||||
|
|
||||||
$PATH *win32-PATH*
|
|
||||||
|
|
||||||
The directory of the Vim executable is appended to $PATH. This is mostly to
|
|
||||||
make "!xxd" work, as it is in the Tools menu. And it also means that when
|
|
||||||
executable() returns 1 the executable can actually be executed.
|
|
||||||
|
|
||||||
Quotes in file names *win32-quotes*
|
|
||||||
|
|
||||||
Quotes inside a file name (or any other command line argument) can be escaped
|
|
||||||
with a backslash. E.g. >
|
|
||||||
vim -c "echo 'foo\"bar'"
|
|
||||||
|
|
||||||
Alternatively use three quotes to get one: >
|
|
||||||
vim -c "echo 'foo"""bar'"
|
|
||||||
|
|
||||||
The quotation rules are:
|
|
||||||
|
|
||||||
1. A `"` starts quotation.
|
|
||||||
2. Another `"` or `""` ends quotation. If the quotation ends with `""`, a `"`
|
|
||||||
is produced at the end of the quoted string.
|
|
||||||
|
|
||||||
Examples, with [] around an argument:
|
|
||||||
"foo" -> [foo]
|
|
||||||
"foo"" -> [foo"]
|
|
||||||
"foo"bar -> [foobar]
|
|
||||||
"foo" bar -> [foo], [bar]
|
|
||||||
"foo""bar -> [foo"bar]
|
|
||||||
"foo"" bar -> [foo"], [bar]
|
|
||||||
"foo"""bar" -> [foo"bar]
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
3. Using the mouse *win32-mouse*
|
|
||||||
|
|
||||||
The Win32 version of Vim supports using the mouse. If you have a two-button
|
|
||||||
mouse, the middle button can be emulated by pressing both left and right
|
|
||||||
buttons simultaneously - but note that in the Win32 GUI, if you have the right
|
|
||||||
mouse button pop-up menu enabled (see 'mouse'), you should err on the side of
|
|
||||||
pressing the left button first. |mouse-using|
|
|
||||||
|
|
||||||
When the mouse doesn't work, try disabling the "Quick Edit Mode" feature of
|
|
||||||
the console.
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
4. Win32 mini FAQ *win32-faq*
|
|
||||||
|
|
||||||
Q. How do I change the font?
|
|
||||||
A. In the GUI version, you can use the 'guifont' option. Example: >
|
|
||||||
:set guifont=Lucida_Console:h15:cDEFAULT
|
|
||||||
< In the console version, you need to set the font of the console itself.
|
|
||||||
You cannot do this from within Vim.
|
|
||||||
|
|
||||||
Q. I'm using Vim to edit a symbolically linked file on a Unix NFS file server.
|
|
||||||
When I write the file, Vim does not "write through" the symlink. Instead,
|
|
||||||
it deletes the symbolic link and creates a new file in its place. Why?
|
|
||||||
A. On Unix, Vim is prepared for links (symbolic or hard). A backup copy of
|
|
||||||
the original file is made and then the original file is overwritten. This
|
|
||||||
assures that all properties of the file remain the same. On non-Unix
|
|
||||||
systems, the original file is renamed and a new file is written. Only the
|
|
||||||
protection bits are set like the original file. However, this doesn't work
|
|
||||||
properly when working on an NFS-mounted file system where links and other
|
|
||||||
things exist. The only way to fix this in the current version is not
|
|
||||||
making a backup file, by ":set nobackup nowritebackup" |'writebackup'|
|
|
||||||
|
|
||||||
Q. I'm using Vim to edit a file on a Unix file server through Samba. When I
|
|
||||||
write the file, the owner of the file is changed. Why?
|
|
||||||
A. When writing a file Vim renames the original file, this is a backup (in
|
|
||||||
case writing the file fails halfway). Then the file is written as a new
|
|
||||||
file. Samba then gives it the default owner for the file system, which may
|
|
||||||
differ from the original owner.
|
|
||||||
To avoid this set the 'backupcopy' option to "yes". Vim will then make a
|
|
||||||
copy of the file for the backup, and overwrite the original file. The
|
|
||||||
owner isn't changed then.
|
|
||||||
|
|
||||||
Q. How do I get to see the output of ":make" while it's running?
|
|
||||||
A. Basically what you need is to put a tee program that will copy its input
|
|
||||||
(the output from make) to both stdout and to the errorfile. You can find a
|
|
||||||
copy of tee (and a number of other GNU tools) at
|
|
||||||
http://gnuwin32.sourceforge.net or http://unxutils.sourceforge.net
|
|
||||||
Alternatively, try the more recent Cygnus version of the GNU tools at
|
|
||||||
http://www.cygwin.com Other Unix-style tools for Win32 are listed at
|
|
||||||
http://directory.google.com/Top/Computers/Software/Operating_Systems/Unix/Win32/
|
|
||||||
When you do get a copy of tee, you'll need to add >
|
|
||||||
:set shellpipe=\|\ tee
|
|
||||||
< to your _vimrc.
|
|
||||||
|
|
||||||
*:!start*
|
|
||||||
Q. How can I run an external command or program asynchronously?
|
|
||||||
A. When using :! to run an external command, you can run it with "start": >
|
|
||||||
:!start winfile.exe<CR>
|
|
||||||
< Using "start" stops Vim switching to another screen, opening a new console,
|
|
||||||
or waiting for the program to complete; it indicates that you are running a
|
|
||||||
program that does not affect the files you are editing. Programs begun
|
|
||||||
with :!start do not get passed Vim's open file handles, which means they do
|
|
||||||
not have to be closed before Vim.
|
|
||||||
To avoid this special treatment, use ":! start".
|
|
||||||
There are two optional arguments (see the next Q):
|
|
||||||
/min the window will be minimized
|
|
||||||
/b no console window will be opened
|
|
||||||
You can use only one of these flags at a time. A second one will be
|
|
||||||
treated as the start of the command.
|
|
||||||
|
|
||||||
Q. How do I avoid getting a window for programs that I run asynchronously?
|
|
||||||
A. You have two possible solutions depending on what you want:
|
|
||||||
1) You may use the /min flag in order to run program in a minimized state
|
|
||||||
with no other changes. It will work equally for console and GUI
|
|
||||||
applications.
|
|
||||||
2) You can use the /b flag to run console applications without creating a
|
|
||||||
console window for them (GUI applications are not affected). But you
|
|
||||||
should use this flag only if the application you run doesn't require any
|
|
||||||
input. Otherwise it will get an EOF error because its input stream
|
|
||||||
(stdin) would be redirected to \\.\NUL (stdout and stderr too).
|
|
||||||
|
|
||||||
Example for a console application, run Exuberant ctags: >
|
|
||||||
:!start /min ctags -R .
|
|
||||||
< When it has finished you should see file named "tags" in your current
|
|
||||||
directory. You should notice the window title blinking on your taskbar.
|
|
||||||
This is more noticeable for commands that take longer.
|
|
||||||
Now delete the "tags" file and run this command: >
|
|
||||||
:!start /b ctags -R .
|
|
||||||
< You should have the same "tags" file, but this time there will be no
|
|
||||||
blinking on the taskbar.
|
|
||||||
Example for a GUI application: >
|
|
||||||
:!start /min notepad
|
|
||||||
:!start /b notepad
|
|
||||||
< The first command runs notepad minimized and the second one runs it
|
|
||||||
normally.
|
|
||||||
|
|
||||||
*windows-icon*
|
|
||||||
Q. I don't like the Vim icon, can I change it?
|
|
||||||
A. Yes, place your favorite icon in bitmaps/vim.ico in a directory of
|
|
||||||
'runtimepath'. For example ~/vimfiles/bitmaps/vim.ico.
|
|
||||||
|
|
||||||
|
|
||||||
vim:tw=78:fo=tcq2:ts=8:ft=help:norl:
|
|
@ -53,7 +53,7 @@ filename One or more file names. The first one will be the current
|
|||||||
< Starting in Ex mode: >
|
< Starting in Ex mode: >
|
||||||
nvim -e -
|
nvim -e -
|
||||||
nvim -E
|
nvim -E
|
||||||
< Start editing in silent mode. See |-s-ex|.
|
< Start editing in |silent-mode|.
|
||||||
|
|
||||||
*-t* *-tag*
|
*-t* *-tag*
|
||||||
-t {tag} A tag. "tag" is looked up in the tags file, the associated
|
-t {tag} A tag. "tag" is looked up in the tags file, the associated
|
||||||
@ -200,7 +200,7 @@ argument.
|
|||||||
*-E*
|
*-E*
|
||||||
-E Start Vim in improved Ex mode |gQ|.
|
-E Start Vim in improved Ex mode |gQ|.
|
||||||
|
|
||||||
*-s-ex*
|
*-s-ex* *silent-mode*
|
||||||
-s Silent or batch mode. Only when "-s" is preceded by the "-e"
|
-s Silent or batch mode. Only when "-s" is preceded by the "-e"
|
||||||
argument. Otherwise see |-s|, which does take an argument
|
argument. Otherwise see |-s|, which does take an argument
|
||||||
while this use of "-s" doesn't. To be used when Vim is used
|
while this use of "-s" doesn't. To be used when Vim is used
|
||||||
@ -221,7 +221,7 @@ argument.
|
|||||||
Initializations are skipped (except the ones given with the
|
Initializations are skipped (except the ones given with the
|
||||||
"-u" argument).
|
"-u" argument).
|
||||||
Example: >
|
Example: >
|
||||||
vim -e -s < thefilter thefile
|
vim -es < thefilter thefile
|
||||||
<
|
<
|
||||||
*-b*
|
*-b*
|
||||||
-b Binary mode. File I/O will only recognize <NL> to separate
|
-b Binary mode. File I/O will only recognize <NL> to separate
|
||||||
@ -351,6 +351,7 @@ argument.
|
|||||||
|
|
||||||
*--headless*
|
*--headless*
|
||||||
--headless Do not start the built-in UI.
|
--headless Do not start the built-in UI.
|
||||||
|
See also |silent-mode|, which does start a (limited) UI.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
2. Initialization *initialization* *startup*
|
2. Initialization *initialization* *startup*
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
NVIM REFERENCE MANUAL
|
NVIM REFERENCE MANUAL
|
||||||
|
|
||||||
|
|
||||||
Terminal information
|
Terminal UI *tui*
|
||||||
|
|
||||||
Nvim (except in |--headless| mode) uses information about the terminal you are
|
Nvim (except in |--headless| mode) uses information about the terminal you are
|
||||||
using to present a built-in UI. If that information is not correct, the
|
using to present a built-in UI. If that information is not correct, the
|
||||||
@ -225,14 +225,7 @@ On Unix systems, three methods are tried to get the window size:
|
|||||||
If everything fails a default size of 24 lines and 80 columns is assumed. If
|
If everything fails a default size of 24 lines and 80 columns is assumed. If
|
||||||
a window-resize signal is received the size will be set again. If the window
|
a window-resize signal is received the size will be set again. If the window
|
||||||
size is wrong you can use the 'lines' and 'columns' options to set the
|
size is wrong you can use the 'lines' and 'columns' options to set the
|
||||||
correct values.
|
correct values. See |:mode|.
|
||||||
|
|
||||||
One command can be used to set the screen size:
|
|
||||||
|
|
||||||
*:mod* *:mode*
|
|
||||||
:mod[e]
|
|
||||||
|
|
||||||
Detects the screen size and redraws the screen.
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
Slow and fast terminals *slow-fast-terminal*
|
Slow and fast terminals *slow-fast-terminal*
|
||||||
@ -343,13 +336,12 @@ before using the mouse:
|
|||||||
"g<RightMouse>" is "<C-RightMouse> ("CTRL-T")
|
"g<RightMouse>" is "<C-RightMouse> ("CTRL-T")
|
||||||
|
|
||||||
*bracketed-paste-mode*
|
*bracketed-paste-mode*
|
||||||
Bracketed paste mode allows terminal emulators to distinguish between typed
|
Bracketed paste mode allows terminal applications to distinguish between typed
|
||||||
text and pasted text.
|
text and pasted text. Thus you can paste text without Nvim trying to format or
|
||||||
|
indent the text. See also https://cirw.in/blog/bracketed-paste
|
||||||
|
|
||||||
For terminal emulators that support it, this mode is enabled by default. Thus
|
Nvim enables bracketed paste by default. If it does not work in your terminal,
|
||||||
you can paste text without Nvim giving any special meaning to it, e.g. it will
|
try the 'paste' option instead.
|
||||||
not auto-indent the pasted text. See https://cirw.in/blog/bracketed-paste for
|
|
||||||
technical details.
|
|
||||||
|
|
||||||
*mouse-mode-table* *mouse-overview*
|
*mouse-mode-table* *mouse-overview*
|
||||||
A short overview of what the mouse buttons do, when 'mousemodel' is "extend":
|
A short overview of what the mouse buttons do, when 'mousemodel' is "extend":
|
||||||
|
@ -276,6 +276,21 @@ g8 Print the hex values of the bytes used in the
|
|||||||
< The screen is not redrawn then, thus you have to use
|
< The screen is not redrawn then, thus you have to use
|
||||||
CTRL-L or ":redraw!" if the command did display
|
CTRL-L or ":redraw!" if the command did display
|
||||||
something.
|
something.
|
||||||
|
*:!start*
|
||||||
|
:!start {cmd} (Windows only). Special-case of |:!| which works
|
||||||
|
asynchronously, for running a program that does not
|
||||||
|
affect the files you are editing.
|
||||||
|
Optional arguments (can only use one at a time):
|
||||||
|
/min window will be minimized
|
||||||
|
/b no console window will be opened
|
||||||
|
Note: If the process requires input, /b will get an
|
||||||
|
EOF error because its input stream (stdin) would be
|
||||||
|
redirected to \\.\NUL (stdout and stderr too).
|
||||||
|
|
||||||
|
Programs begun with :!start do not get passed Vim's
|
||||||
|
open file handles, which means they do not have to be
|
||||||
|
closed before Vim. To avoid this special treatment,
|
||||||
|
use ":! start".
|
||||||
|
|
||||||
*:!!*
|
*:!!*
|
||||||
:!! Repeat last ":!{cmd}".
|
:!! Repeat last ":!{cmd}".
|
||||||
|
@ -61,7 +61,7 @@ these differences.
|
|||||||
|
|
||||||
MAJOR COMPONENTS ~
|
MAJOR COMPONENTS ~
|
||||||
|
|
||||||
Embedded terminal emulator |terminal-emulator|
|
Embedded terminal emulator |terminal|
|
||||||
RPC API |RPC|
|
RPC API |RPC|
|
||||||
Shared data |shada|
|
Shared data |shada|
|
||||||
XDG base directories |xdg|
|
XDG base directories |xdg|
|
||||||
|
@ -523,6 +523,9 @@ CTRL-W > Increase current window width by N (default 1).
|
|||||||
:vertical res[ize] [N] *:vertical-resize* *CTRL-W_bar*
|
:vertical res[ize] [N] *:vertical-resize* *CTRL-W_bar*
|
||||||
CTRL-W | Set current window width to N (default: widest possible).
|
CTRL-W | Set current window width to N (default: widest possible).
|
||||||
|
|
||||||
|
*:mod* *:mode*
|
||||||
|
:mod[e] Detects the screen size and redraws the screen.
|
||||||
|
|
||||||
You can also resize a window by dragging a status line up or down with the
|
You can also resize a window by dragging a status line up or down with the
|
||||||
mouse. Or by dragging a vertical separator line left or right. This only
|
mouse. Or by dragging a vertical separator line left or right. This only
|
||||||
works if the version of Vim that is being used supports the mouse and the
|
works if the version of Vim that is being used supports the mouse and the
|
||||||
|
@ -135,7 +135,7 @@ preprocess_patch() {
|
|||||||
local na_src='proto\|Make*\|gui_*\|if_lua\|if_mzsch\|if_olepp\|if_ole\|if_perl\|if_py\|if_ruby\|if_tcl\|if_xcmdsrv'
|
local na_src='proto\|Make*\|gui_*\|if_lua\|if_mzsch\|if_olepp\|if_ole\|if_perl\|if_py\|if_ruby\|if_tcl\|if_xcmdsrv'
|
||||||
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%('${na_src}'\)@norm! d/\v(^diff)|%$
' +w +q "$file"
|
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%('${na_src}'\)@norm! d/\v(^diff)|%$
' +w +q "$file"
|
||||||
|
|
||||||
# Remove channel.txt, netbeans.txt, os_*.txt, todo.txt, version*.txt, tags
|
# Remove channel.txt, netbeans.txt, os_*.txt, term.txt, todo.txt, version*.txt, tags
|
||||||
local na_doc='channel\.txt\|netbeans\.txt\|os_\w\+\.txt\|term\.txt\|todo\.txt\|version\d\.txt\|tags'
|
local na_doc='channel\.txt\|netbeans\.txt\|os_\w\+\.txt\|term\.txt\|todo\.txt\|version\d\.txt\|tags'
|
||||||
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/doc/\<\%('${na_doc}'\)\>@norm! d/\v(^diff)|%$
' +w +q "$file"
|
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/doc/\<\%('${na_doc}'\)\>@norm! d/\v(^diff)|%$
' +w +q "$file"
|
||||||
|
|
||||||
|
@ -2613,7 +2613,8 @@ def CheckBraces(filename, clean_lines, linenum, error):
|
|||||||
|
|
||||||
func_start_linenum += 1
|
func_start_linenum += 1
|
||||||
else:
|
else:
|
||||||
if clean_lines.lines[func_start_linenum].endswith('{'):
|
func_start = clean_lines.lines[func_start_linenum]
|
||||||
|
if not func_start.startswith('enum ') and func_start.endswith('{'):
|
||||||
error(filename, func_start_linenum,
|
error(filename, func_start_linenum,
|
||||||
'readability/braces', 5,
|
'readability/braces', 5,
|
||||||
'Brace starting function body must be placed '
|
'Brace starting function body must be placed '
|
||||||
|
@ -628,13 +628,13 @@ return {
|
|||||||
command='cscope',
|
command='cscope',
|
||||||
flags=bit.bor(EXTRA, NOTRLCOM, XFILE),
|
flags=bit.bor(EXTRA, NOTRLCOM, XFILE),
|
||||||
addr_type=ADDR_LINES,
|
addr_type=ADDR_LINES,
|
||||||
func='do_cscope',
|
func='ex_cscope',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
command='cstag',
|
command='cstag',
|
||||||
flags=bit.bor(BANG, TRLBAR, WORD1),
|
flags=bit.bor(BANG, TRLBAR, WORD1),
|
||||||
addr_type=ADDR_LINES,
|
addr_type=ADDR_LINES,
|
||||||
func='do_cstag',
|
func='ex_cstag',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
command='cunmap',
|
command='cunmap',
|
||||||
@ -1324,7 +1324,7 @@ return {
|
|||||||
command='lcscope',
|
command='lcscope',
|
||||||
flags=bit.bor(EXTRA, NOTRLCOM, XFILE),
|
flags=bit.bor(EXTRA, NOTRLCOM, XFILE),
|
||||||
addr_type=ADDR_LINES,
|
addr_type=ADDR_LINES,
|
||||||
func='do_cscope',
|
func='ex_cscope',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
command='ldo',
|
command='ldo',
|
||||||
@ -2334,7 +2334,7 @@ return {
|
|||||||
command='scscope',
|
command='scscope',
|
||||||
flags=bit.bor(EXTRA, NOTRLCOM),
|
flags=bit.bor(EXTRA, NOTRLCOM),
|
||||||
addr_type=ADDR_LINES,
|
addr_type=ADDR_LINES,
|
||||||
func='do_scscope',
|
func='ex_scscope',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
command='set',
|
command='set',
|
||||||
|
@ -1665,11 +1665,15 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|
|||||||
ea.addr_count++;
|
ea.addr_count++;
|
||||||
|
|
||||||
if (*ea.cmd == ';') {
|
if (*ea.cmd == ';') {
|
||||||
if (!ea.skip)
|
if (!ea.skip) {
|
||||||
curwin->w_cursor.lnum = ea.line2;
|
curwin->w_cursor.lnum = ea.line2;
|
||||||
} else if (*ea.cmd != ',')
|
// Don't leave the cursor on an illegal line (caused by ';')
|
||||||
|
check_cursor_lnum();
|
||||||
|
}
|
||||||
|
} else if (*ea.cmd != ',') {
|
||||||
break;
|
break;
|
||||||
++ea.cmd;
|
}
|
||||||
|
ea.cmd++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* One address given: set start and end lines */
|
/* One address given: set start and end lines */
|
||||||
@ -1680,9 +1684,6 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|
|||||||
ea.addr_count = 0;
|
ea.addr_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't leave the cursor on an illegal line (caused by ';') */
|
|
||||||
check_cursor_lnum();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 5. Parse the command.
|
* 5. Parse the command.
|
||||||
*/
|
*/
|
||||||
@ -8321,7 +8322,7 @@ static void ex_tag_cmd(exarg_T *eap, char_u *name)
|
|||||||
break;
|
break;
|
||||||
default: /* ":tag" */
|
default: /* ":tag" */
|
||||||
if (p_cst && *eap->arg != NUL) {
|
if (p_cst && *eap->arg != NUL) {
|
||||||
do_cstag(eap);
|
ex_cstag(eap);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cmd = DT_TAG;
|
cmd = DT_TAG;
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
#include "nvim/assert.h"
|
#include "nvim/assert.h"
|
||||||
|
#include "nvim/log.h"
|
||||||
#include "nvim/vim.h"
|
#include "nvim/vim.h"
|
||||||
#include "nvim/ascii.h"
|
#include "nvim/ascii.h"
|
||||||
#include "nvim/arabic.h"
|
#include "nvim/arabic.h"
|
||||||
@ -518,11 +519,12 @@ static int command_line_execute(VimState *state, int key)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// free expanded names when finished walking through matches
|
// free expanded names when finished walking through matches
|
||||||
if (s->xpc.xp_numfiles != -1
|
if (!(s->c == p_wc && KeyTyped) && s->c != p_wcm
|
||||||
&& !(s->c == p_wc && KeyTyped) && s->c != p_wcm
|
|
||||||
&& s->c != Ctrl_N && s->c != Ctrl_P && s->c != Ctrl_A
|
&& s->c != Ctrl_N && s->c != Ctrl_P && s->c != Ctrl_A
|
||||||
&& s->c != Ctrl_L) {
|
&& s->c != Ctrl_L) {
|
||||||
(void)ExpandOne(&s->xpc, NULL, NULL, 0, WILD_FREE);
|
if (s->xpc.xp_numfiles != -1) {
|
||||||
|
(void)ExpandOne(&s->xpc, NULL, NULL, 0, WILD_FREE);
|
||||||
|
}
|
||||||
s->did_wild_list = false;
|
s->did_wild_list = false;
|
||||||
if (!p_wmnu || (s->c != K_UP && s->c != K_DOWN)) {
|
if (!p_wmnu || (s->c != K_UP && s->c != K_DOWN)) {
|
||||||
s->xpc.xp_context = EXPAND_NOTHING;
|
s->xpc.xp_context = EXPAND_NOTHING;
|
||||||
@ -1271,6 +1273,7 @@ static int command_line_handle_key(CommandLineState *s)
|
|||||||
break; // Use ^D as normal char instead
|
break; // Use ^D as normal char instead
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wild_menu_showing = WM_LIST;
|
||||||
redrawcmd();
|
redrawcmd();
|
||||||
return 1; // don't do incremental search now
|
return 1; // don't do incremental search now
|
||||||
|
|
||||||
@ -1501,7 +1504,7 @@ static int command_line_handle_key(CommandLineState *s)
|
|||||||
if (s->hiscnt != s->i) {
|
if (s->hiscnt != s->i) {
|
||||||
// jumped to other entry
|
// jumped to other entry
|
||||||
char_u *p;
|
char_u *p;
|
||||||
int len;
|
int len = 0;
|
||||||
int old_firstc;
|
int old_firstc;
|
||||||
|
|
||||||
xfree(ccline.cmdbuff);
|
xfree(ccline.cmdbuff);
|
||||||
|
@ -931,8 +931,11 @@ EXTERN char_u langmap_mapchar[256]; /* mapping for language keys */
|
|||||||
EXTERN int save_p_ls INIT(= -1); /* Save 'laststatus' setting */
|
EXTERN int save_p_ls INIT(= -1); /* Save 'laststatus' setting */
|
||||||
EXTERN int save_p_wmh INIT(= -1); /* Save 'winminheight' setting */
|
EXTERN int save_p_wmh INIT(= -1); /* Save 'winminheight' setting */
|
||||||
EXTERN int wild_menu_showing INIT(= 0);
|
EXTERN int wild_menu_showing INIT(= 0);
|
||||||
# define WM_SHOWN 1 /* wildmenu showing */
|
enum {
|
||||||
# define WM_SCROLLED 2 /* wildmenu showing with scroll */
|
WM_SHOWN = 1, ///< wildmenu showing
|
||||||
|
WM_SCROLLED = 2, ///< wildmenu showing with scroll
|
||||||
|
WM_LIST = 3, ///< cmdline CTRL-D
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
EXTERN char breakat_flags[256]; /* which characters are in 'breakat' */
|
EXTERN char breakat_flags[256]; /* which characters are in 'breakat' */
|
||||||
|
@ -172,14 +172,10 @@ void set_context_in_cscope_cmd(expand_T *xp, const char *arg, cmdidx_T cmdidx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Find the command, print help if invalid, and then call the corresponding
|
||||||
* PRIVATE: do_cscope_general
|
/// command function.
|
||||||
*
|
|
||||||
* Find the command, print help if invalid, and then call the corresponding
|
|
||||||
* command function.
|
|
||||||
*/
|
|
||||||
static void
|
static void
|
||||||
do_cscope_general (
|
do_cscope_general(
|
||||||
exarg_T *eap,
|
exarg_T *eap,
|
||||||
int make_split /* whether to split window */
|
int make_split /* whether to split window */
|
||||||
)
|
)
|
||||||
@ -208,29 +204,20 @@ do_cscope_general (
|
|||||||
postponed_split_tab = 0;
|
postponed_split_tab = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Implementation of ":cscope" and ":lcscope"
|
||||||
* PUBLIC: do_cscope
|
void ex_cscope(exarg_T *eap)
|
||||||
*/
|
|
||||||
void do_cscope(exarg_T *eap)
|
|
||||||
{
|
{
|
||||||
do_cscope_general(eap, FALSE);
|
do_cscope_general(eap, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Implementation of ":scscope". Same as ex_cscope(), but splits window, too.
|
||||||
* PUBLIC: do_scscope
|
void ex_scscope(exarg_T *eap)
|
||||||
*
|
|
||||||
* same as do_cscope, but splits window, too.
|
|
||||||
*/
|
|
||||||
void do_scscope(exarg_T *eap)
|
|
||||||
{
|
{
|
||||||
do_cscope_general(eap, TRUE);
|
do_cscope_general(eap, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Implementation of ":cstag"
|
||||||
* PUBLIC: do_cstag
|
void ex_cstag(exarg_T *eap)
|
||||||
*
|
|
||||||
*/
|
|
||||||
void do_cstag(exarg_T *eap)
|
|
||||||
{
|
{
|
||||||
int ret = FALSE;
|
int ret = FALSE;
|
||||||
|
|
||||||
@ -285,18 +272,13 @@ void do_cstag(exarg_T *eap)
|
|||||||
(void)EMSG(_("E257: cstag: tag not found"));
|
(void)EMSG(_("E257: cstag: tag not found"));
|
||||||
g_do_tagpreview = 0;
|
g_do_tagpreview = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} /* do_cscope */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// This simulates a vim_fgets(), but for cscope, returns the next line
|
||||||
* PUBLIC: cs_find
|
/// from the cscope output. should only be called from find_tags()
|
||||||
*
|
///
|
||||||
* this simulates a vim_fgets(), but for cscope, returns the next line
|
/// @return TRUE if eof, FALSE otherwise
|
||||||
* from the cscope output. should only be called from find_tags()
|
|
||||||
*
|
|
||||||
* returns TRUE if eof, FALSE otherwise
|
|
||||||
*/
|
|
||||||
int cs_fgets(char_u *buf, int size)
|
int cs_fgets(char_u *buf, int size)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
@ -309,21 +291,13 @@ int cs_fgets(char_u *buf, int size)
|
|||||||
} /* cs_fgets */
|
} /* cs_fgets */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Called only from do_tag(), when popping the tag stack.
|
||||||
* PUBLIC: cs_free_tags
|
|
||||||
*
|
|
||||||
* called only from do_tag(), when popping the tag stack
|
|
||||||
*/
|
|
||||||
void cs_free_tags(void)
|
void cs_free_tags(void)
|
||||||
{
|
{
|
||||||
cs_manage_matches(NULL, NULL, 0, Free);
|
cs_manage_matches(NULL, NULL, 0, Free);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Called from do_tag().
|
||||||
* PUBLIC: cs_print_tags
|
|
||||||
*
|
|
||||||
* called from do_tag()
|
|
||||||
*/
|
|
||||||
void cs_print_tags(void)
|
void cs_print_tags(void)
|
||||||
{
|
{
|
||||||
cs_manage_matches(NULL, NULL, 0, Print);
|
cs_manage_matches(NULL, NULL, 0, Print);
|
||||||
@ -404,14 +378,8 @@ int cs_connection(int num, char_u *dbpath, char_u *ppath)
|
|||||||
* PRIVATE functions
|
* PRIVATE functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/*
|
/// Add cscope database or a directory name (to look for cscope.out)
|
||||||
* PRIVATE: cs_add
|
/// to the cscope connection list.
|
||||||
*
|
|
||||||
* add cscope database or a directory name (to look for cscope.out)
|
|
||||||
* to the cscope connection list
|
|
||||||
*
|
|
||||||
* MAXPATHL 256
|
|
||||||
*/
|
|
||||||
static int cs_add(exarg_T *eap)
|
static int cs_add(exarg_T *eap)
|
||||||
{
|
{
|
||||||
char *fname, *ppath, *flags = NULL;
|
char *fname, *ppath, *flags = NULL;
|
||||||
@ -437,17 +405,13 @@ static void cs_stat_emsg(char *fname)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// The common routine to add a new cscope connection. Called by
|
||||||
* PRIVATE: cs_add_common
|
/// cs_add() and cs_reset(). I really don't like to do this, but this
|
||||||
*
|
/// routine uses a number of goto statements.
|
||||||
* the common routine to add a new cscope connection. called by
|
|
||||||
* cs_add() and cs_reset(). i really don't like to do this, but this
|
|
||||||
* routine uses a number of goto statements.
|
|
||||||
*/
|
|
||||||
static int
|
static int
|
||||||
cs_add_common (
|
cs_add_common(
|
||||||
char *arg1, /* filename - may contain environment variables */
|
char *arg1, // filename - may contain environment variables
|
||||||
char *arg2, /* prepend path - may contain environment variables */
|
char *arg2, // prepend path - may contain environment variables
|
||||||
char *flags
|
char *flags
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -561,11 +525,7 @@ static int cs_check_for_tags(void)
|
|||||||
return p_tags[0] != NUL && curbuf->b_p_tags != NULL;
|
return p_tags[0] != NUL && curbuf->b_p_tags != NULL;
|
||||||
} /* cs_check_for_tags */
|
} /* cs_check_for_tags */
|
||||||
|
|
||||||
/*
|
/// Count the number of cscope connections.
|
||||||
* PRIVATE: cs_cnt_connections
|
|
||||||
*
|
|
||||||
* count the number of cscope connections
|
|
||||||
*/
|
|
||||||
static size_t cs_cnt_connections(void)
|
static size_t cs_cnt_connections(void)
|
||||||
{
|
{
|
||||||
size_t cnt = 0;
|
size_t cnt = 0;
|
||||||
@ -585,11 +545,7 @@ static void cs_reading_emsg(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define CSREAD_BUFSIZE 2048
|
#define CSREAD_BUFSIZE 2048
|
||||||
/*
|
/// Count the number of matches for a given cscope connection.
|
||||||
* PRIVATE: cs_cnt_matches
|
|
||||||
*
|
|
||||||
* count the number of matches for a given cscope connection.
|
|
||||||
*/
|
|
||||||
static int cs_cnt_matches(size_t idx)
|
static int cs_cnt_matches(size_t idx)
|
||||||
{
|
{
|
||||||
char *stok;
|
char *stok;
|
||||||
@ -639,11 +595,7 @@ static int cs_cnt_matches(size_t idx)
|
|||||||
} /* cs_cnt_matches */
|
} /* cs_cnt_matches */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Creates the actual cscope command query from what the user entered.
|
||||||
* PRIVATE: cs_create_cmd
|
|
||||||
*
|
|
||||||
* Creates the actual cscope command query from what the user entered.
|
|
||||||
*/
|
|
||||||
static char *cs_create_cmd(char *csoption, char *pattern)
|
static char *cs_create_cmd(char *csoption, char *pattern)
|
||||||
{
|
{
|
||||||
char *cmd;
|
char *cmd;
|
||||||
@ -699,12 +651,8 @@ static char *cs_create_cmd(char *csoption, char *pattern)
|
|||||||
} /* cs_create_cmd */
|
} /* cs_create_cmd */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// This piece of code was taken/adapted from nvi. do we need to add
|
||||||
* PRIVATE: cs_create_connection
|
/// the BSD license notice?
|
||||||
*
|
|
||||||
* This piece of code was taken/adapted from nvi. do we need to add
|
|
||||||
* the BSD license notice?
|
|
||||||
*/
|
|
||||||
static int cs_create_connection(size_t i)
|
static int cs_create_connection(size_t i)
|
||||||
{
|
{
|
||||||
#ifdef UNIX
|
#ifdef UNIX
|
||||||
@ -893,14 +841,10 @@ err_closing:
|
|||||||
} /* cs_create_connection */
|
} /* cs_create_connection */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Query cscope using command line interface. Parse the output and use tselect
|
||||||
* PRIVATE: cs_find
|
/// to allow choices. Like Nvi, creates a pipe to send to/from query/cscope.
|
||||||
*
|
///
|
||||||
* query cscope using command line interface. parse the output and use tselect
|
/// @return TRUE if we jump to a tag or abort, FALSE if not.
|
||||||
* to allow choices. like Nvi, creates a pipe to send to/from query/cscope.
|
|
||||||
*
|
|
||||||
* returns TRUE if we jump to a tag or abort, FALSE if not.
|
|
||||||
*/
|
|
||||||
static int cs_find(exarg_T *eap)
|
static int cs_find(exarg_T *eap)
|
||||||
{
|
{
|
||||||
char *opt, *pat;
|
char *opt, *pat;
|
||||||
@ -934,11 +878,7 @@ static int cs_find(exarg_T *eap)
|
|||||||
} /* cs_find */
|
} /* cs_find */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Common code for cscope find, shared by cs_find() and ex_cstag().
|
||||||
* PRIVATE: cs_find_common
|
|
||||||
*
|
|
||||||
* common code for cscope find, shared by cs_find() and do_cstag()
|
|
||||||
*/
|
|
||||||
static int cs_find_common(char *opt, char *pat, int forceit, int verbose,
|
static int cs_find_common(char *opt, char *pat, int forceit, int verbose,
|
||||||
int use_ll, char_u *cmdline)
|
int use_ll, char_u *cmdline)
|
||||||
{
|
{
|
||||||
@ -1111,11 +1051,7 @@ static int cs_find_common(char *opt, char *pat, int forceit, int verbose,
|
|||||||
|
|
||||||
} /* cs_find_common */
|
} /* cs_find_common */
|
||||||
|
|
||||||
/*
|
/// Print help.
|
||||||
* PRIVATE: cs_help
|
|
||||||
*
|
|
||||||
* print help
|
|
||||||
*/
|
|
||||||
static int cs_help(exarg_T *eap)
|
static int cs_help(exarg_T *eap)
|
||||||
{
|
{
|
||||||
cscmd_T *cmdp = cs_cmds;
|
cscmd_T *cmdp = cs_cmds;
|
||||||
@ -1163,11 +1099,7 @@ static void clear_csinfo(size_t i)
|
|||||||
csinfo[i].to_fp = NULL;
|
csinfo[i].to_fp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Insert a new cscope database filename into the filelist.
|
||||||
* PRIVATE: cs_insert_filelist
|
|
||||||
*
|
|
||||||
* insert a new cscope database filename into the filelist
|
|
||||||
*/
|
|
||||||
static int cs_insert_filelist(char *fname, char *ppath, char *flags,
|
static int cs_insert_filelist(char *fname, char *ppath, char *flags,
|
||||||
FileInfo *file_info)
|
FileInfo *file_info)
|
||||||
{
|
{
|
||||||
@ -1227,11 +1159,7 @@ static int cs_insert_filelist(char *fname, char *ppath, char *flags,
|
|||||||
} /* cs_insert_filelist */
|
} /* cs_insert_filelist */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Find cscope command in command table.
|
||||||
* PRIVATE: cs_lookup_cmd
|
|
||||||
*
|
|
||||||
* find cscope command in command table
|
|
||||||
*/
|
|
||||||
static cscmd_T * cs_lookup_cmd(exarg_T *eap)
|
static cscmd_T * cs_lookup_cmd(exarg_T *eap)
|
||||||
{
|
{
|
||||||
cscmd_T *cmdp;
|
cscmd_T *cmdp;
|
||||||
@ -1256,11 +1184,7 @@ static cscmd_T * cs_lookup_cmd(exarg_T *eap)
|
|||||||
} /* cs_lookup_cmd */
|
} /* cs_lookup_cmd */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Nuke em.
|
||||||
* PRIVATE: cs_kill
|
|
||||||
*
|
|
||||||
* nuke em
|
|
||||||
*/
|
|
||||||
static int cs_kill(exarg_T *eap)
|
static int cs_kill(exarg_T *eap)
|
||||||
{
|
{
|
||||||
char *stok;
|
char *stok;
|
||||||
@ -1317,11 +1241,7 @@ static int cs_kill(exarg_T *eap)
|
|||||||
} /* cs_kill */
|
} /* cs_kill */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Actually kills a specific cscope connection.
|
||||||
* PRIVATE: cs_kill_execute
|
|
||||||
*
|
|
||||||
* Actually kills a specific cscope connection.
|
|
||||||
*/
|
|
||||||
static void cs_kill_execute(
|
static void cs_kill_execute(
|
||||||
size_t i, /* cscope table index */
|
size_t i, /* cscope table index */
|
||||||
char *cname /* cscope database name */
|
char *cname /* cscope database name */
|
||||||
@ -1336,26 +1256,22 @@ static void cs_kill_execute(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Convert the cscope output into a ctags style entry (as might be found
|
||||||
* PRIVATE: cs_make_vim_style_matches
|
/// in a ctags tags file). there's one catch though: cscope doesn't tell you
|
||||||
*
|
/// the type of the tag you are looking for. for example, in Darren Hiebert's
|
||||||
* convert the cscope output into a ctags style entry (as might be found
|
/// ctags (the one that comes with vim), #define's use a line number to find the
|
||||||
* in a ctags tags file). there's one catch though: cscope doesn't tell you
|
/// tag in a file while function definitions use a regexp search pattern.
|
||||||
* the type of the tag you are looking for. for example, in Darren Hiebert's
|
///
|
||||||
* ctags (the one that comes with vim), #define's use a line number to find the
|
/// I'm going to always use the line number because cscope does something
|
||||||
* tag in a file while function definitions use a regexp search pattern.
|
/// quirky (and probably other things i don't know about):
|
||||||
*
|
///
|
||||||
* i'm going to always use the line number because cscope does something
|
/// if you have "# define" in your source file, which is
|
||||||
* quirky (and probably other things i don't know about):
|
/// perfectly legal, cscope thinks you have "#define". this
|
||||||
*
|
/// will result in a failed regexp search. :(
|
||||||
* if you have "# define" in your source file, which is
|
///
|
||||||
* perfectly legal, cscope thinks you have "#define". this
|
/// Besides, even if this particular case didn't happen, the search pattern
|
||||||
* will result in a failed regexp search. :(
|
/// would still have to be modified to escape all the special regular expression
|
||||||
*
|
/// characters to comply with ctags formatting.
|
||||||
* besides, even if this particular case didn't happen, the search pattern
|
|
||||||
* would still have to be modified to escape all the special regular expression
|
|
||||||
* characters to comply with ctags formatting.
|
|
||||||
*/
|
|
||||||
static char *cs_make_vim_style_matches(char *fname, char *slno, char *search,
|
static char *cs_make_vim_style_matches(char *fname, char *slno, char *search,
|
||||||
char *tagstr)
|
char *tagstr)
|
||||||
{
|
{
|
||||||
@ -1389,24 +1305,20 @@ static char *cs_make_vim_style_matches(char *fname, char *slno, char *search,
|
|||||||
} /* cs_make_vim_style_matches */
|
} /* cs_make_vim_style_matches */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// This is kind of hokey, but i don't see an easy way round this.
|
||||||
* PRIVATE: cs_manage_matches
|
///
|
||||||
*
|
/// Store: keep a ptr to the (malloc'd) memory of matches originally
|
||||||
* this is kind of hokey, but i don't see an easy way round this..
|
/// generated from cs_find(). the matches are originally lines directly
|
||||||
*
|
/// from cscope output, but transformed to look like something out of a
|
||||||
* Store: keep a ptr to the (malloc'd) memory of matches originally
|
/// ctags. see cs_make_vim_style_matches for more details.
|
||||||
* generated from cs_find(). the matches are originally lines directly
|
///
|
||||||
* from cscope output, but transformed to look like something out of a
|
/// Get: used only from cs_fgets(), this simulates a vim_fgets() to return
|
||||||
* ctags. see cs_make_vim_style_matches for more details.
|
/// the next line from the cscope output. it basically keeps track of which
|
||||||
*
|
/// lines have been "used" and returns the next one.
|
||||||
* Get: used only from cs_fgets(), this simulates a vim_fgets() to return
|
///
|
||||||
* the next line from the cscope output. it basically keeps track of which
|
/// Free: frees up everything and resets
|
||||||
* lines have been "used" and returns the next one.
|
///
|
||||||
*
|
/// Print: prints the tags
|
||||||
* Free: frees up everything and resets
|
|
||||||
*
|
|
||||||
* Print: prints the tags
|
|
||||||
*/
|
|
||||||
static char *cs_manage_matches(char **matches, char **contexts,
|
static char *cs_manage_matches(char **matches, char **contexts,
|
||||||
size_t totmatches, mcmd_e cmd)
|
size_t totmatches, mcmd_e cmd)
|
||||||
{
|
{
|
||||||
@ -1461,11 +1373,7 @@ static char *cs_manage_matches(char **matches, char **contexts,
|
|||||||
} /* cs_manage_matches */
|
} /* cs_manage_matches */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Parse cscope output.
|
||||||
* PRIVATE: cs_parse_results
|
|
||||||
*
|
|
||||||
* parse cscope output
|
|
||||||
*/
|
|
||||||
static char *cs_parse_results(size_t cnumber, char *buf, int bufsize,
|
static char *cs_parse_results(size_t cnumber, char *buf, int bufsize,
|
||||||
char **context, char **linenumber, char **search)
|
char **context, char **linenumber, char **search)
|
||||||
{
|
{
|
||||||
@ -1515,11 +1423,7 @@ static char *cs_parse_results(size_t cnumber, char *buf, int bufsize,
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Write cscope find results to file.
|
||||||
* PRIVATE: cs_file_results
|
|
||||||
*
|
|
||||||
* write cscope find results to file
|
|
||||||
*/
|
|
||||||
static void cs_file_results(FILE *f, int *nummatches_a)
|
static void cs_file_results(FILE *f, int *nummatches_a)
|
||||||
{
|
{
|
||||||
char *search, *slno;
|
char *search, *slno;
|
||||||
@ -1560,13 +1464,9 @@ static void cs_file_results(FILE *f, int *nummatches_a)
|
|||||||
xfree(buf);
|
xfree(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Get parsed cscope output and calls cs_make_vim_style_matches to convert
|
||||||
* PRIVATE: cs_fill_results
|
/// into ctags format.
|
||||||
*
|
/// When there are no matches sets "*matches_p" to NULL.
|
||||||
* get parsed cscope output and calls cs_make_vim_style_matches to convert
|
|
||||||
* into ctags format
|
|
||||||
* When there are no matches sets "*matches_p" to NULL.
|
|
||||||
*/
|
|
||||||
static void cs_fill_results(char *tagstr, size_t totmatches, int *nummatches_a,
|
static void cs_fill_results(char *tagstr, size_t totmatches, int *nummatches_a,
|
||||||
char ***matches_p, char ***cntxts_p,
|
char ***matches_p, char ***cntxts_p,
|
||||||
size_t *matched)
|
size_t *matched)
|
||||||
@ -1758,11 +1658,7 @@ static void cs_print_tags_priv(char **matches, char **cntxts,
|
|||||||
xfree(buf);
|
xfree(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Read a cscope prompt (basically, skip over the ">> ").
|
||||||
* PRIVATE: cs_read_prompt
|
|
||||||
*
|
|
||||||
* read a cscope prompt (basically, skip over the ">> ")
|
|
||||||
*/
|
|
||||||
static int cs_read_prompt(size_t i)
|
static int cs_read_prompt(size_t i)
|
||||||
{
|
{
|
||||||
int ch;
|
int ch;
|
||||||
@ -1847,12 +1743,8 @@ static void sig_handler(int s) {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/// Does the actual free'ing for the cs ptr with an optional flag of whether
|
||||||
* PRIVATE: cs_release_csp
|
/// or not to free the filename. Called by cs_kill and cs_reset.
|
||||||
*
|
|
||||||
* Does the actual free'ing for the cs ptr with an optional flag of whether
|
|
||||||
* or not to free the filename. Called by cs_kill and cs_reset.
|
|
||||||
*/
|
|
||||||
static void cs_release_csp(size_t i, int freefnpp)
|
static void cs_release_csp(size_t i, int freefnpp)
|
||||||
{
|
{
|
||||||
// Trying to exit normally (not sure whether it is fit to Unix cscope)
|
// Trying to exit normally (not sure whether it is fit to Unix cscope)
|
||||||
@ -1964,11 +1856,7 @@ static void cs_release_csp(size_t i, int freefnpp)
|
|||||||
} /* cs_release_csp */
|
} /* cs_release_csp */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Calls cs_kill on all cscope connections then reinits.
|
||||||
* PRIVATE: cs_reset
|
|
||||||
*
|
|
||||||
* calls cs_kill on all cscope connections then reinits
|
|
||||||
*/
|
|
||||||
static int cs_reset(exarg_T *eap)
|
static int cs_reset(exarg_T *eap)
|
||||||
{
|
{
|
||||||
char **dblist = NULL, **pplist = NULL, **fllist = NULL;
|
char **dblist = NULL, **pplist = NULL, **fllist = NULL;
|
||||||
@ -2018,17 +1906,13 @@ static int cs_reset(exarg_T *eap)
|
|||||||
} /* cs_reset */
|
} /* cs_reset */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Construct the full pathname to a file found in the cscope database.
|
||||||
* PRIVATE: cs_resolve_file
|
/// (Prepends ppath, if there is one and if it's not already prepended,
|
||||||
*
|
/// otherwise just uses the name found.)
|
||||||
* Construct the full pathname to a file found in the cscope database.
|
///
|
||||||
* (Prepends ppath, if there is one and if it's not already prepended,
|
/// We need to prepend the prefix because on some cscope's (e.g., the one that
|
||||||
* otherwise just uses the name found.)
|
/// ships with Solaris 2.6), the output never has the prefix prepended.
|
||||||
*
|
/// Contrast this with my development system (Digital Unix), which does.
|
||||||
* We need to prepend the prefix because on some cscope's (e.g., the one that
|
|
||||||
* ships with Solaris 2.6), the output never has the prefix prepended.
|
|
||||||
* Contrast this with my development system (Digital Unix), which does.
|
|
||||||
*/
|
|
||||||
static char *cs_resolve_file(size_t i, char *name)
|
static char *cs_resolve_file(size_t i, char *name)
|
||||||
{
|
{
|
||||||
char *fullname;
|
char *fullname;
|
||||||
@ -2074,11 +1958,7 @@ static char *cs_resolve_file(size_t i, char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Show all cscope connections.
|
||||||
* PRIVATE: cs_show
|
|
||||||
*
|
|
||||||
* show all cscope connections
|
|
||||||
*/
|
|
||||||
static int cs_show(exarg_T *eap)
|
static int cs_show(exarg_T *eap)
|
||||||
{
|
{
|
||||||
if (cs_cnt_connections() == 0)
|
if (cs_cnt_connections() == 0)
|
||||||
@ -2106,11 +1986,7 @@ static int cs_show(exarg_T *eap)
|
|||||||
} /* cs_show */
|
} /* cs_show */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/// Only called when VIM exits to quit any cscope sessions.
|
||||||
* PUBLIC: cs_end
|
|
||||||
*
|
|
||||||
* Only called when VIM exits to quit any cscope sessions.
|
|
||||||
*/
|
|
||||||
void cs_end(void)
|
void cs_end(void)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < csinfo_size; i++)
|
for (size_t i = 0; i < csinfo_size; i++)
|
||||||
|
@ -98,10 +98,8 @@ typedef struct {
|
|||||||
bool input_isatty; // stdin is a terminal
|
bool input_isatty; // stdin is a terminal
|
||||||
bool output_isatty; // stdout is a terminal
|
bool output_isatty; // stdout is a terminal
|
||||||
bool err_isatty; // stderr is a terminal
|
bool err_isatty; // stderr is a terminal
|
||||||
bool headless; // Dont try to start an user interface
|
bool headless; // Do not start the builtin UI.
|
||||||
// or read/write to stdio(unless
|
int no_swap_file; // "-n" argument used
|
||||||
// embedding)
|
|
||||||
int no_swap_file; /* "-n" argument used */
|
|
||||||
int use_debug_break_level;
|
int use_debug_break_level;
|
||||||
int window_count; /* number of windows to use */
|
int window_count; /* number of windows to use */
|
||||||
int window_layout; /* 0, WIN_HOR, WIN_VER or WIN_TABS */
|
int window_layout; /* 0, WIN_HOR, WIN_VER or WIN_TABS */
|
||||||
@ -932,10 +930,11 @@ static void command_line_scan(mparm_T *parmp)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
if (exmode_active) /* "-s" silent (batch) mode */
|
if (exmode_active) { // "-es" silent (batch) mode
|
||||||
silent_mode = TRUE;
|
silent_mode = true;
|
||||||
else /* "-s {scriptin}" read from script file */
|
} else { // "-s {scriptin}" read from script file
|
||||||
want_argument = TRUE;
|
want_argument = true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 't': /* "-t {tag}" or "-t{tag}" jump to tag */
|
case 't': /* "-t {tag}" or "-t{tag}" jump to tag */
|
||||||
|
@ -2743,9 +2743,11 @@ do_dialog (
|
|||||||
int c;
|
int c;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Don't output anything in silent mode ("ex -s") */
|
if (silent_mode // No dialogs in silent mode ("ex -s")
|
||||||
if (silent_mode)
|
|| !ui_active() // Without a UI Nvim waits for input forever.
|
||||||
return dfltbutton; /* return default option */
|
) {
|
||||||
|
return dfltbutton; // return default option
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
oldState = State;
|
oldState = State;
|
||||||
|
@ -2203,7 +2203,7 @@ change_warning (
|
|||||||
set_vim_var_string(VV_WARNINGMSG, _(w_readonly), -1);
|
set_vim_var_string(VV_WARNINGMSG, _(w_readonly), -1);
|
||||||
msg_clr_eos();
|
msg_clr_eos();
|
||||||
(void)msg_end();
|
(void)msg_end();
|
||||||
if (msg_silent == 0 && !silent_mode) {
|
if (msg_silent == 0 && !silent_mode && ui_active()) {
|
||||||
ui_flush();
|
ui_flush();
|
||||||
os_delay(1000L, true); /* give the user time to think about it */
|
os_delay(1000L, true); /* give the user time to think about it */
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,13 @@
|
|||||||
|
|
||||||
#define USE_CRNL
|
#define USE_CRNL
|
||||||
|
|
||||||
// We have our own RGB macro in macros.h.
|
// Windows defines a RGB macro that produces 0x00bbggrr color values for use
|
||||||
#undef RGB
|
// with GDI. Our macro is different, and we don't use GDI.
|
||||||
|
#if defined(RGB)
|
||||||
|
# undef RGB
|
||||||
|
// Duplicated from macros.h to avoid include-order sensitivity.
|
||||||
|
# define RGB(r, g, b) ((r << 16) | (g << 8) | b)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# ifndef inline
|
# ifndef inline
|
||||||
|
@ -86,6 +86,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "nvim/log.h"
|
||||||
#include "nvim/vim.h"
|
#include "nvim/vim.h"
|
||||||
#include "nvim/ascii.h"
|
#include "nvim/ascii.h"
|
||||||
#include "nvim/arabic.h"
|
#include "nvim/arabic.h"
|
||||||
@ -4874,11 +4875,14 @@ void win_redr_status(win_T *wp)
|
|||||||
int this_ru_col;
|
int this_ru_col;
|
||||||
static int busy = FALSE;
|
static int busy = FALSE;
|
||||||
|
|
||||||
/* It's possible to get here recursively when 'statusline' (indirectly)
|
// May get here recursively when 'statusline' (indirectly)
|
||||||
* invokes ":redrawstatus". Simply ignore the call then. */
|
// invokes ":redrawstatus". Simply ignore the call then.
|
||||||
if (busy)
|
if (busy
|
||||||
|
// Also ignore if wildmenu is showing.
|
||||||
|
|| (wild_menu_showing != 0 && !ui_is_external(kUIWildmenu))) {
|
||||||
return;
|
return;
|
||||||
busy = TRUE;
|
}
|
||||||
|
busy = true;
|
||||||
|
|
||||||
wp->w_redr_status = FALSE;
|
wp->w_redr_status = FALSE;
|
||||||
if (wp->w_status_height == 0) {
|
if (wp->w_status_height == 0) {
|
||||||
@ -6441,13 +6445,11 @@ void setcursor(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Insert 'line_count' lines at 'row' in window 'wp'.
|
||||||
* insert 'line_count' lines at 'row' in window 'wp'
|
/// If 'invalid' is TRUE the wp->w_lines[].wl_lnum is invalidated.
|
||||||
* if 'invalid' is TRUE the wp->w_lines[].wl_lnum is invalidated.
|
/// If 'mayclear' is TRUE the screen will be cleared if it is faster than
|
||||||
* if 'mayclear' is TRUE the screen will be cleared if it is faster than
|
/// scrolling.
|
||||||
* scrolling.
|
/// Returns FAIL if the lines are not inserted, OK for success.
|
||||||
* Returns FAIL if the lines are not inserted, OK for success.
|
|
||||||
*/
|
|
||||||
int win_ins_lines(win_T *wp, int row, int line_count, int invalid, int mayclear)
|
int win_ins_lines(win_T *wp, int row, int line_count, int invalid, int mayclear)
|
||||||
{
|
{
|
||||||
int did_delete;
|
int did_delete;
|
||||||
@ -6510,13 +6512,11 @@ int win_ins_lines(win_T *wp, int row, int line_count, int invalid, int mayclear)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Delete "line_count" window lines at "row" in window "wp".
|
||||||
* delete "line_count" window lines at "row" in window "wp"
|
/// If "invalid" is TRUE curwin->w_lines[] is invalidated.
|
||||||
* If "invalid" is TRUE curwin->w_lines[] is invalidated.
|
/// If "mayclear" is TRUE the screen will be cleared if it is faster than
|
||||||
* If "mayclear" is TRUE the screen will be cleared if it is faster than
|
/// scrolling
|
||||||
* scrolling
|
/// Return OK for success, FAIL if the lines are not deleted.
|
||||||
* Return OK for success, FAIL if the lines are not deleted.
|
|
||||||
*/
|
|
||||||
int win_del_lines(win_T *wp, int row, int line_count, int invalid, int mayclear)
|
int win_del_lines(win_T *wp, int row, int line_count, int invalid, int mayclear)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "nvim/lib/kvec.h"
|
#include "nvim/lib/kvec.h"
|
||||||
|
|
||||||
#include "nvim/ascii.h"
|
#include "nvim/ascii.h"
|
||||||
|
#include "nvim/log.h"
|
||||||
#include "nvim/state.h"
|
#include "nvim/state.h"
|
||||||
#include "nvim/vim.h"
|
#include "nvim/vim.h"
|
||||||
#include "nvim/main.h"
|
#include "nvim/main.h"
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
|
|
||||||
#include <vterm.h>
|
#include <vterm.h>
|
||||||
|
|
||||||
|
#include "nvim/log.h"
|
||||||
#include "nvim/vim.h"
|
#include "nvim/vim.h"
|
||||||
#include "nvim/terminal.h"
|
#include "nvim/terminal.h"
|
||||||
#include "nvim/message.h"
|
#include "nvim/message.h"
|
||||||
@ -1010,7 +1011,10 @@ static void refresh_terminal(Terminal *term)
|
|||||||
// Calls refresh_terminal() on all invalidated_terminals.
|
// Calls refresh_terminal() on all invalidated_terminals.
|
||||||
static void refresh_timer_cb(TimeWatcher *watcher, void *data)
|
static void refresh_timer_cb(TimeWatcher *watcher, void *data)
|
||||||
{
|
{
|
||||||
if (exiting) { // Cannot redraw (requires event loop) during teardown/exit.
|
if (exiting // Cannot redraw (requires event loop) during teardown/exit.
|
||||||
|
// WM_LIST (^D) is not redrawn, unlike the normal wildmenu. So we must
|
||||||
|
// skip redraws to keep it visible.
|
||||||
|
|| wild_menu_showing == WM_LIST) {
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
Terminal *term;
|
Terminal *term;
|
||||||
|
@ -232,3 +232,10 @@ func Test_paste_in_cmdline()
|
|||||||
call assert_equal('"aaa a;b-c*d bbb', @:)
|
call assert_equal('"aaa a;b-c*d bbb', @:)
|
||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_illegal_address()
|
||||||
|
new
|
||||||
|
2;'(
|
||||||
|
2;')
|
||||||
|
quit
|
||||||
|
endfunc
|
||||||
|
@ -77,6 +77,229 @@ static char *features[] = {
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const int included_patches[] = {
|
static const int included_patches[] = {
|
||||||
|
// 875,
|
||||||
|
// 874,
|
||||||
|
// 873,
|
||||||
|
// 872,
|
||||||
|
// 871,
|
||||||
|
// 870,
|
||||||
|
// 869,
|
||||||
|
// 868,
|
||||||
|
// 867,
|
||||||
|
// 866,
|
||||||
|
// 865,
|
||||||
|
// 864,
|
||||||
|
// 863,
|
||||||
|
// 862,
|
||||||
|
// 861,
|
||||||
|
// 860,
|
||||||
|
// 859,
|
||||||
|
// 858,
|
||||||
|
// 857,
|
||||||
|
// 856,
|
||||||
|
// 855,
|
||||||
|
// 854,
|
||||||
|
// 853,
|
||||||
|
// 852,
|
||||||
|
// 851,
|
||||||
|
// 850,
|
||||||
|
// 849,
|
||||||
|
// 848,
|
||||||
|
// 847,
|
||||||
|
// 846,
|
||||||
|
// 845,
|
||||||
|
// 844,
|
||||||
|
// 843,
|
||||||
|
// 842,
|
||||||
|
// 841,
|
||||||
|
// 840,
|
||||||
|
// 839,
|
||||||
|
// 838,
|
||||||
|
// 837,
|
||||||
|
// 836,
|
||||||
|
// 835,
|
||||||
|
// 834,
|
||||||
|
// 833,
|
||||||
|
// 832,
|
||||||
|
// 831,
|
||||||
|
// 830,
|
||||||
|
// 829,
|
||||||
|
// 828,
|
||||||
|
// 827,
|
||||||
|
// 826,
|
||||||
|
// 825,
|
||||||
|
// 824,
|
||||||
|
// 823,
|
||||||
|
// 822,
|
||||||
|
// 821,
|
||||||
|
// 820,
|
||||||
|
// 819,
|
||||||
|
// 818,
|
||||||
|
// 817,
|
||||||
|
// 816,
|
||||||
|
// 815,
|
||||||
|
// 814,
|
||||||
|
// 813,
|
||||||
|
// 812,
|
||||||
|
// 811,
|
||||||
|
// 810,
|
||||||
|
// 809,
|
||||||
|
// 808,
|
||||||
|
// 807,
|
||||||
|
// 806,
|
||||||
|
// 805,
|
||||||
|
// 804,
|
||||||
|
// 803,
|
||||||
|
// 802,
|
||||||
|
// 801,
|
||||||
|
// 800,
|
||||||
|
// 799,
|
||||||
|
// 798,
|
||||||
|
// 797,
|
||||||
|
// 796,
|
||||||
|
// 795,
|
||||||
|
// 794,
|
||||||
|
// 793,
|
||||||
|
// 792,
|
||||||
|
// 791,
|
||||||
|
// 790,
|
||||||
|
// 789,
|
||||||
|
// 788,
|
||||||
|
// 787,
|
||||||
|
// 786,
|
||||||
|
// 785,
|
||||||
|
// 784,
|
||||||
|
// 783,
|
||||||
|
// 782,
|
||||||
|
// 781,
|
||||||
|
// 780,
|
||||||
|
// 779,
|
||||||
|
// 778,
|
||||||
|
// 777,
|
||||||
|
// 776,
|
||||||
|
// 775,
|
||||||
|
// 774,
|
||||||
|
// 773,
|
||||||
|
// 772,
|
||||||
|
// 771,
|
||||||
|
// 770,
|
||||||
|
// 769,
|
||||||
|
// 768,
|
||||||
|
// 767,
|
||||||
|
// 766,
|
||||||
|
// 765,
|
||||||
|
// 764,
|
||||||
|
// 763,
|
||||||
|
// 762,
|
||||||
|
// 761,
|
||||||
|
// 760,
|
||||||
|
// 759,
|
||||||
|
// 758,
|
||||||
|
// 757,
|
||||||
|
// 756,
|
||||||
|
// 755,
|
||||||
|
// 754,
|
||||||
|
// 753,
|
||||||
|
// 752,
|
||||||
|
// 751,
|
||||||
|
// 750,
|
||||||
|
// 749,
|
||||||
|
// 748,
|
||||||
|
// 747,
|
||||||
|
// 746,
|
||||||
|
// 745,
|
||||||
|
// 744,
|
||||||
|
// 743,
|
||||||
|
// 742,
|
||||||
|
// 741,
|
||||||
|
// 740,
|
||||||
|
// 739,
|
||||||
|
// 738,
|
||||||
|
// 737,
|
||||||
|
// 736,
|
||||||
|
// 735,
|
||||||
|
// 734,
|
||||||
|
// 733,
|
||||||
|
// 732,
|
||||||
|
// 731,
|
||||||
|
// 730,
|
||||||
|
// 729,
|
||||||
|
// 728,
|
||||||
|
// 727,
|
||||||
|
// 726,
|
||||||
|
// 725,
|
||||||
|
// 724,
|
||||||
|
// 723,
|
||||||
|
// 722,
|
||||||
|
// 721,
|
||||||
|
// 720,
|
||||||
|
// 719,
|
||||||
|
// 718,
|
||||||
|
// 717,
|
||||||
|
// 716,
|
||||||
|
// 715,
|
||||||
|
// 714,
|
||||||
|
// 713,
|
||||||
|
// 712,
|
||||||
|
// 711,
|
||||||
|
710,
|
||||||
|
// 709,
|
||||||
|
// 708,
|
||||||
|
// 707,
|
||||||
|
// 706,
|
||||||
|
// 705,
|
||||||
|
// 704,
|
||||||
|
// 703,
|
||||||
|
// 702,
|
||||||
|
// 701,
|
||||||
|
// 700,
|
||||||
|
// 699,
|
||||||
|
// 698,
|
||||||
|
// 697,
|
||||||
|
// 696,
|
||||||
|
// 695,
|
||||||
|
// 694,
|
||||||
|
// 693,
|
||||||
|
// 692,
|
||||||
|
// 691,
|
||||||
|
// 690,
|
||||||
|
// 689,
|
||||||
|
// 688,
|
||||||
|
// 687,
|
||||||
|
// 686,
|
||||||
|
// 685,
|
||||||
|
// 684,
|
||||||
|
// 683,
|
||||||
|
// 682,
|
||||||
|
// 681,
|
||||||
|
// 680,
|
||||||
|
// 679,
|
||||||
|
// 678,
|
||||||
|
// 677,
|
||||||
|
// 676,
|
||||||
|
// 675,
|
||||||
|
// 674,
|
||||||
|
// 673,
|
||||||
|
// 672,
|
||||||
|
// 671,
|
||||||
|
// 670,
|
||||||
|
// 669,
|
||||||
|
// 668,
|
||||||
|
// 667,
|
||||||
|
// 666,
|
||||||
|
// 665,
|
||||||
|
// 664,
|
||||||
|
// 663,
|
||||||
|
// 662,
|
||||||
|
// 661,
|
||||||
|
// 660,
|
||||||
|
// 659,
|
||||||
|
// 658,
|
||||||
|
// 657,
|
||||||
|
// 656,
|
||||||
|
// 655,
|
||||||
|
// 654,
|
||||||
|
// 653,
|
||||||
652,
|
652,
|
||||||
// 651,
|
// 651,
|
||||||
// 650,
|
// 650,
|
||||||
@ -583,7 +806,7 @@ static const int included_patches[] = {
|
|||||||
// 149,
|
// 149,
|
||||||
// 148,
|
// 148,
|
||||||
// 147,
|
// 147,
|
||||||
// 146,
|
146,
|
||||||
// 145 NA
|
// 145 NA
|
||||||
// 144 NA
|
// 144 NA
|
||||||
// 143,
|
// 143,
|
||||||
@ -595,8 +818,8 @@ static const int included_patches[] = {
|
|||||||
// 137,
|
// 137,
|
||||||
136,
|
136,
|
||||||
135,
|
135,
|
||||||
// 134,
|
134,
|
||||||
// 133,
|
133,
|
||||||
// 132,
|
// 132,
|
||||||
// 131,
|
// 131,
|
||||||
// 130 NA
|
// 130 NA
|
||||||
@ -648,7 +871,7 @@ static const int included_patches[] = {
|
|||||||
84,
|
84,
|
||||||
83,
|
83,
|
||||||
// 82 NA
|
// 82 NA
|
||||||
// 81,
|
81,
|
||||||
// 80 NA
|
// 80 NA
|
||||||
79,
|
79,
|
||||||
78,
|
78,
|
||||||
|
@ -9,6 +9,7 @@ local command = helpers.command
|
|||||||
local wait = helpers.wait
|
local wait = helpers.wait
|
||||||
local iswin = helpers.iswin
|
local iswin = helpers.iswin
|
||||||
local get_pathsep = helpers.get_pathsep
|
local get_pathsep = helpers.get_pathsep
|
||||||
|
local nvim_set = helpers.nvim_set
|
||||||
local Screen = require('test.functional.ui.screen')
|
local Screen = require('test.functional.ui.screen')
|
||||||
|
|
||||||
describe('jobs', function()
|
describe('jobs', function()
|
||||||
@ -669,9 +670,10 @@ describe("pty process teardown", function()
|
|||||||
if helpers.pending_win32(pending) then return end
|
if helpers.pending_win32(pending) then return end
|
||||||
-- Use a nested nvim (in :term) to test without --headless.
|
-- Use a nested nvim (in :term) to test without --headless.
|
||||||
feed_command(":terminal '"..helpers.nvim_prog
|
feed_command(":terminal '"..helpers.nvim_prog
|
||||||
|
.."' -u NONE -i NONE --cmd '"..nvim_set.."' "
|
||||||
-- Use :term again in the _nested_ nvim to get a PTY process.
|
-- Use :term again in the _nested_ nvim to get a PTY process.
|
||||||
-- Use `sleep` to simulate a long-running child of the PTY.
|
-- Use `sleep` to simulate a long-running child of the PTY.
|
||||||
.."' +terminal +'!(sleep 300 &)' +qa")
|
.."+terminal +'!(sleep 300 &)' +qa")
|
||||||
|
|
||||||
-- Exiting should terminate all descendants (PTY, its children, ...).
|
-- Exiting should terminate all descendants (PTY, its children, ...).
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
@ -367,7 +367,7 @@ end
|
|||||||
local function set_shell_powershell()
|
local function set_shell_powershell()
|
||||||
source([[
|
source([[
|
||||||
set shell=powershell shellquote=\" shellpipe=\| shellredir=>
|
set shell=powershell shellquote=\" shellpipe=\| shellredir=>
|
||||||
set shellcmdflag=\ -NoProfile\ -ExecutionPolicy\ RemoteSigned\ -Command
|
set shellcmdflag=\ -NoLogo\ -NoProfile\ -ExecutionPolicy\ RemoteSigned\ -Command
|
||||||
let &shellxquote=' '
|
let &shellxquote=' '
|
||||||
]])
|
]])
|
||||||
end
|
end
|
||||||
|
@ -1,57 +1,151 @@
|
|||||||
local helpers = require('test.functional.helpers')(after_each)
|
local helpers = require('test.functional.helpers')(after_each)
|
||||||
local Screen = require('test.functional.ui.screen')
|
local Screen = require('test.functional.ui.screen')
|
||||||
local clear, feed, command = helpers.clear, helpers.feed, helpers.command
|
local clear, feed, command = helpers.clear, helpers.feed, helpers.command
|
||||||
|
local iswin = helpers.iswin
|
||||||
local funcs = helpers.funcs
|
local funcs = helpers.funcs
|
||||||
|
local eq = helpers.eq
|
||||||
|
local eval = helpers.eval
|
||||||
|
local retry = helpers.retry
|
||||||
|
|
||||||
if helpers.pending_win32(pending) then return end
|
describe("'wildmenu'", function()
|
||||||
|
|
||||||
describe("'wildmode'", function()
|
|
||||||
local screen
|
local screen
|
||||||
|
|
||||||
before_each(function()
|
before_each(function()
|
||||||
clear()
|
clear()
|
||||||
screen = Screen.new(25, 5)
|
screen = Screen.new(25, 5)
|
||||||
screen:attach()
|
screen:attach()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
after_each(function()
|
after_each(function()
|
||||||
screen:detach()
|
screen:detach()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe("'wildmenu'", function()
|
it(':sign <tab> shows wildmenu completions', function()
|
||||||
it(':sign <tab> shows wildmenu completions', function()
|
command('set wildmode=full')
|
||||||
command('set wildmode=full')
|
command('set wildmenu')
|
||||||
command('set wildmenu')
|
feed(':sign <tab>')
|
||||||
feed(':sign <tab>')
|
screen:expect([[
|
||||||
screen:expect([[
|
|
|
||||||
|
|
~ |
|
||||||
~ |
|
~ |
|
||||||
~ |
|
define jump list > |
|
||||||
define jump list > |
|
:sign define^ |
|
||||||
:sign define^ |
|
]])
|
||||||
]])
|
end)
|
||||||
|
|
||||||
|
it('does not crash after cycling back to original text', function()
|
||||||
|
command('set wildmode=full')
|
||||||
|
feed(':j<Tab><Tab><Tab>')
|
||||||
|
screen:expect([[
|
||||||
|
|
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
join jumps |
|
||||||
|
:j^ |
|
||||||
|
]])
|
||||||
|
-- This would cause nvim to crash before #6650
|
||||||
|
feed('<BS><Tab>')
|
||||||
|
screen:expect([[
|
||||||
|
|
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
! # & < = > @ > |
|
||||||
|
:!^ |
|
||||||
|
]])
|
||||||
|
end)
|
||||||
|
|
||||||
|
it('is preserved during :terminal activity', function()
|
||||||
|
-- Because this test verifies a _lack_ of activity after screen:sleep(), we
|
||||||
|
-- must wait the full timeout. So make it reasonable.
|
||||||
|
screen.timeout = 1000
|
||||||
|
|
||||||
|
command('set wildmenu wildmode=full')
|
||||||
|
command('set scrollback=4')
|
||||||
|
if iswin() then
|
||||||
|
if helpers.pending_win32(pending) then return end
|
||||||
|
-- feed([[:terminal 1,2,3,4,5 | foreach-object -process {echo $_; sleep 0.1}]])
|
||||||
|
else
|
||||||
|
feed([[:terminal for i in $(seq 1 5000); do printf 'foo\nfoo\nfoo\n'; sleep 0.1; done<cr>]])
|
||||||
|
end
|
||||||
|
|
||||||
|
feed([[<C-\><C-N>gg]])
|
||||||
|
feed([[:sign <Tab>]]) -- Invoke wildmenu.
|
||||||
|
screen:sleep(50) -- Allow some terminal output.
|
||||||
|
screen:expect([[
|
||||||
|
foo |
|
||||||
|
foo |
|
||||||
|
foo |
|
||||||
|
define jump list > |
|
||||||
|
:sign define^ |
|
||||||
|
]])
|
||||||
|
|
||||||
|
-- cmdline CTRL-D display should also be preserved.
|
||||||
|
feed([[<C-\><C-N>]])
|
||||||
|
feed([[:sign <C-D>]]) -- Invoke cmdline CTRL-D.
|
||||||
|
screen:sleep(50) -- Allow some terminal output.
|
||||||
|
screen:expect([[
|
||||||
|
:sign |
|
||||||
|
define place |
|
||||||
|
jump undefine |
|
||||||
|
list unplace |
|
||||||
|
:sign ^ |
|
||||||
|
]])
|
||||||
|
|
||||||
|
-- Exiting cmdline should show the buffer.
|
||||||
|
feed([[<C-\><C-N>]])
|
||||||
|
screen:expect([[
|
||||||
|
^foo |
|
||||||
|
foo |
|
||||||
|
foo |
|
||||||
|
foo |
|
||||||
|
|
|
||||||
|
]])
|
||||||
|
end)
|
||||||
|
|
||||||
|
it('ignores :redrawstatus called from a timer #7108', function()
|
||||||
|
-- Because this test verifies a _lack_ of activity after screen:sleep(), we
|
||||||
|
-- must wait the full timeout. So make it reasonable.
|
||||||
|
screen.timeout = 1000
|
||||||
|
|
||||||
|
command('set wildmenu wildmode=full')
|
||||||
|
command([[call timer_start(10, {->execute('redrawstatus')}, {'repeat':-1})]])
|
||||||
|
feed([[<C-\><C-N>]])
|
||||||
|
feed([[:sign <Tab>]]) -- Invoke wildmenu.
|
||||||
|
screen:sleep(30) -- Allow some timer activity.
|
||||||
|
screen:expect([[
|
||||||
|
|
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
define jump list > |
|
||||||
|
:sign define^ |
|
||||||
|
]])
|
||||||
|
end)
|
||||||
|
|
||||||
|
it('with laststatus=0, :vsplit, :term #2255', function()
|
||||||
|
-- Because this test verifies a _lack_ of activity after screen:sleep(), we
|
||||||
|
-- must wait the full timeout. So make it reasonable.
|
||||||
|
screen.timeout = 1000
|
||||||
|
|
||||||
|
if not iswin() then
|
||||||
|
command('set shell=sh') -- Need a predictable "$" prompt.
|
||||||
|
end
|
||||||
|
command('set laststatus=0')
|
||||||
|
command('vsplit')
|
||||||
|
command('term')
|
||||||
|
|
||||||
|
-- Check for a shell prompt to verify that the terminal loaded.
|
||||||
|
retry(nil, nil, function()
|
||||||
|
if iswin() then
|
||||||
|
eq('Microsoft', eval("matchstr(join(getline(1, '$')), 'Microsoft')"))
|
||||||
|
else
|
||||||
|
eq('$', eval([[matchstr(getline(1), '\$')]]))
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('does not crash after cycling back to original text', function()
|
feed([[<C-\><C-N>]])
|
||||||
command('set wildmode=full')
|
feed([[:<Tab>]]) -- Invoke wildmenu.
|
||||||
feed(':j<Tab><Tab><Tab>')
|
screen:sleep(10) -- Flush
|
||||||
screen:expect([[
|
-- Check only the last 2 lines, because the shell output is
|
||||||
|
|
-- system-dependent.
|
||||||
~ |
|
screen:expect('! # & < = > @ > \n:!^', nil, nil, nil, true)
|
||||||
~ |
|
|
||||||
join jumps |
|
|
||||||
:j^ |
|
|
||||||
]])
|
|
||||||
-- This would cause nvim to crash before #6650
|
|
||||||
feed('<BS><Tab>')
|
|
||||||
screen:expect([[
|
|
||||||
|
|
|
||||||
~ |
|
|
||||||
~ |
|
|
||||||
! # & < = > @ > |
|
|
||||||
:!^ |
|
|
||||||
]])
|
|
||||||
end)
|
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user