Runtime updates that were bundled into the otherwise NA commit:
Problem: "make proto" adds extra function prototype.
Solution: Add vim/vim#ifdef.
5162822914
`:syntax keyword` is affected by 'iskeyword'. When we aligned
'iskeyword' to that of filetype=help, colon (:) is now included.
Simplest way to deal with this is to include colon (:) in the `:syntax
keyword` directive.
Also:
- change "SUGGESTIONS" mouthful to "ADVICE"
- change "SUCCESS" to "OK"
Always check for the presence of pyenv_root if pyenv is installed: if it
is not set, we don't know if it was intentional. If it wasn't
intentional, the warning is confusing (see #7176).
closes#7176
If an autoloaded function hasn't been resolved before it is used in
function(), the self dict will not be created which causes E725 when
calling the function. Since self isn't being used in
provider#stderr_collector, we can remove the dict attribute to
workaround the self dict bug[0].
Closes#7115
[0]: https://groups.google.com/d/msg/vim_dev/I7AXOyv-P4o/DzbyOxDHBgAJ
iTerm2 got its own entry in Thomas Dickey's terminfo.src on 2017-08-16.
Make sure that the new entry is handled in the same way as the old entry.
closes#7209closes#7214
- Show hint only once per session.
- provider#clipboard#Call(): prevent recursion
- provider#clear_stderr(): use has_key(), because :silent! is still
captured by :redir.
closes#7184
redir_write():
- This is a "batch" operation which was not yet covered by
start_batch_changes()
adjust_clipboard_name():
- msg() and friends during :redir will, of course, cause redir_write()
to try to capture that message, which causes recursion.
- EMSG() here is trouble: if it interrupts :redir it is a mess.
Rather than deal with the mess, show a non-error message.
closes#7182closes#7184closes#7183
ref #6048
ref #7032
- Prefer "TUI" where possible to refer to the host terminal.
- Remove obsolete tags and ancient TTY exposition.
- Establish "terminal" to consistently mean "terminal emulator" in all
Nvim documentation. This removes the need for verbose qualifiers in
tags and prose.
References #6280
References #6803
With `xdg-*` utilities CMAKE_INSTALL_PREFIX is incorrectly ignored.
Taken from [nvim-qt][1]. For some reason it only checks for !APPLE.
[1]: b26596d164/src/gui/CMakeLists.txt (L48-L55)
Problem: Cannot get the number of the current quickfix or location list.
Solution: Use the current list if "nr" in "what" is zero. (Yegappan
Lakshmanan) Remove debug command from test.
890680ca63
Several people have suggested that the "by Bram" byline is misleading,
it implies that Bram is actively involved with the project. Up to now we
left it as an homage.
Bram agreed that it is misleading, and suggested a mention somewhere
other than the intro.
The libvte test was too agressive, and is reduced to only triggering
when it is libvte 0.36 AND a gnome or xterm terminal type is used.
Contrastingly, tmux was not on the list at all and now is.
Update a flawed match pattern for the vimCommand syntax group. To see
the effect of this fix, open a vimscript buffer,
nvim -u NONE foo.vim
configure a couple highlight groups,
:hi! vimIsCommand ctermfg=Green
:hi! vimCommand ctermfg=Red
:syntax enable
and add the following lines to the buffer:
let foo=xFoo
let bar=zBar
You'll notice the "z" in zBar is Red, while xFoo and the rest of Bar are green. This will
be the case as long as the word following `=` starts with the letter "z". This has already
been fixed upstream by adding a "\>" word boundary to the match pattern:
https://github.com/vim/vim/issues/124e271909625 (diff-86da060e2153c8ce5dc317a7b4b5a29dR27)
This particular match pattern was also mentioned in issue #5491, but in reference to a bug
that was related to the generated part of syntax/vim.vim, whereas this bug lives in the
non-generated part of the file.
This allows users who have per-project Ruby versions (e.g. with `rvm`)
to pin to a particular gem installation.
For example: `let g:ruby_host_prog = 'rvm system do neovim-ruby-host'`
Sometimes the `gem list` command used for finding the latest version of
the `neovim` gem prints an error, which can throw off the `split()` call
due to extra parenthesis. This locks down the split pattern to make
conflicts less likely.
This is a new convention pioneered by tmux. It does not do much for
nvim; since nvim always looks to see whether it should be making up
"setrgbf" and "setrgbb" capabilities. But it is a way for terminfo to
force this, irrespective of the hardwired list in the code, for more
terminal types. On the gripping hand, updating terminfo descriptions to
actually have "setrgbf" and "setrgbb" capabilities so that nvim never
has to try to invent them in the first place, is as good if not better
an approach for overriding what is baked into the code.
The example used &term which is no longer meaningful.
Fortunately, we can change this into a useful example using $TERM that also
shows how to address a common need with termguicolors at the same time.
The details are in the on-line help under :help true-color .
The brief precis is that nvim is (I hope.) converging with tmux and libvte.
It is taking the same approach with setrgbf and setrgbb terminfo capabilities
that it does with the Ss and Se terminfo capabilities.
The details are in the on-line help under :help cursor-shape .
The brief precis is that nvim is following the lead of tmux, and going
beyond what tmux does to make cursor shape changes work on a broad range of
terminals. This includes on tmux itself, which is no longer bypassed.
This documents 256-colour and true colour handling, cursor shapes,
and scrolling regions.
Almost all of these headings are taken from the Vim doco, so that
the :help commands that people learn are a transferable skill.
Reverts commit 337b6179dfCloses#6716 at the expense of not being able to use a
multi-key 'pastetoggle' manually.
Multi-key 'pastetoggle' can still be used when inserting the entire
option into the typebuffer at once (though the use here is
questionable).
Also remove those tests to do with waiting for the completion of
'pastetoggle' and mention in the documentation that 'pastetoggle'
doesn't wait for timeout.
Showing the 'number' column in terminal buffers is a bit silly because
of 'scrollback'. But it's mostly harmless and technically works as
expected.
The least surprising thing is to leave the user's settings alone. Since
there are tradeoffs in both cases, we choose inertia.
We still disable 'relativenumber' in *terminal-mode* (as opposed to
normal-mode) because it is totally broken: the Nvim cursor (not terminal
cursor) is always on the last line.
Fix the following issues according to rubocop:
runtime/autoload/provider/script_host.rb:2:11: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "neovim/ruby_provider"
^^^^^^^^^^^^^^^^^^^^^^
runtime/autoload/provider/script_host.rb:5:5: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Your neovim RubyGem is missing or out of date. " +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
runtime/autoload/provider/script_host.rb:5:55: C: Use \ instead of + or << to concatenate those strings.
"Your neovim RubyGem is missing or out of date. " +
runtime/autoload/provider/script_host.rb:6:5: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
"Install the latest version using `gem install neovim`."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This commit assumes Ruby 2.0.0+.
Problem: Adding pattern to ":oldfiles" is not a generic solution.
Solution: Add the ":filter /pat/ cmd" command modifier. Only works for some
commands right now.
7b668e83d0
Problem: The netrw plugin does not work.
Solution: Make it accept version 8.0.
9e1e7afc1f
vim-patch:b56e7ff0dbbf
Update translations for intro page.
b56e7ff0db
Asynchronous API functions are served immediately, which means pending
input could change the state of Nvim shortly after an async API function
result is returned.
nvim_get_mode() is different:
- If RPCs are known to be blocked, it responds immediately (without
flushing the input/event queue)
- else it is handled just-in-time before waiting for input, after
pending input was processed. This makes the result more reliable
(but not perfect).
Internally this is handled as a special case, but _semantically_ nothing
has changed: API users never know when input flushes, so this internal
special-case doesn't violate that. As far as API users are concerned,
nvim_get_mode() is just another asynchronous API function.
In all cases nvim_get_mode() never blocks for more than the time it
takes to flush the input/event queue (~µs).
Note: This doesn't address #6166; nvim_get_mode() will provoke #6166 if
e.g. `d` is operator-pending.
Closes#6159
ex_loadview() was changed in 9b1c939370 to check the file open result.
If user doesn't care about failure to open, using :silent! instead of
:silent is a reasonable, conventional approach.
Closes#3196
Calling cmd.exe in Windows follows a very different pattern from Vim.
The primary difference is that Vim does a nested call to cmd.exe, e.g.
the following call in Vim
system('echo a 2>&1')
spawns the following processes
"C:\Program Files (x86)\Vim\vim80\vimrun" -s C:\Windows\system32\cmd.exe /c (echo a 2^>^&1
^>C:\Users\dummy\AppData\Local\Temp\VIoC169.tmp 2^>^&1)
C:\Windows\system32\cmd.exe /c C:\Windows\system32\cmd.exe /c (echo a 2^>^&1
^>C:\Users\dummy\AppData\Local\Temp\VIo3C6C.tmp 2^>^&1)
C:\Windows\system32\cmd.exe /c (echo a 2>&1
>C:\Users\dummy\AppData\Local\Temp\VIo3C6C.tmp 2>&1)
The escaping with ^ is needed because cmd.exe calls itself and needs to
preserve the special metacharacters for the last call. However in nvim
no nested call is made, system('') spawns a single cmd.exe process.
Setting shellxescape to "" disables escaping with ^.
The previous default for shellxquote=( wrapped any command in
parenthesis, in Vim this is more meaningful due to the use of tempfiles
to store the output and redirection (also see &shellquote). There is
a slight benefit in having the default be empty because some expressions
that run in console will not run within parens e.g. due to unbalanced
double quotes
system('echo "a b')
Disable CommandLineToArgvW-standard quoting for cmd.exe.
libuv assumes spawned processes follow the convention expected by
CommandLineToArgvW(). But cmd.exe is non-conformant, so for cmd.exe:
- With system([]), the caller has full control (and responsibility) to
quote arguments correctly.
- With system(''), shell* options are used.
libuv quoting is disabled if argv[0] is:
- cmd.exe
- cmd
- $COMSPEC resolving to a path with filename cmd.exe
Closes#6329
References #6387
> The option 'maxmem' ('mm') is used to set the maximum memory used for one
> buffer (in kilobytes). 'maxmemtot' is used to set the maximum memory used for
> all buffers (in kilobytes). The defaults depend on the system used. These
> are not hard limits, but tell Vim when to move text into a swap file. If you
> don't like Vim to swap to a file, set 'maxmem' and 'maxmemtot' to a very large
> value. The swap file will then only be used for recovery. If you don't want
> a swap file at all, set 'updatecount' to 0, or use the "-n" argument when
> starting Vim.
On today's systems these values are huge (4GB in my machine with 8GB of RAM
since it's set as half the available memory by default) so the limits are
never reached in practice, but Vim wastes a lot of time checking if the limit
was reached.
If the limit is reached Vim starts saving pieces of the swap file that were in
memory to the disk. Said in a different way: Vim implements its own memory
swapping mechanism. This is unnecessary and inefficient since the operating
system already virtualized the memory and will swap to the disk if programs
start using too much memory.
This change does...
1. Reduce the number of config options and need for documentation.
2. Make the code more efficient as we don't have to keep track of memory usage
nor check if the memory limits were reached to start swapping to disk every
time we need memory for buffers.
3. Simplify the code. Once `memfile.c` is simple enough it could be replaced by
actual operating system memory mapping (`mmap`, `MemoryViewOfFile`...).
This change does not prevent Vim to recover changes from swap files since the
swapping code is never triggered with the huge limits set by default.
Adds os_strerror() result to a number of places. Also since I could not track
where err\* variables are NULL and where they are not, using macros to make sure
that all three variables are set at once.
Removes #ifdef UNIX around the use of os_fsync, makes it use os_close in place
of close in some places.
For now only supports valid hex colors (does not check for the validity
the hex color) when termguicolors is set, otherwise it won't attempt to
change the cursor color.
Make the 'scrollback' option work like most other buffer-local options:
- `:set scrollback=x` sets the global and local value
- `:setglobal scrollback=x` sets only the global default
- new terminal buffers inherit the global
Normal buffers are still always -1, and :setlocal there is an error.
Closes#6337
The comment is incorrect, s:error does need to be called. I thought the
call was unnecessary because it didn't show any message for me but I had
shortmess+=F which was hiding the message.