Decide whether to highlight the visual-selected character under the
cursor, depending on 'guicursor' style:
- Highlight if cursor is blinking or non-block (vertical, horiz).
- Do NOT highlight if cursor is non-blinking block.
Traditionally Vim's visual selection does "reverse mode", which perhaps
conflicts with the non-blinking block cursor. But 'guicursor' defaults
to a vertical bar for selection=exclusive, and this confuses users who
expect to see the text highlighted.
closes#8983
Problem: It is not so easy to write a script that works with both Python 2 and Python 3, even when the Python code works with both.
Solution: Add 'pyxversion', :pyx, etc. (Marc Weber, Ken Takata)
f42dd3c390
The neovim module is available for backwards compatibility. We should
not yet force the use of the pynvim module, since there's no other major
reason to bump the minimum supported Python client module.
Closes#9426
This avoids generating the tags files all the time, and makes `make
install` with `CMAKE_INSTALL_MESSAGE=LAZY` much more silent in general.
Using `copy_if_different` instead of `remove` + `copy_directory` might
be good on top, but is a) not really necessary anymore and b) would not
sync removed files.
For this `file(COPY` could be used, but would require to re-run cmake on
changed input files then.
The purpose of the {Nvim} hint was not well-defined, and its usage
inconsistent. It's also unnecessary.
Nvim-Vim differences are centralized at:
:help vim-differences
Removed things are centralized at:
:help deprecated
Developer guidelines for documentation are listed at:
:help dev-doc
ref #9280
Introduce the `vim.compat` module, to help environments with system Lua
5.2+ run the build/tests. Include the module implicitly in all tests.
ref #8677
legacy `vim` module:
beep
buffer
command
dict
eval
firstline
lastline
line
list
open
type
window
Problem: Cannot act on edits in the command line.
Solution: Add the CmdlineChanged autocommand event. (xtal8, closesvim/vim#2603,
closesvim/vim#2524)
153b704e20
In Vim (and some vestigial parts of Nvim) E319 was a placeholder for
ex_ni commands, i.e. commands that are only available in certain builds
of Vim. That is obviously counter to Nvim's goals: all Nvim commands
are available on all platforms and build types (the remaining ex_ni
commands are actually just missing providers).
We need an error id for "missing provider", so it makes sense to use
E319 for that purpose.
ref #9344
ref #3577
Problem: Using an external diff program is slow and inflexible.
Solution: Include the xdiff library. (Christian Brabandt)
Use it by default.
e828b7621c
vim-patch:8.1.0360
vim-patch:8.1.0364
vim-patch:8.1.0366
vim-patch:8.1.0370
vim-patch:8.1.0377
vim-patch:8.1.0378
vim-patch:8.1.0381
vim-patch:8.1.0396
vim-patch:8.1.0432
Before this commit, if user does this:
let g:node_host_prog = '~/.nvm/versions/node/v11.3.0/bin/neovim-node-host'
the "~/" is not expanded to user's home directory.
`:help g:ruby_host_prog` suggests a path with "~/" so technically we
already claimed to support this.
closes https://github.com/neovim/node-client/issues/102
PR #9304 added support for functions in clipboard providers. As part of
the PR I meant to move two checks in the provider code out of an if
statement into separate statements and adding additional checks for
g:clipboard attributes - as it turns out the code is wrong and it does
not implement additional checks while it adds two conditions that make
very little sense
type(g:clipboard['copy']) #isnot# v:t_func
what would make sense would be something along the lines of
type(g:clipboard['copy']['+']) #isnot# v:t_func
but might not be what we want either, so I'm reverting this.
Up to now g:clipboard["copy"] only supported string values invoked as
system commands.
This commit enables the use of VimL functions instead. The function
signatures are the same as in provider/clipboard.vim. A clipboard
provider is expected to store and return a list of lines (i.e. the text)
and a register type (as seen in setreg()).
cache_enabled is ignored if "copy" is provided by a VimL function.
The order was swapped in #4150 to prefer `xsel` but there wasn't a clear
explanation. Meanwhile, `xsel` has been neglected upstream.
Let's trying preferring `xclip` again, we've had a few reports of
problems with `xsel`.
closes#7237
ref #5853
ref #7449
Problem: It is not easy to edit a script that was sourced.
Solution: Add a count to ":scriptnames", so that ":script 40" edits the
script with script ID 40.
07dc18ffa4
By historical accident, Nvim defaults to background=light. So on a dark
background, `:colorscheme default` looks completely wrong.
The "smart" logic that Vim uses is confusing for anyone who uses Vim on
multiple platforms, so rather than mimic that, pick the (hopefully) most
common default.
- Since Neovim is dark-powered, we assume most users have dark backgrounds.
- Most of the GUIs tend to have a dark background by default.
ref #6289
- TUI: _never_ rely on BCE for implicit clearing, only explicit commands.
- TUI: use unibi_erase_chars when possible.
- TUI: use end-exclusive ranges for invalid and cleared areas
- screen: scrolling leaves scrolled in aree undefined. This is a
conservative change, a client assuming the old semantics will still
behave correctly.
- screen: factor out vsep handling from line drawing. This is needed
anyway for the multigrid refactor.
- screen: simplifications of win_do_lines
Problem: Cannot see what digraph is used to insert a character.
Solution: Show the digraph with the "ga" command. (Christian Brabandt)
5f73ef8d20close#8190
Update runtime files.
fc65cabb15
---
vim-patch:8.0.1279: initializing menus can be slow
Problem: Initializing menus can be slow, especially when there are many
keymaps, color schemes, etc.
Solution: Do the globbing for runtime files lazlily. (Ken Takata)
Update runtime files.
b5b7562475
---
NA patch (Nvim does not ship with spell files):
vim-patch:3ad8772ef02e
Include Serbian spell input files
3ad8772ef0
Problem: Python2 and python3 detection not tested. (Matej Cepl)
Solution: Add test for detecting python2 and python3. Also detect a script
using "js" as javascript.
4bc0bed536
man#init_pager() guesses the ref by the heading, which is usually
uppercase, so we don't know the correct casing. But lowercase is more
common, so use that for the buffer name instead of uppercase.
ref #9156
Before this commit, man#init_pager() always tries to scrape the manpage
name and set the buffer name. That's much less important than avoiding
duplicate buffers and E95. And it doesn't seem to be necessary, usually.
Steps to reproduce:
$ export MANPAGER="nvim -c 'set ft=man' -"
$ man sleep
:Man sleep
Error detected while processing function man#init_pager:
line 15:
E95: Buffer with this name already exists
:ls!
1 h- "man://SLEEP(1)" line 4
2 %a- "man://sleep(1)" line 1
For each package manager,
1. Check if they are executable before starting a job.
2. Check if the job opts are set before checking the job status
TODO: Validate the job id.
Prioritize npm because it's faster than yarn.
Reindent the code to 2-space indent.
mandoc may not handle quoted MANPAGER arguments correctly. E.g. with
export MANPAGER='nvim -u NORC -c "set ft=man"'
mandoc treats `"set` and `ft=man"'` as separate tokens.
To workaround that, provide :Man! so that MANPAGER can avoid quoting.
closes#9120
Problem: Undo in the options window makes it empty.
Solution: Set 'undolevels' while filling the buffer. (Yasuhiro Matthew,
closesvim/vim#2645)
9c474b2773
- Much of the mouse chatter in gui.txt and term.txt is redundant; other
parts are outdated or irreleveant to Nvim.
- Fix default value of 'mousemodel' for Windows
design-flexible and design-multi-platform sections are "obvious" by now
(and covered in much of our other resources) and I've never seen it
referenced in any discussion.
Problem: Cannot use :unlet for an environment variable.
Solution: Make it work. Use unsetenv() if available.
(Yasuhiro Matsumoto, closesvim/vim#2855)
137374fd65
Resets the TUI cursor color if:
- current 'guicursor' mode does not specify a highlight group
- cursor highlight group has "inverse" or "reverse" flag
- on Nvim exit
We interpret, "inverse" to mean "default cursor".
Example:
hi Cursor guifg=bg guibg=fg
set termguicolors
set guicursor=n-v-c-sm:block,i-ci-ve:ver25-Cursor,r-cr-o:hor20
* When the cursor shape is block, its color will be "inverse"
* When the cursor shape is I-beam, its color will be `hi Cursor`.
This is useful e.g. to prevent `set listchars=eol:¬` causing your cursor
color to a low contrast color in insert mode because you cursor are
often at EOL in insert mode.
close#8572
When nroff justifies a line, it fills the line with whitespace to meet
$MANWIDTH. With $MANWIDTH=9999, that of course results in nonsense (and
behaves poorly with 'cursorline' option).
To work around that, instead of trying to hard-justify the lines, just
replace the mega-whitespace with a fixed size of 10 spaces.
Perhaps N/Vim needs a "soft justify" feature?
Give embeders a chance to set up nvim, by processing a request before
startup. This allows an external UI to show messages and prompts from
--cmd and buffer loading (e.g. swap files)
Problem: It is not easy to see if a colorscheme is well written.
Solution: Add a script that checks for common mistakes. (Christian Brabandt)
200d0e36bc
Problem: Cannot parse text with 'erroformat' without changing a quickfix
list.
Solution: Add the "text" argument to getqflist(). (Yegappan Lakshmanan)
7adf06f4e2
Problem: Quickfix list always added after current one.
Solution: Make it possible to add a quickfix list after the last one.
(Yegappan Lakshmanan)
55b6926450
Problem: MS-Windows users expect -? to work like --help.
Solution: Add -?. (Christian Brabandt, closesvim/vim#2867)
c3e81694fc
Include runtime/ changes from 85eee130f4 to pass 8.1.0231 tests.
This note in runtime/doc/Makefile explains the special-case:
index.html is the starting point for HTML, but for the help files it
is help.txt. Therefore use vimindex.html for index.txt.
fix#8907
Problem: Bogus characters appear when indenting kicks in while doing a
visual-block append.
Solution: Recompute when indenting is done. (Christian Brabandt)
e2e69e4813
Vim supports multiple locations for the user's vimrc, so it will use the
first one that is found, ignoring the rest. Nvim follows the XDG spec,
so there is only one place to look for the user's vimrc, thus making the
statement unnecessary and confusing for nvim users.
Ref #8871
When rbenv is used for managing Ruby installations, just checking for an
executable called "neovim-ruby-host" is not enough. It has to be run as well.
If it does not return 0, then neovim-ruby-host is merely a shim for another Ruby
installation.
$ rbenv versions
2.5.0
* 2.5.1 (set by /Users/mhi/.rbenv/version)
$ rbenv whence neovim-ruby-host
2.5.0
$ which neovim-ruby-host
/Users/mhi/.rbenv/shims/neovim-ruby-host
$ neovim-ruby-host
rbenv: neovim-ruby-host: command not found
The `neovim-ruby-host' command exists in these Ruby versions:
2.5.0
$ echo $?
127
Additionally, the detection logic was moved from provider#ruby#Detect() to
s:detect(), because the former is run in the sandbox which forbids calling
system().
Problem: There is no way to notice that the quickfix window contents has
changed.
Solution: Increment b:changedtick when updating the quickfix window.
(Yegappan Lakshmanan)
a8788f4d0b
Problem: Minor issues related to quickfix.
Solution: Set the proper return status for all cases in setqflist() and at
test cases for this. Move the "adding" flag outside of
FEAT_WINDOWS. Minor update to the setqflist() help text. (Yegappan
Lakshmanan)
86f100dc09
This would need to get `expand`ed to not become empty, and is being
handled by s:check_bin already.
`s:check_bin` will also complain about e.g.
"~/.pyenv/versions/3.6.6/bin/python" not being executable, but that
reflects that the host will fail to start with it.
Fixes#8778
Problem: The script to check translations fails if there is more than one
NL in one line.
Solution: Count the number of NL characters. Make count() accept a string.
9966b21a57
Problem: The :global command does not work recursively, which makes it
difficult to execute a command on a line where one pattern matches
and another does not match. (Miles Cranmer)
Solution: Allow for recursion if it is for only one line. (closesvim/vim#1760)
f84b122a99
* vim-patch:8.0.0474: the client-server feature is not tested
Problem: The client-server feature is not tested.
Solution: Add a test.
15bf76d40b
* vim-patch:8.0.0475: not enough testing for the client-server feature
Problem: Not enough testing for the client-server feature.
Solution: Add more tests. Add the remote_startserver() function. Fix that
a locally evaluated expression uses function-local variables.
7416f3e73a
* vim-patch:8.0.0492: a failing client-server request can make Vim hang
Problem: A failing client-server request can make Vim hang.
Solution: Add a timeout argument to functions that wait.
81b9d0bd5c
Include src/nvim/testdir/test_clientserver.vim changes from
patches 8.0.0477, 8.0.0479.
* vim-patch:8.0.0633: the client-server test is still a bit flaky
Problem: The client-server test is still a bit flaky.
Solution: Wait a bit for the GUI to start. Check that the version number
can be obtained.
60964f6874
Include src/nvim/testdir/test_clientserver.vim changes
from patches 8.0.0507, 8.0.0511.
* vim-patch:8.0.1251: invalid expressin passed to WaitFor()
Problem: Invalid expressin passed to WaitFor().
Solution: Check if the variable exists.
d97fbf171e
closes#7383closes#7715
This implements the compromise described in #7383:
* low-priority CursorLine if foreground is not set
* high-priority ("same as Vim" priority) CursorLine if foreground is set
ref d1874ab282
ref 56eda2aa17