Compare commits

...

1271 Commits

Author SHA1 Message Date
4dd3fc4ca9 NVIM v0.3.2
Besides the "visible" improvements, this release features numerous
internal improvements to the UI/screen code and test infrastructure.

Numerous patches were merged from Vim, which are not mentioned below.

FEATURES:

07ad5d71ab clipboard: Support custom VimL functions #9304
725da1feeb #9401 win/TUI: Improve terminal/console support
7a8dadbedb #9077 startup: Use $XDG_CONFIG_DIRS/nvim/sysinit.vim if it exists
feec926633 #9299 support <cmd> mapping in more places
0653ed63a5 #9028 diff/highlight: Show underline for low-priority CursorLine
bddcbbb571 signs: Add "numhl" argument #9113
05f9c7c2f7 clipboard: support Wayland (#9230)
14ae394532 #9052 TUI: add support for undercurl and underline color
4fa3492a6f #9023 man.vim: soft (dynamic) wrap #9023

API:

8b39e4ec79 #6920 API: implement object namespaces
b1aaa0a881 API: Implement nvim_win_set_buf() #9100
8de87c7b1c #8180 API: virtual text annotations (nvim_buf_set_virtual_text)
2b9fc9a13f #8660 API: add nvim_buf_is_loaded()
    API: buf_get_lines, buf_line_count handle unloaded buffers
88f77c28e5 API: nvim_buf_get_offset_for_line
94841e5eae API/UI: #8221 ext_newgrid, ext_hlstate
    (use line-based rather than char-based updates)

UI

b5cfac0894 #8806 TUI: use BCE again more often, (smoother resizes/scrolling)
77b5e9ae25 #9315 screen: add missing status redraw when redraw_later(CLEAR) was used
5f15788dc3 TUI: clip invalid regions on resize (#8779), fixes #8774
c936ae0f36 #9193 TUI: improvements for scrolling and clearing
f20427451e #9143 UI: disable clearing almost everywhere
f4b2b66661 #9079 TUI: always use safe cursor movement after resize
d36afafc8d #9211 ui_options: also send when starting or from OptionSet
67f80d485c TUI: Avoid reset_cursor_color in old VTE #9191
e55ebae373 #9021 don't erase screen on `:hi Normal` during startup
c5790d9189 #8915 TUI: Hint wrapped lines to terminals.

FIXES:

231de72539 RPC: turn errors from async calls into notifications
907ad921bc TUI: Restore terminal title via "title stacking" (#9407)
cb76a8a95f genappimage: Unset $ARGV0 at invocation #9376
b48efd9ba7 #9347 TUI: FreeBSD: Improve support for BSD vt console
c16529afa5 TUI: Konsole 18.07.70 supports DECSCUSR (#9364)
aec096fc5b os/lang: use the correct LC_NUMERIC also for OS X
5fee0be915 provider: improve error message (#9344)
3c42d7a10a TUI: alacritty supports set_cursor_color #9353
7bff9a5de8 TUI: Alacritty supports DECSCUSR (#9048)
57acfceabe macOS: infer primary language if $LANG is empty #9345
bc132ae123 runtime/syntax: Fix highlighting of augroup contents (#9328)
715fdfee1e #9297 VimL/confirm(): Show dialog even if :silent
799d9c3215 clipboard: Prefer xclip (#9302)
6dae7776ed provider/nodejs: fix npm,yarn detection
16bc1e9c17 #9218 channel: avoid buffering output when only terminal and no callbacks are active
72fecad1ff #8804 Fix crash in lang_init() on macOS if lang_region = NULL
d581398779 ruby: detect rbenv shims for other versions (#8733)
e568ac7a68 #9123 third-party/unibilium: Fix parsing of extended capability entries
c4c74c3883 jobstart(): Fix hang on non-executable cwd #9204
1cf50cbfd9 provider/nodejs: Simultaneously query npm and yarn #9054
6c496db4b7 undo: Fix infinite loop if undo_read_byte returns EOF #2880
f8f83579ff #9034 'swapfile: always show dialog'

CHANGES:

c236e80cf3 #9024 --embed: wait for UI unless --headless
180b50dddc #9248 python: 'neovim' module was renamed to 'pynvim'
2000b6a64a #8589 VimL: Remove legacy aliases "v:errmsg", "v:shell_error", "v:this_session"
deb18a050e defaults: background=dark #2894 (#9205)
c1187d4af0 defaults: win: 'shellpipe' for cmd.exe (#8827)
2018-12-31 01:06:17 +01:00
f8eae37a36 version.c: update [ci skip] (#9417) 2018-12-31 00:32:32 +01:00
82a92308c5 version.c: update [ci skip] (#9275)
vim-patch:8.0.0428: git and hg see new files after running tests
vim-patch:8.0.0429: options test does not always test everything
vim-patch:8.0.0430: options test fails or hangs on MS-Windows
vim-patch:8.0.0436: running the options test sometimes resizes the terminal
vim-patch:8.0.0488: running tests leaves an "xxx" file behind
vim-patch:8.0.0585: test_options fails when run in the GUI

vim-patch:8.1.0558: some MS-Windows instructions are outdated
vim-patch:8.1.0565: asan complains about reading before allocated block
vim-patch:8.1.0566: SGR not enabled for mintty because $TERM is "xterm"
vim-patch:8.1.0567: error for NUL byte in ScreenLines goes unnoticed
vim-patch:8.1.0568: error message for NUL byte in ScreenLines breaks Travis CI
vim-patch:8.1.0577: tabpage right-click menu never shows "Close tab"
vim-patch:8.1.0578: cannot disable arabic, rightleft and farsi in configure
vim-patch:8.1.0587: GvimExt: realloc() failing is not handled properly
vim-patch:8.1.0589: compilation error in gvimext.cpp
vim-patch:8.1.0592: the libvterm tests are not run as part of Vim tests
vim-patch:8.1.0593: illegal memory access in libvterm test
vim-patch:8.1.0594: libvterm tests fail to run on Mac
vim-patch:8.1.0595: libvterm tests are not run with coverage
vim-patch:8.1.0597: cannot run test_libvterm from the top directory
vim-patch:8.1.0598: indent tests may use the wrong Vim binary
vim-patch:8.1.0605: running make in the top directory echoes a comment 
vim-patch:8.1.0606: 'cryptmethod' defaults to a very old method
vim-patch:8.1.0607: proto files are not in sync with the source code
vim-patch:8.1.0608: coverals is not updating
vim-patch:8.1.0609: MS-Windows: unused variable, depending on the Ruby version
vim-patch:8.1.0610: MS-Windows ctags file list differs from Unix
vim-patch:8.1.0616: NSIS installer is outdated
vim-patch:8.1.0617: NSIS installer gets two files from the wrong directory
vim-patch:8.1.0620: overuling CONF_ARGS from the environment no longer works
vim-patch:8.1.0624: overuling CONF_ARGS from the environment still does not work
vim-patch:8.1.0628: Compiler warning on MS-Windows.
vim-patch:8.1.0635: Coverity complains about null pointer use
vim-patch:8.1.0637: nsis file no longer used
vim-patch:8.1.0646: cannot build with Ruby 2.6.0
2018-12-31 00:20:28 +01:00
725da1feeb Merge #9401 from justinmk/pr-win-erw7 2018-12-30 23:54:23 +01:00
92806827a9 appimage: Include metadata #9320
closes #9320
closes #9128
2018-12-30 23:02:40 +01:00
1e8d2bdc48 Merge #9335 from justinmk/doc 2018-12-30 21:17:18 +01:00
a10fdc70aa syntax/vim.vim: highlight <cmd> key 2018-12-30 21:09:39 +01:00
e83c0a267d help: Do not highlight "Nvim."
This was added in 549311db7d for some reason, it usually just looks
weird.
2018-12-30 21:09:39 +01:00
e834660b2b doc: Remove {Nvim} tag
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
2018-12-30 21:09:39 +01:00
4ba8266ab1 doc
- CMake features
2018-12-30 21:09:39 +01:00
5749ecaf22 win/TUI: ConEmu: get back_color_erase from terminfo
We already set back_color_erase in our builtin terminfo
(terminfo_defs.h:conemu_terminfo), so we don't need to set it explicitly
in patch_terminfo_bugs().
2018-12-30 20:21:37 +01:00
9ca836f893 cleanup: Remove os_term_is_nice() 2018-12-30 19:57:50 +01:00
31a508cf6c refactor: Extract os_tty_guess_term()
- Also remove feature-detection of uv_set_vterm_state(): instead, on
  Windows we always require libuv to have that function.
2018-12-30 19:57:50 +01:00
fa5182489a Merge pull request #9411 from jamessan/vim-8.1.0662
vim-patch:8.1.0662: needlessly searching for tilde in string
2018-12-30 10:05:12 -05:00
1e06c235b8 vim-patch:8.1.0662: needlessly searching for tilde in string
Problem:    Needlessly searching for tilde in string.
Solution:   Only check the first character. (James McCoy, closes vim/vim#3734)
ef0a1d5ed3
2018-12-30 09:02:35 -05:00
d442345729 Merge pull request #9409 from jamessan/vim-8.0.1469
[RFC] vim-patch:8.0.1469,8.0.1734,8.1.0353,8.1.0354
2018-12-29 20:18:36 -05:00
bebbf08c8c vim-patch:8.1.0354: packadd test fails on MS-Windows
Problem:    Packadd test fails on MS-Windows.
Solution:   Ignore difference between forward and backward slashes.
53c8a478cc
2018-12-29 16:53:09 -05:00
ce4199e8b0 vim-patch:8.1.0353: an "after" directory of a package is appended to 'rtp'
Problem:    An "after" directory of a package is appended to 'rtp', which
            will be after the user's "after" directory. ()
Solution:   Insert the package "after" directory before any other "after"
            directory in 'rtp'. (closes vim/vim#3409)
99396d4cbf
2018-12-29 16:52:25 -05:00
91f40ff284 vim-patch:8.0.1734: package directory not added to 'rtp' if prefix matches
Problem:    Package directory not added to 'rtp' if prefix matches.
Solution:   Check the match is a full match. (Ozaki Kiichi, closes vim/vim#2817)
            Also handle different ways of spelling a path.
f98a39ca57
2018-12-29 12:57:16 -05:00
e09fb6ee53 vim-patch:8.0.1469: when package path is a symlink 'runtimepath' is wrong
Problem:    When package path is a symlink adding it to 'runtimepath' happens
            at the end.
Solution:   Do not resolve symlinks before locating the position in
            'runtimepath'. (Ozaki Kiichi, closes vim/vim#2604)
2374faae11
2018-12-29 11:46:21 -05:00
907ad921bc TUI: enter/exit alternate screen with "title stacking" (#9407)
Works in iTerm2 and xterm.

- patch_terminfo_bugs(): Add title-stacking sequences (\e[22t and
  \e[23t) to the overrides for iTerm2 and xterm.
- Note: the builtins (terminfo_defs.h) for `iterm_256colour_terminfo`
  and `xterm_256colour_terminfo` already include the sequences.

Test case (title should be "foo" after the final :q):

   TERM=iterm2 nvim -u NONE +'set title titleold=foo'
   :q
   TERM=iterm2 nvim -u NONE +'set title titlestring=zub'
   :q

closes #4063
2018-12-29 03:30:51 +01:00
dba69a1d3b update_terminfo.sh: NOLINT data arrays 2018-12-28 23:52:03 +01:00
959df5d8a5 update_terminfo.sh: Use printf instead of echo 2018-12-28 23:52:03 +01:00
4a7f6dafe9 Merge #9383 from jamessan/stdpath-rplugin
Use stdpath() to determine rplugin manifest path
2018-12-28 15:01:41 +01:00
135991712a rplugin.vim: Add migration support for Windows, nvim/ -> nvim-data/ 2018-12-27 21:07:28 -05:00
e85b911f02 test: win/TUI builtin terminfos 2018-12-28 01:46:25 +01:00
c1015121ec Merge 'upstream/master' into pr-win-erw7 2018-12-27 22:49:44 +01:00
4f030ec24e win/TUI: Fix scroll on Windows legacy console 2018-12-27 22:45:47 +01:00
fad7a26bc5 win/TUI: ConEmu: set immediate_wrap_after_last_column #9094 2018-12-27 22:42:55 +01:00
6c62f7b715 win/TUI: builtin terminfos for cygwin, conemu, et al. 2018-12-27 22:39:54 +01:00
6060301558 win/TUI: SetConsoleMode() to override libuv #9094
Use uv_set_vterm_state() to override libuv's guess.
See https://github.com/libuv/libuv/pull/1873/ for discussion.

This commit uses a terminal-detection approach based on
GetProcessImageFileNameW(...), which will be reverted in the following
commit. The approach was intended to handle the case of running in
winpty (:terminal), but we will add $NVIM env var for that.

Also add some support for ConEmu, cygwin.
2018-12-27 22:35:59 +01:00
e1876c7ad1 Merge pull request #9398 from janlazo/mac-brew-addon 2018-12-27 19:27:36 +01:00
a9b1937e5a ci: install neovim gem on macOS
High Sierra has ruby 2.3 preinstalled so neovim gem should work.
2018-12-27 09:44:54 -05:00
c926ba1dc4 ci: use homebrew addon to simplify shell scripts 2018-12-26 11:55:29 -05:00
9ac1e2db79 Merge pull request #9394 from bfredl/highsign
make vim_snprintf handle %d correctly again, fix ":sign place" output
2018-12-24 10:59:24 +01:00
357e59982d strings: make vim_snprintf handle %d correctly again
This was broken in #9369 (4680ca2)
2018-12-24 10:58:48 +01:00
e9685d9f70 vim-patch:8.1.0627: Python cannot handle function name of script-local function (#9392)
Problem:    Python cannot handle function name of script-local function.
Solution:   Use <SNR> instead of the special byte code. (Ozaki Kiichi, closes
            vim/vim#3681)
9123c0b31a
2018-12-23 13:12:59 +01:00
d2352b7b51 vim-patch:8.1.0615: get_tv function names are not consistent (#9386)
Problem:    Get_tv function names are not consistent.
Solution:   Rename to tv_get.
d155d7a851

Only a change in comments appears to be necessary.
2018-12-22 13:23:01 +01:00
05d8a46ec4 Merge pull request #9384 from bfredl/ui_option_check
test/api: verify that UI options from stable metadata are preserved
2018-12-21 14:23:35 +01:00
ac53536de1 CI/Travis: skip all refs except "master" [skip ci] 2018-12-21 11:48:32 +01:00
cf9a0799c9 CI/Travis: skip "stable" tag [skip ci] 2018-12-21 11:19:34 +01:00
8b41f429bb test/api: verify that UI options from stable metadata are preserved 2018-12-21 10:52:25 +01:00
04c382b2ac win/dist: nvim-qt v0.2.11 #9382 2018-12-21 09:38:52 +01:00
15cc17521e Use stdpath() to determine rplugin manifest path 2018-12-20 21:40:05 -05:00
87b40f7445 Merge #9280 'Lua 5.2+ compatbility' 2018-12-20 18:32:54 +01:00
127b8569e6 lint 2018-12-20 11:57:30 +01:00
221f6fffad runtime/lua/vim/compat.lua
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
2018-12-20 11:57:30 +01:00
e6d0dea42b test: Lua 5.2/5.3 compat #9280
Make the code run both on Lua 5.1 (which is the default for Neovim, and
is what LuaJIT provides) and Lua 5.2+.
2018-12-20 11:57:30 +01:00
ccb005b9e0 Merge #9369 'vim-patch:8.1.0596' 2018-12-19 06:42:42 +01:00
cb76a8a95f genappimage: Unset $ARGV0 at invocation #9376
AppImage sets $ARGV0 which breaks zsh.
Hack around this in our appimage.

fixes #9341
ref https://github.com/AppImage/AppImageKit/issues/852

[ci skip]
2018-12-19 06:30:58 +01:00
1ff7b83d3c l10n: Update Ukrainian translation #9377 2018-12-19 06:02:31 +01:00
4680ca29f1 strings: use (u)int16_t for %h printf format 2018-12-16 14:52:14 -05:00
ae6848cd12 vim-patch:8.1.0596: not all parts of printf() are tested
Problem:    Not all parts of printf() are tested.
Solution:   Add a few more test cases. (Dominique Pelle, closes vim/vim#3691)
21e551cce2
2018-12-16 14:48:30 -05:00
7a8dadbedb Merge pull request #9077 from jamessan/xdg-sysinit
startup: Use $XDG_CONFIG_DIRS/nvim/sysinit.vim if it exists
2018-12-16 13:20:54 -05:00
314f6ea367 startup: Use $XDG_CONFIG_DIRS/nvim/sysinit.vim if it exists
Closes #8994
2018-12-16 12:05:47 -05:00
b48efd9ba7 Merge #9347 from justinmk/tui-bsd
TUI: detect BSD vt console
2018-12-16 14:28:17 +01:00
cffe2d4642 CI/AppVeyor: install "pynvim" python package #9371 2018-12-16 10:47:59 +01:00
3f55010cda TUI: TERM=nsterm
Treat TERM=nsterm the same way in augment_terminfo() and
patch_terminfo_bugs().

ref #9244 463d28cc80
2018-12-16 07:07:24 +01:00
ab7da4c531 TUI: detect BSD vt console
FreeBSD console sets TERM=xterm, but it does not support xterm features
like cursor-shaping. GUI terminals typically set TERM=xterm-256color, so
on FreeBSD we can guess that TERM=xterm is the degraded vt.

OpenBSD console sets TERM=vt220
https://github.com/openbsd/src/blob/master/etc/etc.amd64/ttys

NetBSD console sets TERM=vt100
https://github.com/NetBSD/src/blob/trunk/etc/etc.amd64/ttys

closes #8644
2018-12-16 07:04:02 +01:00
5e8f2048b5 Merge #9367 'vim-patch:8.1.{585,588}' 2018-12-15 14:24:17 +01:00
2aba5569a1 Merge pull request #9368 from bfredl/doublewrap
TUI: handle wrap of doublewidth chars correctly
2018-12-15 12:54:06 +01:00
8fb1fce694 TUI: handle wrap of doublewidth chars correctly 2018-12-15 09:54:25 +01:00
845973c9fe vim-patch:8.1.0588: cannot define a sign with space in the text
Problem:    Cannot define a sign with space in the text.
Solution:   Allow for escaping characters. (Ben Jackson, closes vim/vim#2967)
06b056e110
2018-12-14 22:51:12 -05:00
bcc9b9335c vim-patch:8.1.0585: undo test may fail on MS-Windows
Problem:    Undo test may fail on MS-Windows.
Solution:   Also handle lower case drive letters.
56242f2b08
2018-12-14 22:41:59 -05:00
c16529afa5 TUI: Konsole 18.07.70 supports DECSCUSR (#9364)
ref b0d3d83eca

KONSOLE_VERSION is exported as a numeric string (after removing the dots
from the version string).

ref #8300
closes #6778
closes #6798
2018-12-14 22:54:39 +01:00
aec096fc5b Merge pull request #9362 from bfredl/macnumlocale
os/lang: use the correct LC_NUMERIC also for OS X
2018-12-13 18:23:23 +01:00
7ba52c0b2b os/lang: use the correct LC_NUMERIC also for OS X 2018-12-13 17:07:12 +01:00
1cca5da05f Merge #9348 from janlazo/vim-8.0.1748
vim-patch:8.0.1748
2018-12-13 02:46:12 +01:00
af368981a7 Merge #9355 from mhinz/ruby-provider-path
provider: make :ruby provider check use same code path as :python
2018-12-13 02:40:54 +01:00
4157f4c72d ex_docmd: '/' is not a path for Cmdline* events
Code from https://github.com/neovim/neovim/pull/9348#issuecomment-446416118

autocmd_fname_full was removed in 82cd0be2ea
but Vim uses this hack for <afile> on CmdlineEnter and related events
in vim-patch:8.0.1748.
Port the hack by not treating "/" as a path for <afile> on these events.
2018-12-12 19:15:05 -05:00
0930435fc3 vim-patch:8.0.1748: CmdlineEnter command uses backslash instead of slash
Problem:    CmdlineEnter command uses backslash instead of slash.
Solution:   Don't treat the character as a file name. (closes vim/vim#2837)
a4baf5b325
2018-12-12 19:14:16 -05:00
315769ae6d test: :ruby reports E319 if provider is missing 2018-12-12 22:11:00 +01:00
5062d8e0dd provider: make :ruby provider check use same code path as :python
Prior to this change, the provider check for ruby was special-cased and now it
returns E319, like :python etc.

References #9354
2018-12-12 21:59:02 +01:00
2f3a18695e Merge pull request #7946 from bfredl/vim-8.0.1445
implement CmdlineChanged: vim-patch:8.0.1445 + nvim specific v:event stuff
2018-12-12 21:40:10 +01:00
5f82889be7 cmdline: support v:event in CmdlineChanged 2018-12-12 15:31:52 +01:00
6c602be33a vim-patch:8.0.1445: cannot act on edits in the command line
Problem:    Cannot act on edits in the command line.
Solution:   Add the CmdlineChanged autocommand event. (xtal8, closes vim/vim#2603,
            closes vim/vim#2524)

153b704e20
2018-12-12 10:25:36 +01:00
b9a441eb78 Merge #9354 from justinmk/provider-E319
provider: repurpose E319
2018-12-12 02:38:08 +01:00
61d0dfee32 provider: repurpose E319
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
2018-12-12 01:26:21 +01:00
2b01c3a8a8 ex_cmds: Remove various "not implemented" commands
Commands related to Netbeans, Sun Workshop, and GUI shims, were
intentionally removed and will not be implemented.
2018-12-11 23:53:27 +01:00
5fee0be915 provider: improve error message (#9344)
Executing `:python`, and similar commands that rely on `eval_call_provider()`,
while the accompanying provider it not available, leads to this error message:

    E117: Unknown function: provider#python#Call

This doesn't say much to a user. Since we introduced `:checkhealth` for this
very reason, we now point to it for further diagnosis.

Fixes #3577
2018-12-11 23:43:35 +01:00
3c42d7a10a TUI: alacritty supports set_cursor_color #9353
Feature was added in:
https://github.com/jwilm/alacritty/pull/757

closes #9353
2018-12-11 22:49:16 +01:00
57acfceabe macOS: infer primary language if $LANG is empty #9345
The macOS preferences have a section called `Language & Region`. There is always
at least one language defined, the primary language.

CFLocaleCopyPreferredLanguages() returns the languages defined in that section,
the first element being the primary language.

Use the primary language in case CFLocaleCopyCurrent() returns NULL.

In the case that the above fallback does not work either, which is very
unlikely, log the error and continue with an empty $LANG.

References #9134
2018-12-11 21:58:35 +01:00
5a90761e8a Merge pull request #9351 from bfredl/clear_attr
TUI: don't use BCE with attributes affecting background
2018-12-11 18:58:07 +01:00
ca1de71a3e TUI: don't use BCE with attributes affecting background 2018-12-11 17:20:19 +01:00
55c5185884 vim-patch:8.1.0574: 'commentstring', fold marker in C (#9339)
Problem:    'commentstring' not used when adding fold marker in C.
Solution:   Require white space before middle comment part. (mostly by
            Hirohito Higashi)
4af7259b2b
2018-12-10 03:11:56 +01:00
20620bae76 Merge #9306 'vim-patch: integrate xdiff library'
closes #1466
closes #1007
closes #1391
2018-12-09 23:07:28 +01:00
4e29810817 vim-patch:8.1.0562: parsing of 'diffopt' is slightly wrong
Problem:    Parsing of 'diffopt' is slightly wrong.
Solution:   Fix the parsing and add a test. (Jason Franklin, Christian
            Brabandt)

b6fc72851c
2018-12-09 22:19:41 +02:00
f273e43cb8 vim-patch:8.1.0513: no error for set diffopt+=algorithm:
Problem:    No error for set diffopt+=algorithm:.
Solution:   Check for missing argument. (Hirohito Higashi, closes #3598)

d0721058f4
2018-12-09 22:19:41 +02:00
89eba72792 vim-patch:8.1.0502: internal diff fails when diffing a context diff
Problem:    Internal diff fails when diffing a context diff. (Hirohito Higashi)
Solution:   Only use callback calls with one line. (closes #3581)

f080d70a82
2018-12-09 22:19:41 +02:00
8f20c22e10 vim-patch:8.1.0497: :%diffput changes order of lines
Problem:    :%diffput changes order of lines. (Markus Braun)
Solution:   Do adjust marks when using internal diff.

5f57bdcab7
2018-12-09 20:05:53 +02:00
e104228b1c vim-patch:8.1.0458: ml_get error and crash when using "do"
Problem:    Ml_get error and crash when using "do".
Solution:   Adjust cursor position also when diffupdate is not needed.
            (Hirohito Higashi)

df77cef92e
2018-12-09 19:55:08 +02:00
fe0114ec41 vim-patch:8.1.0402: the DiffUpdate event isn't triggered for :diffput
Problem:    The DiffUpdate event isn't triggered for :diffput.
Solution:   Also trigger DiffUpdate for :diffget and :diffput.

198fa066b2
2018-12-09 19:45:56 +02:00
271249a48a vim-patch:8.1.0400: using freed memory with :diffget
Problem:    Using freed memory with :diffget.
Solution:   Skip ex_diffupdate() while updating diffs. (closes #3442)

d2b58c0a2c
2018-12-09 19:45:56 +02:00
2c92a4d0c8 vim-patch:8.1.0397: no event triggered after updating diffs
Problem:    No event triggered after updating diffs.
Solution:   Add the DiffUpdated event.

e8fa05b5bc
2018-12-09 19:45:56 +02:00
b7f2c7dd1d vim-patch:8.1.0395: compiler warning on 64-bit MS-Windows
Problem:    Compiler warning on 64-bit MS-Windows.
Solution:   Add type cast. (Mike Williams)

6e272acc82
2018-12-09 19:45:56 +02:00
7b6c92eac1 vim-patch:8.1.0394: diffs are not always updated correctly
Problem:    Diffs are not always updated correctly.
Solution:   When using internal diff update for any changes properly.

e3521d9cbb
2018-12-09 19:45:56 +02:00
972ad11195 vim-patch:8.1.0393: not all white space difference options available
Problem:    Not all white space difference options available.
Solution:   Add "iblank", "iwhiteall" and "iwhiteeol" to 'diffopt'.

785fc6567f
2018-12-09 19:45:56 +02:00
72c5a9db70 vim-patch:8.1.0375: cannot use diff mode with Cygwin diff.exe
Problem:    Cannot use diff mode with Cygwin diff.exe. (Igor Forca)
Solution:   Skip over unrecognized lines in the diff output.

3b8defd0a5
2018-12-09 19:45:56 +02:00
cf1ffa9166 vim-patch:8.1.0360: using an external diff program is slow and inflexible
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
2018-12-09 19:45:56 +02:00
67c5bc1ac0 Calm down the clinter 2018-12-09 08:07:59 +02:00
857a7312d0 doc (#9288)
- misc
- doc: `:help config`. closes #9329
- cleanup test/README.md
2018-12-09 01:31:34 +01:00
f1eb25f0c4 vim-patch:8.1.0570: 'commentstring' not used when adding fold marker (#9331)
Problem:    'commentstring' not used when adding fold marker. (Maxim Kim)
Solution:   Only use empty 'comments' middle when leader is empty. (Christian
            Brabandt, closes vim/vim#3670)
539328197c
2018-12-08 14:21:49 +01:00
bd97577954 Merge #9322 from janlazo/vim-8.1.0563
vim-patch:8.1.{563,564}
2018-12-08 01:20:21 +01:00
bc132ae123 runtime/syntax: Fix highlighting of augroup contents (#9328)
Comparing `vimCommand` from Vim's runtime/syntax/vim.vim, one can see
that "augroup" and similar commands are conspicuously missing. They are
handled specially (`vimAugroupKey`, `vimAutoCmd`).

Excluding them from the generated `vimCommand` keyword list, fixes their
highlighting.

closes #9327
2018-12-08 01:16:58 +01:00
8b9f6103bd CI/Travis: install gperf using package manager (#9325)
Install gperf using package manager instead of building it from source.
When building/installing gperf from source, its install step requires
`texi2pdf` which randomly goes missing on Travis:

    cd doc; /usr/bin/make install
    make[1]: Entering directory '/home/travis/nvim-deps/build/src/gperf/doc'
    cd . && rm -f gperf.aux gperf.toc gperf.cp gperf.fn gperf.ky gperf.pg gperf.tp gperf.vr gperf.log gperf.cps
    cd . && texi2pdf gperf.texi
    /bin/sh: 1: texi2pdf: not found

It's nice to test the "bundled" deps on Travis, but that gets enough
exercise on Windows and macOS, which are the platforms that actually
need "bundled" gperf.
2018-12-07 20:09:44 +01:00
b93670174e Merge pull request #9324 from bfredl/virtfix
api: make nvim_set_virtual_text use correct namespace counter
2018-12-07 18:49:00 +01:00
b4a04fd80c api: make nvim_buf_set_virtual_text use correct namespace counter 2018-12-07 17:31:05 +01:00
f177005447 vim-patch:8.1.0564: setting v:errors to wrong type still possible
Problem:    Setting v:errors to wrong type still possible.
Solution:   Return after giving an error message. (Christian Brabandt)
88b53fd052
2018-12-06 23:24:09 -05:00
4c4997e988 vim-patch:8.1.0563: setting v:errors to a string give confusing error
Problem:    Setting v:errors to a string give confusing error. (Christian
            Brabandt)
Solution:   Change internal error into normal error message.
74ea88c170
2018-12-06 23:21:49 -05:00
7697628345 vim-patch:8.0.1425: execute() does not work in completion of user command (#9317)
Problem:    execute() does not work in completion of user command. (thinca)
Solution:   Switch off redir_off and restore it. (Ozaki Kiichi, closes vim/vim#2492)
2095148277
2018-12-06 01:14:19 +01:00
77b5e9ae25 Merge pull request #9315 from bfredl/clear_status
screen: add missing status redraw when <c-l> was used
2018-12-05 11:54:46 +01:00
f1ce9b3be2 screen: add missing status redraw when redraw_later(CLEAR) was used 2018-12-05 10:57:43 +01:00
e509576e53 provider/lang: expand() g:foo_host_prog (#9312)
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
2018-12-05 00:11:28 +01:00
c07e48a900 vim-patch:8.1.0559: command line completion not sufficiently tested (#9310)
Problem:    Command line completion not sufficiently tested.
Solution:   Add more tests. (Dominique Pelle, closes vim/vim#3622)
b513d3079b
2018-12-04 21:39:18 +01:00
d207440f1e clipboard: Revert unused check #9309
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.
2018-12-04 21:38:20 +01:00
abd32c1bb8 vim-patch:8.1.0559: command line completion not sufficiently tested
Problem:    Command line completion not sufficiently tested.
Solution:   Add more tests. (Dominique Pelle, closes vim/vim#3622)
b513d3079b
2018-12-03 22:48:27 -05:00
7e97587dae Merge pull request #9307 from jamessan/codecov-threshold
codecov: Tolerate a 1% drop in coverage for a PR
2018-12-03 11:22:48 -05:00
231de72539 Merge pull request #9300 from bfredl/asyncerr
rpc: fix invalid responses, turn errors from async calls into notifications
2018-12-03 13:00:41 +01:00
8b42249cdd RPC: turn errors from async calls into notifications
Previously, nvim sent a response with invalid request id (UINT64_MAX).
In functionaltests, catch unexpected error notifications in after_each().
2018-12-03 10:42:00 +01:00
131897c16b codecov: Tolerate a 1% drop in coverage for a PR 2018-12-02 23:10:58 -05:00
07ad5d71ab clipboard: Support custom VimL functions #9304
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.
2018-12-03 00:07:08 +01:00
b19403e73e Merge #9291 'vim-patch:8.1.{550,551}' 2018-12-02 23:10:26 +01:00
109a792e25 Merge pull request #9303 from jamessan/cmp-0075
Unset CMAKE_REQUIRED_* after they're done being used
2018-12-01 19:39:23 -05:00
b14b2883e9 cmake: Update comment on why CMP0059 is still set to OLD 2018-12-01 17:56:03 -05:00
bb94895d52 Unset CMAKE_REQUIRED_* after they're done being used
As of CMake 3.12, check_include_files() also link the check executable
against the libraries listed in CMAKE_REQUIRED_LIBRARIES.  Therefore we
should unset the CMAKE_REQUIRED_* variables after each respective use to
avoid them unnecessarily bleeding into other checks.
2018-12-01 15:28:33 -05:00
799d9c3215 clipboard: Prefer xclip (#9302)
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
2018-12-01 18:50:26 +01:00
715fdfee1e Merge #9297 from justinmk/confirm-dialog 2018-12-01 17:02:49 +01:00
30940f809b doc: deprecate inputdialog()
input() is functionally equivalent. GUI support for dialogs is implicit
and does not depend on choosing inputdialog() vs input().
2018-12-01 16:06:01 +01:00
0f00f31cbd VimL/confirm(): Show dialog even if :silent
closes #8788
related #9034
2018-12-01 16:06:01 +01:00
feec926633 Merge pull request #9299 from bfredl/ctrlx_cmd
insert: make <cmd> mapping work in completion (CTRL-X) mode
2018-12-01 14:02:08 +01:00
2271b10a8e insert: make <cmd> mapping work in completion (CTRL-X) mode 2018-12-01 10:37:46 +01:00
471129792c fixup: 30 col resize to scroll debug 2018-12-01 01:56:22 -05:00
5c3488c937 fixup: 35 col resize to scroll screen 2018-12-01 00:15:11 -05:00
2479004c13 functionaltests: vim-patch:8.1.{550,551} fix 2018-11-30 23:35:36 -05:00
f59ba0fad0 vim-patch:8.1.0551: expression evaluation may repeat an error message
Problem:    Expression evaluation may repeat an error message. (Jason
            Franklin)
Solution:   Check for the value of did_emsg when giving an error
            for the :execute command.
8ff5af9544
2018-11-30 23:35:36 -05:00
5de5507ea6 vim-patch:8.1.0550: expression evaluation may repeat an error message
Problem:    Expression evaluation may repeat an error message. (Jason
            Franklin)
Solution:   Increment did_emsg and check for the value when giving an error
            for the echo command.
76a6345433
2018-11-30 23:35:36 -05:00
a9e368a705 vim-patch:8.1.0553: it is not easy to edit a script that was sourced (#9298)
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
2018-12-01 04:43:08 +01:00
0ce880083d test/macOS: adjust time-sensitive tests
From test_timers.vim:
    Found errors in Test_paused():
    First run:
    function RunTheTest[35]..Test_paused line 20: Expected range 0 - 100, but got 123
    Second run:
    function RunTheTest[35]..Test_paused line 20: Expected range 0 - 100, but got 106

previously: #9220

- Timer tests are less reliable on Travis CI macOS 10.12/10.13.
  ref #6829
  ref e39dade80b
  ref de13113dc1
  ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452
  > We don't guarantee that a X ms timer is triggered during Y ms sleep
  > for any X<Y, though I would expect the load to be really bad for this
  > to happen with X=10ms, Y=40ms.
2018-11-30 22:22:05 +01:00
32a30d90b4 highlight: Fix missing .rgb_sp_color in initializers (#9287)
terminal_get_line_attributes() had this bug for a long time, though it
likely had no effect visible to users.

ref #9028
ref 60f845ca55
2018-11-30 21:13:01 +01:00
b0ebf61d37 test: adjust time-sensitive tests
From test_alot.vim:
    Found errors in Test_lambda_with_timer():
    First run:
    function RunTheTest[35]..Test_lambda_with_timer line 19: Expected True but got 0
    Second run:
    function RunTheTest[35]..Test_lambda_with_timer line 19: Expected True but got 0

previously: #9220

- Timer tests are less reliable on Travis CI macOS 10.12/10.13.
  ref #6829
  ref e39dade80b
  ref de13113dc1
  ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452
  > We don't guarantee that a X ms timer is triggered during Y ms sleep
  > for any X<Y, though I would expect the load to be really bad for this
  > to happen with X=10ms, Y=40ms.
- Call test_garbagecollect_now(), as Vim does.
2018-11-30 05:25:20 +01:00
bd32d8cf95 Merge pull request #9289 from bfredl/nsclear
API: rename nvim_buf_clear_highlight to nvim_buf_clear_namespace
2018-11-29 17:47:48 +01:00
32405de7df API: rename nvim_buf_clear_highlight to nvim_buf_clear_namespace
We want a single function to clear all namespaced buffer objects. This
will later include extmarks.
2018-11-29 15:15:04 +01:00
5a752c97d5 vim-patch:8.1.0098: segfault when pattern with \z() is very slow (#9283)
Problem:    Segfault when pattern with \z() is very slow.
Solution:   Check for NULL regprog.  Add "nfa_fail" to test_override() to be
            able to test this.  Fix that 'searchhl' resets called_emsg.
bcf9442307

closes #8788
2018-11-29 01:51:26 +01:00
98eaf60a98 TUI: set_underline_color: only support colon form #9279
Fixes https://github.com/neovim/neovim/issues/9270

---
Background info per egmontkob:
https://github.com/neovim/neovim/issues/9270#issuecomment-441979176

For undercurl, the newly invented escape sequence is `4:3` strictly with
a colon, as with a semicolon it means single underlined and italic.

For colored underline, the newly invented escape sequence `58:...` is
meant to follow the pattern of `38` and `48`. [ITU
T.416](https://www.itu.int/rec/T-REC-T.416-199303-I/en) § 13.1.8 clearly
specifies the colon only as the separator (and the well-known ECMA-48
§ 8.3.117 just points to this standard).

Using semicolon instead was/is a frequent misinterpretation of this
standard, and is commonly used in the wild – for 38 and 48. More and
more emulators are catching up and beginning to support colon, in
addition to semicolon. Semicolon is pretty fragile; in case an emulator
doesn't recognize a sequence (let's say doesn't recognize the new
extension of `58`), subsequent numbers are interpreted as other
attributes. E.g. if 256-color mode is chosen then the next numeric
parameter is `5` which turns on blinking.

So, luckily, the standard is the technically better solution, the
frequent practice of using semicolons is technically the worse.
Therefore the direction we should be going is clear.

I believe it's a fair requirement for anyone adopting colored underline
to support colons too, and it's a reasonable move from applications to
slightly push the world forward, force developers to catch up with the
recent changes, that is: 1) recognize and at least ignore
colon-delimited parameters even if they aren't supported, 2) recognize
and support colon wherever they support the nonstandard semicolon
instead.

Should you come across any terminal emulator that supports 58 with
semicolons but not with colons, I think the cleanest you can do is
report a bug against them and ignore the problem; they should fix it.

It's yet another common misunderstanding that the truecolor syntax is
`38`/`48`/`58` followed by `:2:rrr:ggg:bbb`. The wording of T.416 is
terrible, but if you read carefully, there's another parameter of
color-space-id preceding the three color channels. Assuming you don't
care about color-space-id, the syntax is `38`/`48`/`58` followed by
`:2::rrr:ggg:bbb` and of course the trailing `m`.

This is only for true-color, the 256-color format doesn't have such
a parameter, it's `38`/`48`/`58` followed by `:5:index` and the final
`m`.
2018-11-29 00:35:29 +01:00
0d1e5ec1b8 Merge #9221 from justinmk/doc 2018-11-28 03:49:17 +01:00
452cadb85a scripts/gen_help_html.py
Adapted from https://github.com/c4rlo/vimhelp/
License: MIT
2018-11-28 03:48:06 +01:00
67305ffb5d lint: src/.clang-format
Move to top level so that

    clang-format -style=file

can find it regardless of current directory.
2018-11-28 03:48:06 +01:00
519224f6bd matchit.vim: s:MultiMatch(): return Dict 2018-11-28 03:48:06 +01:00
30857030e8 doc
- develop.txt is for design/guidelines; architecture/concepts should
  live elsewhere (currently src/nvim/README.md)
- move dev-jargon to intro.txt
- replace https://neovim.io/community (deprecated) with
  https://neovim.io/#chat
- <Cmd> avoids CmdlineEnter/Leave
  https://github.com/vim/vim/issues/2889
2018-11-28 03:48:06 +01:00
cf631aaed0 diff/highlight: Fix GUI highlight for low-priority CursorLine (#9281)
ref #9028
ref 0653ed63a5
2018-11-28 03:23:10 +01:00
3348eea429 Merge pull request #9278 from liushapku/master
fix wrong winnr in getwininfo (issue: #9277)
2018-11-26 22:59:03 -05:00
3ec5351fd1 fix wrong winnr in getwininfo 2018-11-27 10:30:41 +08:00
0653ed63a5 Merge #9028 'diff/highlight: low-priority CursorLine' 2018-11-27 02:26:24 +01:00
7fdb45e0f8 preserve_exit: Ignore SIGHUP
closes #9274
ref #9028

If stdin closed then read_error_exit calls preserve_exit. Handling
SIGHUP during preserve_exit would cause a premature teardown, and
conflicts with e.g. ui_bridge_stop which waits for TUI to teardown.

Vim ignores SIGHUP in its prepare_to_exit and getout_preserve_modified
routines:

    /* Ignore SIGHUP, because a dropped connection causes a read error, which
     * makes Vim exit and then handling SIGHUP causes various reentrance
     * problems. */
    signal(SIGHUP, SIG_IGN);
2018-11-27 01:14:55 +01:00
60f845ca55 diff/highlight: Show underline for low-priority CursorLine 2018-11-27 01:14:55 +01:00
3283db4ecb diff/highlight: do not overlay low-priority CursorLine
ref #6380
2018-11-27 01:14:55 +01:00
a2d03d9b1a refactor: Rename get_term_attr_entry
Rename get_term_attr_entry to hl_get_term_attr, similar to
hl_get_syn_attr, hl_get_ui_attr.
2018-11-27 01:14:55 +01:00
271c5df416 version.c: update [ci skip] (#9171)
vim-patch:8.0.0350: not enough test coverage for Perl
vim-patch:8.0.1135: W_WINCOL() is always the same
vim-patch:8.0.1280: Python None cannot be converted to a Vim type 
vim-patch:8.0.1308: the "Reading from stdin" message may be undesired
vim-patch:8.0.1338: USE_IM_CONTROL is confusing and incomplete 
vim-patch:8.0.1343: MS-Windows: does not show colored emojis
vim-patch:8.0.1350: cannot build with +eval and -multi_byte 
vim-patch:8.0.1829: MS-Windows: script for vimdiff can't handle ! chars
vim-patch:8.0.1849: compiler warning for unused arguments, missing prototype

vim-patch:8.1.0001: the netrw plugin does not work
vim-patch:8.1.0006: syn_id2cterm_bg() may be undefined
vim-patch:8.1.0012: misplaced #endif
vim-patch:8.1.0021: clang warns for undefined behavior
vim-patch:8.1.0041: attribute "width" missing from python window attribute list
vim-patch:8.1.0051: MS-Windows: missing #endif
vim-patch:8.1.0063: Mac: NSStringPboardType is deprecated
vim-patch:8.1.0075: no Vim logo in README file
vim-patch:8.1.0077: header of README file is not nice
vim-patch:8.1.0079: superfluous space in messages
vim-patch:8.1.0102: cannot build without syntax highlighting
vim-patch:8.1.0104: can't build without the +eval feature
vim-patch:8.1.0109: new po makefile missing from distribution
vim-patch:8.1.0117: URL in install program still points to SourceForge
vim-patch:8.1.0122: translators don't always understand the maintainer message
vim-patch:8.1.0123: MS-Windows: colors are wrong after setting 'notgc'
vim-patch:8.1.0124: has('vcon') returns true even for non-win32 terminal
vim-patch:8.1.0127: build failure when disabling the session feature
vim-patch:8.1.0128: building with MinGW does not work out-of-the-box
vim-patch:8.1.0129: still some xterm-like terminals get a stray "p"
vim-patch:8.1.0137: CI does not run with TCL
vim-patch:8.1.0142: xterm and vt320 builtin termcap missing keypad keys
vim-patch:8.1.0147: compiler warning when building with Python 3.7
vim-patch:8.1.0148: memory leak when using :tcl expr command
vim-patch:8.1.0150: insufficient test coverage for Tcl
vim-patch:8.1.0152: cannot easily run individual tests on MS-Windows
vim-patch:8.1.0153: build with SHADOWDIR fails
vim-patch:8.1.0155: evim.man missing from the distribution
vim-patch:8.1.0157: old iTerm2 is not recognized, resulting in stray output
vim-patch:8.1.0160: no Danish manual translations
vim-patch:8.1.0162: Danish and German man pages are not installed
vim-patch:8.1.0163: insufficient testing for Tcl
vim-patch:8.1.0173: compiler warning on MS-Windows
vim-patch:8.1.0176: overlapping string argument for strcpy()
vim-patch:8.1.0178: warning for passing pointer to non-pointer argument
vim-patch:8.1.0179: redundant condition for boundary check
vim-patch:8.1.0180: static analysis errors in Lua interface
vim-patch:8.1.0183: Lua API changed, breaking the build
vim-patch:8.1.0185: running tests writes lua.vim even though it is not used
vim-patch:8.1.0190: Perl refcounts are wrong
vim-patch:8.1.0191: Perl test fails in 24 line terminal
vim-patch:8.1.0197: Windows GUI: title for search/replace is wrong
vim-patch:8.1.0201: newer Python uses "importlib" instead of "imp"
vim-patch:8.1.0202: :version always shows +packages
vim-patch:8.1.0203: building with Perl 5.28 fails on Windows
vim-patch:8.1.0207: need many menu translation files to cover regions
vim-patch:8.1.0209: stderr output from Ruby messes up display
vim-patch:8.1.0215: no error if configure --with-x cannot configure X
vim-patch:8.1.0217: compiler warning for variable set but not used
vim-patch:8.1.0222: errors are reported for "make install"
vim-patch:8.1.0232: Ruby error does not include backtrace
vim-patch:8.1.0234: incorrect reference counting in Perl interface
vim-patch:8.1.0236: Ruby build fails when ruby_intern is missing
vim-patch:8.1.0237: Ruby on Cygwin doesn't always work
vim-patch:8.1.0239: now Ruby build fails on other systems
vim-patch:8.1.0246: build failure without the +eval feature
vim-patch:8.1.0247: Python: error message for failing import is incorrect
vim-patch:8.1.0249: GTK: when screen DPI changes Vim does not handle it
vim-patch:8.1.0250: MS-Windows using VTP: windows size change incorrect
vim-patch:8.1.0254: cannot build on MS-Windows; unused macro HAVE_HANDLE_DROP
vim-patch:8.1.0260: no LGTM logo in README file
vim-patch:8.1.0287: MAX is not defined everywhere
vim-patch:8.1.0292: MS-Windows: the text "self-installing" confuses some users
vim-patch:8.1.0301: GTK: input method popup displayed on wrong screen.
vim-patch:8.1.0305: missing support for Lua 5.4 32 bits on Unix
vim-patch:8.1.0319: bzero() function prototype doesn't work for Android
vim-patch:8.1.0332: get Gdk-Critical error on first balloon show
vim-patch:8.1.0346: building with Aap is outdated and unused
vim-patch:8.1.0348: on Travis the slowest build is run last
vim-patch:8.1.0357: instructions for tests are outdated
vim-patch:8.1.0368: GTK code has too many #ifdefs and GTK 2.10 building fails
vim-patch:8.1.0379: build dependencies are incomplete
vim-patch:8.1.0380: "make proto" doesn't work well
vim-patch:8.1.0383: missing source file rename
vim-patch:8.1.0385: Coveralls badge doesn't update
vim-patch:8.1.0386: cannot test with non-default option value
vim-patch:8.1.0388: Coverity complains about possible NULL pointer use
vim-patch:8.1.0390: scrollbars are not tested
vim-patch:8.1.0391: building in a shadow directory fails
vim-patch:8.1.0403: header file missing from distribution
vim-patch:8.1.0405: too many #ifdefs for GTK
vim-patch:8.1.0408: MSVC: cannot use the "x64" native compiler option
vim-patch:8.1.0411: renamed file missing from distribution
vim-patch:8.1.0412: cannot build with GTK 2.4
vim-patch:8.1.0413: test output is duplicated or missing
vim-patch:8.1.0415: not actually using 16 colors with vtp
vim-patch:8.1.0418: MS-Windows: cannot separate Lua include and library dirs
vim-patch:8.1.0419: Cygwin: running cproto fails with -O2
vim-patch:8.1.0420: generating vim.lib when using ActivePerl 5.20.3 or later
vim-patch:8.1.0421: MS-Windows: Ruby path is wrong for Ruby 1.9 and later
vim-patch:8.1.0422: cannot create map file with MinGW
vim-patch:8.1.0427: MS-Windows GUI: using invalid encoded file name
vim-patch:8.1.0441: build failure without command line history
vim-patch:8.1.0467: cannot build with Mac OS X 10.5
vim-patch:8.1.0472: dosinst command has a few flaws
vim-patch:8.1.0474: directory where if_perl.c is written is inconsistent
vim-patch:8.1.0477: tiny build fails
vim-patch:8.1.0478: cannot build with perl using MinGW
vim-patch:8.1.0480: MinGW build file uses different -I flags than MVC
vim-patch:8.1.0482: MinGW "make clean" deletes all .exe files
vim-patch:8.1.0483: MinGW does not build tee.exe
vim-patch:8.1.0490: MS-Windows: doesn't handle missing glibwinpthread-1.dll
vim-patch:8.1.0492: "Edit with existing Vim" list can get long
vim-patch:8.1.0500: cleaning up in src/tee may not always work
vim-patch:8.1.0521: cannot build with +eval but without +quickfix
vim-patch:8.1.0534: MS-Windows installer uses different $HOME than Vim
vim-patch:8.1.0541: help message in dosinst.c is outdated

vim-patch:8.1.0485: term_start() does not check if directory is accessible  #9204
2018-11-26 00:29:21 +01:00
b1aaa0a881 API: Implement nvim_win_set_buf() #9100
closes #9100
2018-11-25 16:27:10 +01:00
bac9f36d42 CI/travis: Remove vestigial sudo:true
Travis now defaults to sudo:true, and sudo:false is deprecated.
ref #9258 3a9fd4327a
2018-11-25 13:28:50 +01:00
3a9fd4327a Merge #9258 'CI/travis: switch to Ubuntu 16.04' 2018-11-25 13:04:52 +01:00
2cbac719c3 Downgrade to clang-4.0 to avoid false-positive warnings from clang
* -Wtautological-compare

    error: self-comparison always evaluates to true [-Werror,-Wtautological-compare]
    for (win_T *wp = ((curtab) == curtab) ? firstwin : (curtab)->tp_firstwin; wp != ((void*)0); wp = wp->w_next) {

* -Wconversion

    error: implicit conversion loses floating-point precision: 'const float_T' (aka 'const double') to 'float' [-Werror,-Wconversion]
          do { const float_T flt_ = (tv->vval.v_float); switch ((sizeof (flt_) == sizeof (float) ? __fpclassifyf (flt_) : sizeof (flt_) == sizeof (double) ? __fpclassify (flt_) : __fpclassifyl (flt_))) { case 0: { ga_concat(gap, (char_u *)(char_u *) "str2float('nan')"); break; } case 1: { if (flt_ < 0) { ga_append(gap, '-'); } ga_concat(gap, (char_u *)(char_u *) "str2float('inf')"); break; } default: { char numbuf[NUMBUFLEN]; vim_snprintf(numbuf, ((sizeof(numbuf)/sizeof((numbuf)[0])) / ((size_t)(!(sizeof(numbuf) % sizeof((numbuf)[0]))))), "%g", flt_); ga_concat(gap, (char_u *)(char_u *) numbuf); } } } while (0);
                                                                                                   ~~~~~~~~~~~~~  ^~~~
2018-11-24 22:56:25 +01:00
02d68fbcae Remove extraneous parens to silence -Wparentheses-equality
In file included from ../src/nvim/eval/encode.c:974:
    ../src/nvim/eval/typval_encode.c.h:390:40: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
              do { if ((tv->vval.v_special == kSpecialVarTrue)) { msgpack_pack_true(packer); } else { msgpack_pack_false(packer); } } while (0);
                        ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
2018-11-24 22:56:25 +01:00
fc0aeb5f88 xenial: fix clang error messages
* Remove FUNC_ATTR_NONNULL_ALL from function without pointer arguments.

  Otherwise the ASAN build would complain:

  error: 'nonnull' attribute applied to function with no pointer arguments [-Werror,-Wignored-attributes]
  static void do_autocmd_focusgained(_Bool gained) __attribute__((nonnull));
2018-11-24 22:56:25 +01:00
2f6364ea4b travis: switch from Ubuntu 14.04 to 16.04
Travis is phasing out its support for containers, so we remove the `sudo:
false`, which will be a no-op soon.

Reference: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration

Changes for Linux:

  - Xenial comes with libtool installed already. It only provides "libtoolize",
    though. For "libtool" we need to install libtool-bin.
2018-11-24 22:56:24 +01:00
8b39e4ec79 Merge pull request #6920 from bfredl/namespace
make namespaces explicit (intitially for bufhl and virttext)
2018-11-24 19:36:04 +01:00
01dbf0951b api: implement object namespaces
Namespaces is a lightweight concept that should be used to group
objects for purposes of bulk operations and introspection. This is
initially used for highlights and virtual text in buffers, and is
planned to also be used for extended marks. There is no plan use them
for privileges or isolation, neither to introduce nanespace-level
options.
2018-11-24 11:01:37 +01:00
108566e7b6 clipboard.vim: check for win32yank.exe #9263
Win32 allows omitting the `.exe` extension, but WSL does not.
2018-11-21 12:24:40 +01:00
684c7d9228 Merge #9261 'vim-patch:8.0.1731,8.1.0038' 2018-11-21 03:51:33 +01:00
5d22d100f2 vim-patch:8.1.0038: popup test causes Vim to exit
Problem:    Popup test causes Vim to exit.
Solution:   Disable the broken part of the test for now.
680c99b2ef
2018-11-20 21:14:50 -05:00
bebd1f9f76 vim-patch:8.0.1731: characters deleted on completion
Problem:    Characters deleted on completion. (Adrià Farrés)
Solution:   Also check the last item for the ORIGINAL_TEXT flag. (Christian
            Brabandt, closes vim/vim#1645)
e87edf3b85
2018-11-20 21:14:50 -05:00
85761dd426 CI/Travis/macOS: Fix "brew reinstall" invocation (#9259)
"-s" is "--build-from-source", an option to `brew install`.  This was
never a documented option per `brew help reinstall`.  It's not clear why
we were using this option, but it now fails the CI build.

ref https://github.com/Homebrew/brew/pull/5274
ref https://github.com/Homebrew/brew/issues/1656
2018-11-20 20:20:11 +01:00
016ebb4185 Merge #9257 'health/python: warn if pynvim upgrade failed'
Reference: https://github.com/neovim/neovim/wiki/Following-HEAD#20181118
2018-11-20 13:15:04 +01:00
f1a787d292 health/python: warn if pynvim upgrade failed
Reference: https://github.com/neovim/neovim/wiki/Following-HEAD#20181118
2018-11-20 11:33:08 +01:00
3e87f5ccf8 Merge #9256 'vim-patch:8.0.{737,1163,1165,1171,1249,1427}' 2018-11-20 11:09:44 +01:00
deb18a050e defaults: background=dark #2894 (#9205)
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
2018-11-20 10:52:49 +01:00
57fef7c74d health/python: slightly improve output 2018-11-20 09:59:18 +01:00
443cd04d5b provider/python: refactoring 2018-11-20 09:59:18 +01:00
54a586736b vim-patch:8.0.1171: popup test is still a bit flaky
Problem:    Popup test is still a bit flaky.
Solution:   Change term_wait() calls. (Ozaki Kiichi)
712549e04e
2018-11-19 23:46:38 -05:00
3c228e8935 vim-patch:8.0.1165: popup test is still flaky
Problem:    Popup test is still flaky.
Solution:   Add a term_wait() call. (Ozaki Kiichi)
f52c383156
2018-11-19 23:46:17 -05:00
f1d2297c5e vim-patch:8.0.1163: popup test is flaky
Problem:    Popup test is flaky.
Solution:   Add a WaitFor() and fix another.
c79977a437
2018-11-19 23:45:44 -05:00
fdc2707b41 vim-patch:8.0.1249: no error when WaitFor() gets an invalid wrong expression
Problem:    No error when WaitFor() gets an invalid wrong expression.
Solution:   Do not ignore errors in evaluationg the expression.  Fix places
            where the expression was wrong.
c20e0d5207
2018-11-19 22:32:23 -05:00
e71f43f8e7 vim-patch:8.0.0737: crash when X11 selection is very big
Problem:    Crash when X11 selection is very big.
Solution:   Use static items instead of allocating them.  Add callbacks.
            (Ozaki Kiichi)
cdb7e1b7f9
2018-11-19 21:53:39 -05:00
a5637597a6 vim-patch:8.0.1427: the :leftabove modifier doesn't work for :copen
Problem:    The :leftabove modifier doesn't work for :copen.
Solution:   Respect the split modifier. (Yegappan Lakshmanan, closes vim/vim#2496)
de04654ddc
2018-11-19 21:16:26 -05:00
e53ae88e7e vim-patch:8.1.0398: no test for -o and -O command line arguments (#9253)
Problem:    No test for -o and -O command line arguments.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3438)
8f4499b816
2018-11-19 01:38:51 +01:00
463d28cc80 TUI: support TERM=nsterm (#9244)
`:help $TERM` recommends TERM=nsterm for Terminal.app but we did not
actually support it.

NB: We don't include a builtin term for Terminal.app, presumably because
nsterm is commonly available on most systems (`infocmp nsterm`).
2018-11-18 19:58:41 +01:00
344dd2757a vim-patch:8.1.0536: file time test fails when using NFS (#9251)
Problem:    File time test fails when using NFS.
Solution:   Use three file times instead of localtim(). (James McCoy,
            closes vim/vim#3618)
addc156c38
2018-11-18 18:05:43 +01:00
180b50dddc Merge #9248 from mhinz/checkhealth/python
Rename Python package "neovim" to "pynvim"
2018-11-18 14:29:15 +01:00
00e3ba22fe Merge #9247 'vim-patch:8.1.{258,298,299,318,376}' 2018-11-18 12:35:21 +01:00
f4b4b7c132 lint 2018-11-18 00:30:16 -05:00
65a3d53cb9 vim-patch:8.1.0376: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable. (Tony Mechelynck)
Solution:   Initialize the variable.
c787539747
2018-11-18 00:18:52 -05:00
eab181a74e vim-patch:8.1.0318: the getftype() test may fail for char devices
Problem:    The getftype() test may fail for char devices if the file
            disappeared in between the listing and the getftype() call.
Solution:   Ignore empty result. (Ozaki Kiichi, closes vim/vim#3360)
3b3a506f57
2018-11-17 22:38:22 -05:00
2b7e58cb2c vim-patch:8.1.0299: misplaced comment
Problem:    misplaced comment
Solution:   Remove comment
142ae736d9
2018-11-17 22:23:30 -05:00
a9ae5bf36b vim-patch:8.1.0298: window resize test sometimes fails on Mac
Problem:    Window resize test sometimes fails on Mac.
Solution:   Add Test_popup_and_window_resize() to flaky tests.
46fad2ef0b
2018-11-17 22:21:25 -05:00
0c2ca48e5f doc/python: 'neovim' module was renamed to 'pynvim' 2018-11-17 17:56:34 +01:00
3ea14d5366 health/python: 'neovim' module was renamed to 'pynvim' 2018-11-17 17:56:34 +01:00
9fe472c91b vim-patch:8.1.0258: not enough testing for the CompleteDone event
Problem:    Not enough testing for the CompleteDone event.
Solution:   Add a test. (closes vim/vim#3297)
af559d2c9f
2018-11-17 08:20:22 -05:00
25356f2802 Merge pull request #9240 from jamessan/mbyte_spec-failure
unit/mbyte_spec: Run utf_char2bytes test in batches of 0xFFF characters
2018-11-15 16:25:29 -05:00
c344f4b6ae unit/mbyte_spec: Run utf_char2bytes test in batches of 0xFFF characters
Running the full 0xFFFF set of tests in one process fails on slower
architectures/when there's CPU contention.
2018-11-15 07:06:37 -05:00
d81b9d5ec5 vim-patch:8.1.0146: when $LANG is set the compiler test may fail (#9238)
Problem:    When $LANG is set the compiler test may fail.
Solution:   Unset $LANG.
f0447e89a5
2018-11-15 11:42:18 +01:00
3295083d5a vim-patch:8.1.0108: no Danish translations (#9235)
Problem:    No Danish translations.
Solution:   Add Danish message translations. (closes vim/vim#3073)  Move list of
            languages to a common makefile.
a4a2934e59
2018-11-15 03:20:07 +01:00
f6ed446817 vim-patch:8.1.0527: using 'shiftwidth' from wrong buffer for folding (#9234)
Problem:    Using 'shiftwidth' from wrong buffer for folding.
Solution:   Use "buf" instead of "curbuf". (Christian Brabandt)
0c27cbcacf
2018-11-15 02:10:05 +01:00
e14fa8569c Merge #9231 'vim-patch:8.1.{115,143,311,352}' 2018-11-14 11:27:17 +01:00
f6c6567cb1 vim-patch:8.1.0352: browsing compressed tar files does not always work
Problem:    Browsing compressed tar files does not always work.
Solution:   Use the "file" command to get the compression type.
d4a1aabe37
2018-11-13 22:33:27 -05:00
9e59fdf5f6 vim-patch:8.1.0311: filtering entries in a quickfix list is not easy
Problem:    Filtering entries in a quickfix list is not easy.
Solution:   Add the cfilter plugin. (Yegappan Lakshmanan)
8c5e0093c9
2018-11-13 21:32:00 -05:00
091ae1e63f vim-patch:8.1.0143: matchit and matchparen don't handle E363
Problem:    Matchit and matchparen don't handle E363.
Solution:   Catch the E363 error. (Christian Brabandt)
3d1d6475f9
2018-11-13 21:15:29 -05:00
24ce4c6233 vim-patch:8.1.0115: the matchparen plugin may throw an error
Problem:    The matchparen plugin may throw an error.
Solution:   Change the skip argument from zero to "0".
b7a5ab112a
2018-11-13 21:13:19 -05:00
05f9c7c2f7 clipboard: support Wayland (#9230)
Fixes #9213
2018-11-13 19:01:37 +01:00
4cc28673ee Merge #9049 from janlazo/vim-8.0.1352 2018-11-12 23:17:03 +01:00
59ded3ef29 vim-patch: add matchit doc
matchit doc is named 'pi_matchit.txt'.
2018-11-12 12:36:40 -05:00
dec38601c5 vim-patch: rename path to check_colors.vim 2018-11-12 12:36:40 -05:00
89621464fc vim-patch: move test_urls.vim out of runtime/
Rename it to check_urls.vim, similar to check-includes.py.
2018-11-12 12:36:40 -05:00
abd5b0c6c3 vim-patch:8.0.1352: dead URLs in the help go unnoticed
Problem:    Dead URLs in the help go unnoticed.
Solution:   Add a script to check URLs in the help files. (Christian Brabandt)
f38c86eb6b
2018-11-12 12:36:40 -05:00
6d8ad78237 Merge #8952 'vim-patch:8.0.1620,8.1.{96,340}' 2018-11-12 18:32:28 +01:00
21824df3c6 lint 2018-11-12 11:12:44 -05:00
8fa7b6c8af vim-patch:8.1.0096: inconsistent use of the word autocommands
Problem:    Inconsistent use of the word autocommands.
Solution:   Don't use auto-commands or "auto commands".
8c55533c6f
2018-11-12 11:11:31 -05:00
42419e5a73 vim-patch:8.0.1620: reading spell file has no good EOF detection
Problem:    Reading spell file has no good EOF detection.
Solution:   Check for EOF at every character read for a length field.
e26e0d2b83
2018-11-12 08:45:03 -05:00
e5046822c9 oldtests: skip Test_spellinfo()
nvim supports only `set encoding=utf8`.
2018-11-12 08:45:03 -05:00
208cdb84a6 vim-patch:8.1.0340: no test for :spellinfo
Problem:    No test for :spellinfo.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3394)
9049b68612
2018-11-12 08:45:03 -05:00
9f3fb66111 vim-patch:8.1.0516: :move command sets 'modified' #9224
Problem:    :move command marks buffer modified when nothing changed.
Solution:   Do not set 'modified'.  Add a test. (Jason Franklin)
ddd1f9183b
2018-11-11 19:13:14 +01:00
c936ae0f36 Merge pull request #9193 from bfredl/scrollstuff
UI/TUI: improvements and cleanups for scrolling and clearing
2018-11-11 10:53:23 +01:00
eb3b73d472 TUI: attrs -> attr_id refactor 2018-11-11 09:54:03 +01:00
520ec3dbfd UI/TUI: improvements and cleanups for scrolling and clearing
- 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
2018-11-11 09:54:03 +01:00
f8639dc99c test: adjust time-sensitive tests (#9220)
- window_split_tab_spec.lua: Put cursor at bottom of :terminal buffer so
  that it follows output.
- inccommand_spec.lua: Increase timeout to allow 2nd retry.
- Timer tests are less reliable on Travis CI macOS 10.12/10.13.
  ref #6829
  ref e39dade80b
  ref de13113dc1
  ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452
  > We don't guarantee that a X ms timer is triggered during Y ms sleep
  > for any X<Y, though I would expect the load to be really bad for this
  > to happen with X=10ms, Y=40ms.
2018-11-10 11:12:04 +01:00
18435a2534 vim-patch:8.1.0337: :file fails in quickfix command (#9215)
Problem:    :file fails in quickfix command.
Solution:   Allow :file without argument when curbuf_lock is set. (Jason
            Franklin)
379fb76b08
2018-11-09 09:33:28 +01:00
16bc1e9c17 Merge pull request #9218 from bfredl/termbuf
channel: avoid buffering output when only terminal and no callbacks are active
2018-11-08 23:48:34 +01:00
312afd8e2e channel: avoid buffering output when only terminal and no callbacks are active 2018-11-08 19:06:55 +01:00
d36afafc8d Merge pull request #9211 from bfredl/init_options
ui_options: also send when starting in --embed mode
2018-11-08 15:15:36 +01:00
348adbcc7a ui_options: also send when starting or from OptionSet
needed after #9024 to receive options from init.vim
2018-11-08 14:12:54 +01:00
c4c74c3883 jobstart(): Fix hang on non-executable cwd #9204
* os/fs.c: add os_isdir_executable()
* eval.c: fix hang on job start caused by non-executable cwd option
* channel.c: assert cwd is an executable directory
* test: jobstart() produces error when using non-executable cwd
2018-11-07 10:31:25 +01:00
769d164c70 Merge pull request #9206 from janlazo/vim-8.1.0510
vim-patch:8.1.{510,512}
2018-11-06 13:58:22 +01:00
f08869cff2 vim-patch:8.1.0511: ml_get error when calling a function with a range (#9207)
Problem:    ml_get error when calling a function with a range.
Solution:   Don't position the cursor after the last line.
9e353b5265
2018-11-06 13:49:20 +01:00
e0d6894a54 vim-patch:8.1.0512: 'helplang' default is inconsistent for C and C.UTF-8
Problem:    'helplang' default is inconsistent for C and C.UTF-8.
Solution:   Don't accept a value unless it starts with two letters.
389ab7122b
2018-11-05 21:08:23 -05:00
bd6866f90b vim-patch:8.1.0510: filter test fails when $LANG is C.UTF-8
Problem:    Filter test fails when $LANG is C.UTF-8.
Solution:   Set 'helplang' to "en" for any C language. (Christian Brabandt,
            closes vim/vim#3577)
dcd71cbaed
2018-11-05 20:08:47 -05:00
5320eb57df build: relax find_package() version spec
We need a way to say "Lua 5.1.x" is required.
"5.1 EXACT" does not match 5.1.5, so it's useless.

https://github.com/neovim/neovim/pull/9197#discussion_r230962070
2018-11-06 01:48:49 +01:00
1347f36494 Merge #9112 'doc' 2018-11-05 23:10:50 +01:00
b96730bc3b doc: API 2018-11-05 22:45:49 +01:00
72b1ce7f30 doc: fix/remove broken tag references 2018-11-05 22:45:48 +01:00
1bbbd5f0ff build: make helphtml 2018-11-05 22:45:48 +01:00
2ee4ce0639 doc: merge sponsor.txt into intro.txt
Also mention how to donate to Nvim.

closes #8603
2018-11-05 22:45:48 +01:00
f679abef3e runtime: delete rrhelper.vim 2018-11-05 22:45:48 +01:00
4de70f5b95 doc
- update standard-plugin-list. closes #8388
2018-11-05 22:45:48 +01:00
6729774143 doc: manpage
roff/mdoc reference:
http://man7.org/linux/man-pages/man7/groff_mdoc.7.html
2018-11-05 22:45:48 +01:00
6fe740c7ab test/win: window_split_tab_spec: fix retry() 2018-11-05 07:59:14 +01:00
10ef903648 test/win: window_split_tab_spec: increase retry() time
The default timeout of 10s only allows 1 retry.
2018-11-05 03:25:36 +01:00
8086db6302 Merge #9197 2018-11-05 01:15:20 +01:00
2c085257fd CI/AppVeyor: Avoid "warning" which causes non-zero retcode
ErrorActionPreference=stop will fail the script if this warning occurs.

see https://github.com/open62541/open62541/issues/2068
2018-11-05 00:35:54 +01:00
de13113dc1 test/timer_spec: relax lower-bound
Test is unreliable on macOS 10.13.  The lower-bound isn't central to the
purpose of the test, so just relax it.

ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452

> We don't guarantee that a X ms timer is triggered during Y ms sleep
> for any X<Y, though I would expect the load to be really bad for this
> to happen with X=10ms, Y=40ms.

related: #6829
2018-11-05 00:35:54 +01:00
697176fc3e test/win: retry unreliable SIGWINCH test 2018-11-04 14:24:05 +01:00
377694681c build: dependencies: specify minimum versions 2018-11-04 12:11:37 +01:00
47473b39cb vim-patch:8.1.0508: suspend test fails when run by root (#9196)
Problem:    Suspend test fails when run by root.
Solution:   Accept both '$' and '#' for the prompt. (James McCoy, closes vim/vim#3590)
0f62cf5b33
2018-11-04 11:58:22 +01:00
21fb9b2b08 vim-patch:8.1.0507: .raml files not properly detected (#9195)
Problem:    .raml files not properly detected.
Solution:   Recognize .raml as raml instead of yaml. (closes vim/vim#3594)
da1c11c641
2018-11-04 11:56:34 +01:00
67f80d485c TUI: Avoid reset_cursor_color in old VTE #9191
closes #9089
2018-11-03 21:39:48 +01:00
a6661178aa vim-patch:8.1.0504: when CTRL-C is mapped it triggers InsertLeave (#9192)
Problem:    When CTRL-C is mapped it triggers InsertLeave.
Solution:   Make CTRL-C behave the same way when typed or used in a mapping.
4dbc262764
2018-11-03 12:04:33 +01:00
87d67814e5 Merge #9184 from janlazo/vim-8.0.1758 2018-11-02 09:09:40 +01:00
48398d61e4 Merge pull request #9183 from bfredl/offset2
api: make nvim_buf_get_offset independent on platform option
2018-11-02 08:36:38 +01:00
a9b7debbbc vim-patch:8.0.1766: expanding abbreviation doesn't work
Problem:    Expanding abbreviation doesn't work. (Tooth Pik)
Solution:   Return OK instead of FALSE and FAIL instead of TRUE. (Christian
            Brabandt)
c3c3e69896
2018-11-01 23:20:06 -04:00
44c111e49f vim-patch:8.0.1758: open_line() returns TRUE/FALSE for success/failure
Problem:    open_line() returns TRUE/FALSE for success/failure.
Solution:   Return OK or FAIL.
24a2d7264f
2018-11-01 23:19:25 -04:00
c40f992e10 api: simplify nvim_buf_get_offset function 2018-11-01 22:00:40 +01:00
c45a859171 Merge #7506 'deps: update libuv' 2018-11-01 20:42:20 +01:00
f1b67c3453 test/old: Test_BufReadCmdHelp: generate helptags
Generate helptags before :help.

This only failed in the TSAN build because other builds run the Lua
tests first, which generate the helptags.

closes #8824
2018-11-01 19:17:29 +01:00
88f77c28e5 Merge pull request #9180 from bfredl/offset
api: implement nvim_buf_get_offset_for_line
2018-11-01 17:36:58 +01:00
f5671c8614 win: test: SIGWINCH is noisy #7506 2018-11-01 17:17:07 +01:00
281da0dd59 api: implement nvim_buf_get_offset_for_line
Like line2byte, but works for any buffer, and uses zero-based
indexing (API conventions).
2018-11-01 15:05:05 +01:00
11b438eb66 Merge #8378 from janlazo/win_functional_tests 2018-11-01 10:00:35 +01:00
f9fe903579 vim-patch:8.1.0501: cppcheck warns for using array index before bounds check (#9178)
Problem:    Cppcheck warns for using array index before bounds check.
Solution:   Swap the conditions. (Dominique Pelle)
a9a8e04eab
2018-11-01 09:53:46 +01:00
8480b74010 build/win: LibuvCMakeLists.txt: adapt to moved headers
Headers were moved in v1.21.0
99ae3edf28
2018-11-01 04:35:36 +01:00
8ce3d0174e ci: win: enable powershell's strict mode
Give variables a default value to pass strict mode.
$ErrorActionPreference defines the default behavior
if a powershell command fails.
If it's set to 'stop', then it aborts the script
on the first unresolved error.
This behavior extends to native programs like cmake
but do not depend on it.

https://github.com/PowerShell/PowerShell/issues/3996
2018-10-31 22:57:26 -04:00
9929af47fe ci: win: use Ninja for CMake Generator 2018-10-31 22:56:19 -04:00
7ab0e8c8dd functionaltest: enable job channel test 2018-10-31 22:55:07 -04:00
4abed17496 functionaltest: win: enable shada FileWriteCmd 2018-10-31 22:55:07 -04:00
8e44396794 functionaltest: enable buffered output tests 2018-10-31 22:55:07 -04:00
fe2e7cfdee functionaltest: enable FilterReadPre,FilterReadPost test 2018-10-31 22:55:07 -04:00
bc5fb82c6d functionaltest: win: enable diffput,diffget test 2018-10-31 22:55:07 -04:00
88974c8e66 functionaltests: win: enable gzip test
Close gzip file handles.
2018-10-31 22:54:18 -04:00
fc5dea02b6 deps: update to libuv v1.23.2
Remove libuv-overlapped.patch since UV_OVERLAPPED_PIPE was included in
libuv v1.21.0:
62a0f763a7

Notable changes since v1.12:
- 1.16.0
  - uv_os_getppid(): get parent PID
  - "win,tty: improve SIGWINCH support" (v1.15.0)
- 1.18.0
  - uv_os_getpid()
- 1.19.0
  - Windows: uv_kill() pid 0 now means "current process group", like unix.
    890eedaf59
- 1.20.0
  - unix,spawn: respect user stdio flags for new pipe
    c409b3fcff
2018-11-01 00:10:50 +01:00
b24209dcf5 provider/nodejs: handle missing stdout
ref https://github.com/neovim/neovim/issues/9001#issuecomment-434802234
2018-10-31 20:42:41 +01:00
7d61cdc334 doc: README.md (#9176) 2018-10-31 20:19:58 +01:00
61fccda197 test/old: force "-i viminfo" in $RUN_VIMTEST #9175 (#9175)
Before this change, some tests fail if the user has a local
shada/viminfo in the default $HOME location. For example:

    TEST_FILE=test_marks.res make oldtest

Ostensibly this change should not be necessary, because of this
statement in runtest.vim:

    set viminfo+=nviminfo
2018-10-31 10:23:58 +01:00
0838b00253 test/old: test_startup: fix "-u NONE" arg
Lack of whitespace caused a file named "NONE-u" to be created (because
GetVimCommand() returns a command ending with "-i NONE").
2018-10-30 20:44:30 +01:00
3159cd4503 vim-patch:8.0.1553: find digraph to insert a character #8190
Problem:    Cannot see what digraph is used to insert a character.
Solution:   Show the digraph with the "ga" command. (Christian Brabandt)
5f73ef8d20

close #8190
2018-10-30 19:47:59 +01:00
500345aea2 Merge #9172 from justinmk/vim-d473c8c10126 2018-10-30 01:01:29 +01:00
18ce6c9063 vim-patch:2c64ca1802b2
Update runtime files
2c64ca1802
2018-10-30 00:05:25 +01:00
17c26d0dcf vim-patch:95bafa296ae9
Update runtime files.
95bafa296a
2018-10-30 00:02:22 +01:00
7d2fbb9012 vim-patch:93a1df2c205c
Update runtime files.
93a1df2c20
2018-10-29 23:57:24 +01:00
11bcd48fda vim-patch:20aac6c11269
Update runtime files.
20aac6c112
2018-10-29 23:55:45 +01:00
2c7ed420d9 vim-patch:fc65cabb15d0
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)
2018-10-29 23:54:15 +01:00
f5406dfe77 Merge #9164 from justinmk/vim-a2a80162deb1
vim-patch: runtime updates
2018-10-29 17:47:27 +01:00
6d1827aebc runtime/optwin.vim: feature-check 'pw' option
Option not implemented yet.
2018-10-29 10:24:01 +01:00
228bc4c416 vim-patch:d473c8c10126
Update runtime files.
d473c8c101
2018-10-29 10:01:44 +01:00
4f67f5ba6e vim-patch:d2855f5454c5
Update runtime files.
d2855f5454
2018-10-29 09:57:24 +01:00
07fdbba9d0 vim-patch:91f84f6e11cd
Update runtime files.
91f84f6e11
2018-10-29 09:55:07 +01:00
877d5c8be7 vim-patch:a9604e614517
Update runtime files.
a9604e6145
2018-10-29 09:50:08 +01:00
d252be36e2 vim-patch:b477af2260d9
Update runtime files.
b477af2260
2018-10-29 09:46:34 +01:00
de682a4f9e vim-patch:fd35811ca528
Update runtime files, add Danish translations.
fd35811ca5
2018-10-29 09:43:50 +01:00
5a022c71e4 vim-patch:6dc819b1299e
Updated runtime and language files.
6dc819b129
2018-10-29 09:39:48 +01:00
884ac81135 vim-patch:675e8d6adb88
Update runtime files.
675e8d6adb

---

NA:
vim-patch:ffd112edc6a8
Fix missing patch number.
ffd112edc6
2018-10-29 09:37:13 +01:00
93a85bdd8a vim-patch:d2f3a8b87873
Update runtime files.
d2f3a8b878
2018-10-29 09:32:29 +01:00
9da951ad47 vim-patch:0b0f0992d46e
Update runtime files.
0b0f0992d4
2018-10-29 09:29:17 +01:00
633ae523f5 vim-patch:2f01889055f1
Runtime file and translation updates.
2f01889055
2018-10-29 09:26:43 +01:00
835161490d vim-patch:7c63fbc46e21
Updated runtime files.
7c63fbc46e
2018-10-29 09:23:30 +01:00
460a52dbbf vim-patch:eb3dc87f0139
Updated runtime files
eb3dc87f01
2018-10-29 09:22:31 +01:00
bee8a0ae8c vim-patch:7db25fed5de1
Update runtime files.
7db25fed5d
2018-10-29 09:21:00 +01:00
c05b0d8ec7 vim-patch:85eee130f44a
Update runtime files.
85eee130f4
2018-10-29 09:17:43 +01:00
875a1bcf0a vim-patch:15142e27aaaf
Update runtime files and translations
15142e27aa
2018-10-29 09:17:35 +01:00
9ef01272b2 vim-patch:7dda86f2ff35
Update runtime files.
7dda86f2ff
2018-10-29 08:30:39 +01:00
a1e822fbc6 vim-patch:51ad4eaa22e1
Update runtime files
51ad4eaa22

---

NA:
vim-patch:6176697203b0
2018-10-29 08:26:47 +01:00
e2fb230c3a vim-patch:ab943431d8fc
Update runtime files
ab943431d8
2018-10-29 06:50:47 +01:00
5c4a421735 vim-patch:98ef233e14fa
Update runtime files. Convert a couple of help files to utf-8.
98ef233e14
2018-10-29 06:44:02 +01:00
c7513368f0 vim-patch:b5b7562475ad
Update runtime files.
b5b7562475

---

NA patch (Nvim does not ship with spell files):
vim-patch:3ad8772ef02e
Include Serbian spell input files
3ad8772ef0
2018-10-29 06:38:10 +01:00
fb8f822d9c Merge #9015 2018-10-29 06:17:29 +01:00
17a5dde8d3 vim-patch:22f1d0e35eb0
Updated runtime files.

Add Serbian translations and spell checking.
22f1d0e35e
2018-10-28 14:18:21 +01:00
733b4ce033 vim-patch:7254067ee970
Update runtime files.
7254067ee9
2018-10-28 14:07:58 +01:00
1a51524ad5 vim-patch:40962ec9c0e7
Update runtime files.
40962ec9c0
2018-10-28 14:05:14 +01:00
8d743d02f2 vim-patch:df980db69b83
update a few runtime files
df980db69b

Note: omit hl-Terminal, Nvim has its own way of highlighting :terminal.
2018-10-28 14:01:46 +01:00
dae1213e57 vim-patch:f0b03c4e98f8
Update runtime files
f0b03c4e98

Note: haskell changes were included in 942f3587c3
2018-10-28 13:57:08 +01:00
b9a6df58cc vim-patch:4697399e8c80
move netrw back to the previous version
4697399e8c
2018-10-28 13:50:36 +01:00
f29c2fc4a8 vim-patch:461fe50fea24
patch 8.0.1367: terminal test hangs, executing abcde

Problem:    terminal test hangs, executing abcde. (Stucki)
Solution:   Rename abcde to abxde.
461fe50fea
2018-10-28 13:48:54 +01:00
542513fd8a vim-patch:a2a80162deb1
Update runtime files.
a2a80162de
2018-10-28 13:48:02 +01:00
cf93b5e9f9 version.c: update [ci skip] (#9162) 2018-10-28 13:09:10 +01:00
b659841570 version.c: update [ci skip] #8474
close #8474

vim-patch:8.0.0264: memory error reported by ubsan
vim-patch:8.0.0340: not checking return valud of dict_add()
vim-patch:8.0.0346: Vim relies on limits.h to be included indirectly
vim-patch:8.0.0361: GUI initialisation is not sufficiently tested
vim-patch:8.0.0365: might free a dict item that wasn't allocated
vim-patch:8.0.0367: types in include files may be inconsistent
vim-patch:8.0.0369: a few options are not defined, depending on features
vim-patch:8.0.0372: more options are not always defined
vim-patch:8.0.0386: tiny build has a problem with generating the options test
vim-patch:8.0.0392: GUI test fails with Athena and Motif
vim-patch:8.0.0395: testing the + register fails with Motif
vim-patch:8.0.0422: Python test fails with Python 3.6
vim-patch:8.0.0425: build errors when building without folding
vim-patch:8.0.0432: "make shadow" creates an invalid link
vim-patch:8.0.0476: missing change to main.c
vim-patch:8.0.0526: Coverity complains about possible negative value
vim-patch:8.0.0540: building unit tests fails
vim-patch:8.0.0556: getting window position fails if GUI and term possible
vim-patch:8.0.0563: crash when getting the window position in tmux
vim-patch:8.0.0567: call for requesting color and ambiwidth is too early
vim-patch:8.0.0569: bracketed paste is still enabled in a shell command
vim-patch:8.0.0587: configure check for return value of tgetent skipped
vim-patch:8.0.0588: job_stop() often assumes the channel will be closed
vim-patch:8.0.0610: the screen is redrawn when default 'background' is detected
vim-patch:8.0.0611: the screen is not redrawn after sending t_u7
vim-patch:8.0.0620: checking for HAVE_GTK_MULTIHEAD is not needed
vim-patch:8.0.0626: in the GUI the cursor may flicker
vim-patch:8.0.0628: cursor disappears after silent mapping
vim-patch:8.0.0631: can't build with Perl 5.26
vim-patch:8.0.0637: crash when using some version of GTK 3
vim-patch:8.0.0639: the cursor position is set when editing a new commit message
vim-patch:8.0.0649: when opening a help file the filetype is set several times
vim-patch:8.0.0653: the default highlight for QuickFixLine is not good
vim-patch:8.0.0690: compiler warning on non-Unix system
vim-patch:8.0.0691: compiler warning without the linebreak feature
vim-patch:8.0.0696: .inc files missing in git
vim-patch:8.0.0719: build failure without +terminal feature
vim-patch:8.0.0729: the help for the terminal configure option is wrong
vim-patch:8.0.0731: cannot build the terminal feature on MS-Windows
vim-patch:8.0.0741: cannot build with HPUX
vim-patch:8.0.0750: OpenPTY missing in non-GUI build
vim-patch:8.0.0751: OpenPTY missing with some combination of features
vim-patch:8.0.0752: build fails on MS-Windows
vim-patch:8.0.0763: libvterm can be improved
vim-patch:8.0.0770: compiler warning for missing field initializer
vim-patch:8.0.0772: other stdbool.h dependencies in libvterm
vim-patch:8.0.0773: mixing 32 and 64 bit libvterm builds fails
vim-patch:8.0.0774: build failure without the multi-byte feature
vim-patch:8.0.0790: MSVC compiler warning for strncpy in libvterm
vim-patch:8.0.0795: terminal feature does not build with older MSVC
vim-patch:8.0.0808: cannot build with terminal feature and DEBUG defined
vim-patch:8.0.0809: MS-Windows: tests hang
vim-patch:8.0.0811: MS-Windows: test_expand_dllpath fails
vim-patch:8.0.0822: Test_with_partial_callback is a tiny bit flaky
vim-patch:8.0.0834: can't build without the client-server feature
vim-patch:8.0.0865: cannot build with channel but without terminal feature
vim-patch:8.0.0866: Solaris also doesn't have MIN and MAX
vim-patch:8.0.0875: crash with weird command sequence
vim-patch:8.0.0880: Travis uses an old Ubuntu version
vim-patch:8.0.0901: asan suppress file missing from distribution
vim-patch:8.0.0919: cursor color isn't set on startup
vim-patch:8.0.0921: terminal window cursor shape not supported in the GUI
vim-patch:8.0.0946: using PATH_MAX does not work well on some systems
vim-patch:8.0.0954: /proc/self/exe might be a relative path
vim-patch:8.0.0966: build failure without terminal feature
vim-patch:8.0.0967: using a terminal may cause the cursor to blink
vim-patch:8.0.0972: compiler warnings for unused variables
vim-patch:8.0.0980: Coverity warning for failing to open /dev/null
vim-patch:8.0.0986: terminal feature always requires multi-byte feature
vim-patch:8.0.0988: warning from Covscan about using NULL pointer
vim-patch:8.0.0993: sometimes an xterm sends an extra CTRL-X
vim-patch:8.0.0996: Mac: t_RS is echoed on the screne in Terminal.app
vim-patch:8.0.0997: Libvterm and Terminal.app not regognized from termresponse.
vim-patch:8.0.1008: slow updating of terminal window in Motif
vim-patch:8.0.1010: build failure without termresponse feature
vim-patch:8.0.1014: old compiler doesn't know uint32_t
vim-patch:8.0.1016: gnome terminal echoes t_RC
vim-patch:8.0.1021: older Gnome terminal still echoes t_RC
vim-patch:8.0.1026: GTK on-the-spot input has problems
vim-patch:8.0.1027: more terminals can't handle requesting cursor mode
vim-patch:8.0.1030: MS-Windows: wrong size computation in is_cygpty()
vim-patch:8.0.1033: detecting background color does not work in screen
vim-patch:8.0.1042: without the syntax feature highlighting doesn't work
vim-patch:8.0.1047: buffer overflow in Ruby
vim-patch:8.0.1059: older Gnome terminal returns smaller version number
vim-patch:8.0.1062: Coverity warnings in libvterm
vim-patch:8.0.1065: not all macro examples are included
vim-patch:8.0.1066: some terminals can't handle requesting cursor mode
vim-patch:8.0.1068: vandyke SecureCRT terminal can't handle cursor mode request
vim-patch:8.0.1069: still get CTRL-X sometimes
vim-patch:8.0.1071: putty-color and cygwin-color are not recognized
vim-patch:8.0.1094: using ssh from Terminal.app runs into xterm incompatibility
vim-patch:8.0.1110: FORTIFY_SOURCE from Perl causes problems
vim-patch:8.0.1111: syntax error in configure when using Perl
vim-patch:8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs
vim-patch:8.0.1136: W_WIDTH() is always the same
vim-patch:8.0.1152: encoding of error message wrong in Cygwin terminal
vim-patch:8.0.1155: Ruby command triggers a warning
vim-patch:8.0.1157: compiler warning on MS-Windows
vim-patch:8.0.1159: typo in #ifdef
vim-patch:8.0.1166: :terminal doesn't work on Mac High Sierra
vim-patch:8.0.1175: build failure without +termresponse
vim-patch:8.0.1192: MS-Windows: terminal feature not enabled by default
vim-patch:8.0.1195: can't build on MS-Windows
vim-patch:8.0.1198: older compilers don't know uint8_t
vim-patch:8.0.1211: cannot reorder tab pages with drag & drop
vim-patch:8.0.1247: not easy to find Debian build info
vim-patch:8.0.1248: stray + in README file
vim-patch:8.0.1255: duplicate badge README file
vim-patch:8.0.1256: typo in configure variable vim_cv_tgent
vim-patch:8.0.1258: 'ttymouse' is set to "sgr" even though it's not supported
vim-patch:8.0.1269: effect of autocommands on marks is not tested
vim-patch:8.0.1272: warnings for unused variables in tiny build
vim-patch:8.0.1273: old test file remaining
vim-patch:8.0.1303: 'ttymouse' is not set to "sgr" for Terminal.app and Iterm2
vim-patch:8.0.1306: ASAN error stack trace is not useful
vim-patch:8.0.1310: cproto generates errors because of missing type
vim-patch:8.0.1322: textformat test isn't run
vim-patch:8.0.1324: some xterm sends different mouse move codes
vim-patch:8.0.1325: more tests are not run
vim-patch:8.0.1327: new proto file missing from distribution
vim-patch:8.0.1337: typo in #ifdef
vim-patch:8.0.1369: MS-Windows: drawing underline slow, mFallbackDC not updated
vim-patch:8.0.1380: using "vim -r swapfile" the hit-enter prompt is misplaced.
vim-patch:8.0.1394: cannot intercept a yank command
vim-patch:8.0.1415: warning for unused function without timers feature
vim-patch:8.0.1424: the timer_pause test is flaky on Travis
vim-patch:8.0.1437: pkg-config doesn't work with cross compiling
vim-patch:8.0.1456: timer test on travis Mac is still flaky
vim-patch:8.0.1467: libvterm doesn't handle illegal byte sequence correctly
vim-patch:8.0.1478: unnecessary condition
vim-patch:8.0.1504: Win32: the screen may be cleared on startup
vim-patch:8.0.1506: new version of HP NonStop (Tandem) doesn't like a header
vim-patch:8.0.1532: compiler warnings without termguicolors feature
vim-patch:8.0.1556: may not parse the t_RS response correctly
vim-patch:8.0.1564: too many #ifdefs
vim-patch:8.0.1565: can't build Mac version without GUI
vim-patch:8.0.1566: too many #ifdefs
vim-patch:8.0.1567: cannot build Win32 GUI without IME
vim-patch:8.0.1571: can't build without GUI
vim-patch:8.0.1573: getwinpos(1) may cause response to be handled as command
vim-patch:8.0.1580: FEAT_CURSORBIND and FEAT_SCROLLBIND are unused
vim-patch:8.0.1581: cannot build Win32 GUI without +eval
vim-patch:8.0.1583: using C99 comment
vim-patch:8.0.1584: using C99 in Mac file gives compiler warning messages
vim-patch:8.0.1585: enabling beval_term feature in Win32 GUI
vim-patch:8.0.1586: imactivatefunc does not work on non-GUI Mac
vim-patch:8.0.1597: autocommand events are not sorted
vim-patch:8.0.1603: cannot build with +terminal but without +menu
vim-patch:8.0.1606: singular/plural variants not translated
vim-patch:8.0.1608: Win32: directx not enabled by default
vim-patch:8.0.1610: cannot build without GUI
vim-patch:8.0.1613: warning for unused variable in tiny build
vim-patch:8.0.1614: "make tags" doesn't include libvterm
vim-patch:8.0.1618: color Grey50 is missing in the compiled-in table
vim-patch:8.0.1625: test_quotestar is flaky when run in GTK GUI
vim-patch:8.0.1627: compiler warning for visibility attribute not supported
vim-patch:8.0.1635: undefining _POSIX_THREADS causes problems with Python 3
vim-patch:8.0.1639: libvterm code lags behind master
vim-patch:8.0.1646: MS-Windows: executable contains unreferenced functions
vim-patch:8.0.1650: too many #ifdefs
vim-patch:8.0.1659: scroll events not recognized for some xterm emulators
vim-patch:8.0.1663: cannot build without multi-byte feature
vim-patch:8.0.1674: libvterm can't handle an OSC string split
vim-patch:8.0.1675: unused macro argument in libvterm
vim-patch:8.0.1679: compiler warning for printf format
vim-patch:8.0.1683: Python upgrade breaks Vim when defining PYTHON_HOME
vim-patch:8.0.1686: Python does not work when configuring with specific dir
vim-patch:8.0.1692: Python may not work when using statically linked library
vim-patch:8.0.1696: coverage statistics don't work
vim-patch:8.0.1698: coverage statistics don't work on coveralls
vim-patch:8.0.1699: leftover stuff for Python 1.4
vim-patch:8.0.1700: coverage statistics still don't work on coveralls
vim-patch:8.0.1701: can disable COLOR_EMOJI with MSVC but not MinGW
vim-patch:8.0.1710: building with Ruby fails
vim-patch:8.0.1717: C89 check causes too much trouble
vim-patch:8.0.1719: cannot specify which Python executable configure should use
vim-patch:8.0.1730: no configure check for the used C99 features
vim-patch:8.0.1736: check for C99 features is incomplete
vim-patch:8.0.1737: fchown() used when it is not supported
vim-patch:8.0.1739: MS-Windows with msys2 cannot build Ruby statically
vim-patch:8.0.1741: MS-Windows with msys2 cannot build Ruby statically
vim-patch:8.0.1749: VMS: 100% CPU use, redefining mch_open() fails
vim-patch:8.0.1751: #ifdef causes bad highlighting
vim-patch:8.0.1755: MS-Windows: high unicode char received as two utf-16 words
vim-patch:8.0.1757: unnecessary changes in libvterm
vim-patch:8.0.1760: wrong number of arguments to vms_read()
vim-patch:8.0.1764: lgtm considers tutor.es to be EcmaScript
vim-patch:8.0.1785: missing symbol in Win32 small build
vim-patch:8.0.1788: tool to check a color scheme is not installed
vim-patch:8.0.1791: using uint8_t does not work everywhere
vim-patch:8.0.1813: Windows installer doesn't install terminal debugger
vim-patch:8.0.1825: might use NULL pointer when out of memory
vim-patch:8.0.1840: getwinpos() is not tested

vim-patch:8.0.0216: decoding js style json may fail
vim-patch:8.0.1391: encoding empty string to JSON sometimes gives "null"
vim-patch:8.0.1602: crash in parsing JSON
vim-patch:8.1.0343: #9041
2018-10-28 12:56:15 +01:00
e101cdb3d7 vim-patch:8.1.0498: /etc/gitconfig not recognized at a gitconfig file
Problem:    /etc/gitconfig not recognized at a gitconfig file.
Solution:   Add pattern to filetype detection. (closes vim/vim#3568)
d474686a09
2018-10-27 19:54:52 -04:00
b920412306 vim-patch:8.1.0484: some file types are not recognized
Problem:    Some file types are not recognized.
Solution:   Update the file type detection.
38654503b0
2018-10-27 19:53:17 -04:00
f1f036740a vim-patch:8.0.1465: python2 and python3 detection not tested
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
2018-10-27 19:53:17 -04:00
5ec671d541 vim-patch:8.0.1458: filetype detection test does not check all scripts
Problem:    Filetype detection test does not check all scripts.
Solution:   Add most scripts to the test
ddb349369d
2018-10-27 19:53:17 -04:00
a71a180df9 vim-patch:8.0.1457: clojure now supports a shebang line
Problem:    Clojure now supports a shebang line.
Solution:   Detect clojure script from the shebang line. (David Burgin,
            closes vim/vim#2570)
8fd2ffc530
2018-10-27 19:53:17 -04:00
43c88bb58c vim-patch:8.0.1438: filetype detection test not updated for change
Problem:    Filetype detection test not updated for change.
Solution:   Update the test.
0479e910c4
2018-10-27 19:53:17 -04:00
112a5b76e6 man.vim: lowercase title when invoked as $MANPAGER
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
2018-10-26 02:50:21 +02:00
4d7c7f96dd Merge pull request #9149 from bfredl/virt_cul
screen: show virt_text when 'cursorline' is set
2018-10-25 21:24:06 +02:00
d214e33e78 doc/:Man: "!" is special in some shells
ref https://github.com/neovim/neovim/issues/9156#issuecomment-433156463
2018-10-25 20:51:59 +02:00
edbe020bcb Merge pull request #9155 from bfredl/tabredraw
UI: add missing redraw after enter_tabpage
2018-10-25 19:03:40 +02:00
6994cc4d1a UI: add missing redraw after enter_tabpage
redraw_all_later() isn't guaranteed to update must_redraw after
switching tab, we must do it ourselves.

fixes #9152
2018-10-25 17:46:58 +02:00
c48c9828c3 screen.c: remove redundant wp->w_hl_attr_normal 2018-10-25 09:30:48 +02:00
662abd8451 screen: fix glitches with nvim_buf_set_virtual_text
- virtual text disappeared when 'cursorline' was set
- virtual text was shifted when emtpy line was visually selected.
2018-10-25 09:30:48 +02:00
c03a0f5fc8 man.vim: avoid duplicate buffers, E95
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
2018-10-25 04:09:53 +02:00
5fbc2eeac5 CI/Travis/macOS: use default Travis-provided python/pip
Despite #9095, `brew upgrade python` broke again, somehow.

We should not bother attempting to force a python version. Instead use
whatever python Travis provides on the macOS image.
2018-10-23 02:01:12 +02:00
6dae7776ed Merge #9145 'CI, nodejs fixes' 2018-10-22 21:52:51 +02:00
f20427451e Merge pull request #9143 from bfredl/nuclear
disable clearing almost everywhere, cleanup screen.c dead code
2018-10-22 14:53:45 +02:00
e598811e76 ui: disable clearing almost everywhere
Avoid clearing the screen in most situations. NOT_VALID should be
equivalent to CLEAR unless some external force messed up the terminal,
for these situations <c-l> and :mode will still clear the screen.

Also eliminate some obsolete code in screen.c, that dealt with that in
vim drawing window 1 can mess up window 2, but this never happens in
nvim.

But what about slow terminals? There is two common meanings in which
a terminal is said to be "slow":

Most commonly (and in the sense of vim:s nottyfast) it means low
bandwidth for sending bytes from nvim to the terminal. If the screen is
very similar before and after the update_screen(CLEAR) this change
should reduce bandwidth. If the screen is quite different, but there is
no new regions of contiguous whitespace, clearing doesn't reduce
bandwidth significantly. If the new screen contains a lot of whitespace,
it will depend of if vsplits are used or not: as long as there is no
vsplits, ce is used to cheaply clear the rest of the line, so
full-screen clear is not needed to reduce bandwith. However a left
vsplit currently needs to be padded with whitespace all the way to the
separator. It is possible ec (clear N chars) can be used to reduce
bandwidth here if this is a problem. (All of this assumes that one
doesn't set Normal guibg=... on a non-BCE terminal, if you do you are
doomed regardless of this change).

Slow can also mean that drawing pixels on the screen is slow. E-ink
screens is a recent example. Avoiding clearing and redrawing the
unchanged part of the screen will always improve performance in these
cases.
2018-10-22 11:59:02 +02:00
afd1d412fa auevents.lua: keep events in alphabetical order 2018-10-22 01:30:29 +02:00
b23759b4d7 provider/nodejs: fix npm,yarn detection
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.
2018-10-22 01:30:28 +02:00
db6521a560 test: fix/speedup scrollback_spec
- fix: Use "set PROMPT=$" trick to satisfy screen:expect{any='%$'}
- speedup: Use cmd.exe instead of powershell.
2018-10-22 01:30:28 +02:00
a7b17d4b3e CI/AppVeyor: invalidate .deps if build.ps1 changes 2018-10-22 01:28:02 +02:00
57ff96be8e CI/AppVeyor: fix MSBuild hack for functional tests
PR #9087 changed the error string by removing 'Running', breaking the
MSBuild hack detecting failure for functional tests. If stdout or stderr
has a line with 'functional tests failed with error', fail the build.
2018-10-22 01:28:02 +02:00
565bbd1485 Merge #9146 from justinmk/fix-warnings 2018-10-21 23:48:43 +02:00
11ae6f418d fix warning: null arg passed to 'nonnull' param
Found by clang scan-build 5.0
2018-10-21 23:25:02 +02:00
902ca26856 fix warning: null arg passed to 'nonnull' param
Found by clang scan-build 5.0
2018-10-21 23:24:59 +02:00
f97496a21c fix warning: "Assigned value is garbage"
clang scan-build noticed that find_command() may bitmask `eap->flags`.
cmd_can_preview() only uses `ea.cmdidx`, but let's fix the warning...

Found by clang scan-build 5.0
2018-10-21 23:24:54 +02:00
2afebc4e5f fix warning: "Dead assignment"
`tv` is passed to the TYPVAL_ENCODE_CONV_FUNC_BEFORE_* macros, which
don't appear to actually use that parameter.

Found by clang scan-build 5.0
2018-10-21 23:24:50 +02:00
a8422818a7 fix warning: null pointer dereference
Found by clang scan-build 5.0
2018-10-21 23:24:46 +02:00
e0f6f46c1b fix warning: garbage/uninitialized value
According to clang scan-build, `fromcol` could be uninitialized at line
2645.

Found by clang scan-build 5.0
2018-10-21 23:24:40 +02:00
863dbbb3d4 fix warning: "Uninitialized argument"
clang scan-build thinks os_system() could set `do_profiling` flag.

Found by clang scan-build 5.0
2018-10-21 23:24:21 +02:00
25bc656988 Merge pull request #9144 from bfredl/ui_event_compat
api/ui: verify compatibility of UI events
2018-10-21 22:01:50 +02:00
bcab880bb6 api/ui: verify compatibility of UI events 2018-10-21 20:36:52 +02:00
f895b47d3f man.vim: :Man! operates on buffer contents (#9139)
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
2018-10-21 17:38:25 +02:00
b227a3c8d3 Merge #9141 from justinmk/pvs 2018-10-21 17:01:14 +02:00
bbd8f4e9a4 tui.c: Fix ext.set_underline_color for !has_colon_rgb
PVS/V523: The 'then' statement is equivalent to the 'else' statement.
2018-10-20 23:09:49 +02:00
92f98b5bdf screen.c: Fix PVS/V560: condition is always false 2018-10-20 23:09:49 +02:00
1cf50cbfd9 provider/nodejs: Simultaneously query npm and yarn #9054
ref #9001

Instead of serially querying npm and yarn for neovim, start both as a
job and then wait for a successful result from either.
2018-10-18 20:32:44 +02:00
edcf640f59 Merge #9130 'build: Fix for macOS 10.14/mojave'
fix #9050

Q: (from From #7891)
  > It turns out there's a difference between executing
  > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
  > and /usr/bin/clang. CMake was picking up the former and with that it left off
  > a key include path. Why?

A: /usr/bin/clang is a shim that uses libxcselect/libxcrun under the hood.
   $ otool -L /usr/bin/clang
   /usr/bin/clang:
    /usr/lib/libxcselect.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)

From https://macops.ca/developer-binaries-on-os-x-xcode-select-and-xcrun/ :
  > this shim binary loads functions in libxcselect.dylib that can locate the
  > path to the real binary, depending on how the system has been configured. One
  > part of this process is to check whether this path contains
  > usr/lib/libxcrun.dylib, and the xcrun tool, in which case it will invoke
  > xcrun to run the binary.
  > ...
  > (If all of this isn’t yet enough indirection for you, /usr/bin/xcrun itself
  > is a shim, and so libxcselect.dylib contains code to detect whether the
  > executed xcrun is a shim. Look for the __xcrun_shim segment in the __DATA
  > section output by the command: pagestuff /usr/bin/xcrun -a.)
2018-10-18 01:28:17 +02:00
3059516e8a Merge #9086 'vim-patch:8.1.0448' 2018-10-18 00:47:30 +02:00
31f63c8d55 build/macOS: provide SDK path to deps compiler
otherwise, system headers cannot be found on Mojave
they were moved from /usr/include to SDK path
2018-10-17 16:26:28 +03:00
913588466d build/macOS: fix luajit install step
prevent luajit to assigning default value to MACOSX_DEPLOYMENT_TARGET
ref #9050
2018-10-17 16:26:19 +03:00
aff64b3a52 Merge #9124 'vim-patch:8.0.1672' 2018-10-17 09:51:09 +02:00
9642903dea test: Improve 008_autocommands_spec reliability (#9129)
Sometimes 008_autocommands_spec fails like this:

    [ RUN      ] autocommands that delete and unload buffers: BufUnload, VimLeave: -- Output to stderr:
    CMake Error at /home/travis/build/neovim/neovim/cmake/RunTests.cmake:53 (message):
      functional tests failed with error: 1

The final :quit + wait() is a race. Use command() instead, which is
synchronous.  Use command('silent! ...') everywhere else too, because
it's clearer instead of feeding input and clearing the expected errors
with CTRL-L.
2018-10-17 09:24:45 +02:00
2d531d296f Merge #9131 from janlazo/vim-8.0.0670 2018-10-17 08:13:09 +02:00
e311b019a1 Merge pull request #6930 from bfredl/expectfix
tests: detect and fix fragile sceen tests, and mark intentional unchanged expect():s
2018-10-16 23:34:11 +02:00
090008f311 vim-patch:8.0.1067: try/catch in timer does not prevent it from being stopped
Problem:    Using try/catch in timer does not prevent it from being stopped.
Solution:   Reset the exception context and use did_emsg instead of
            called_emsg.
e723c42836
2018-10-16 00:03:13 -04:00
7d7691e85f vim-patch:8.0.0670: can't use input() in a timer callback
Problem:    Can't use input() in a timer callback. (Cosmin Popescu)
Solution:   Reset vgetc_busy and set timer_busy. (Ozaki Kiichi, closes vim/vim#1790,
            closes vim/vim#1129)
1e8e14552e
2018-10-15 21:22:43 -04:00
6476d081be test/old: stub CanRunVimInTerminal() 2018-10-16 00:26:01 +02:00
ee94eecbd4 vim-patch:8.1.0448: cursorline not removed when using 'cursorbind'
Problem:    Cursorline not removed when using 'cursorbind'. (Justin Keyes)
Solution:   Store the last cursor line per window. (closes vim/vim#3488)
4a5abbd613
2018-10-16 00:15:09 +02:00
c8810a51a3 tests: improve robustness of immediate successes in screen tests 2018-10-15 20:13:11 +02:00
8fd092f3ff vim-patch:8.1.0476: memory leaks in test_escaped_glob (#9127)
Problem:    Memory leaks in test_escaped_glob.
Solution:   Avoid failure when running the shell, use the sandbox.
a2aad02830
2018-10-14 16:23:46 -07:00
9c2d5f1a33 functionaltest: map error does not cancel prompt 2018-10-14 09:08:56 -04:00
e568ac7a68 Merge pull request #9123 from jamessan/unibilium-parsing-fix
third-party/unibilium: Fix parsing of extended capability entries
2018-10-13 22:11:58 -04:00
e7ba325298 vim-patch:8.0.1672: error during completion causes command to be cancelled
Problem:    Error during completion causes command to be cancelled.
Solution:   Reset did_emsg before waiting for another character. (Tom M.)
72532d354e
2018-10-13 21:47:41 -04:00
399864157b third-party/unibilium: Fix parsing of extended capability entries
In the 20180331 release, the format was slightly changed:

> 20180331
>         + improve terminfo write/read by modifying the fourth item of the
>           extended header to denote the number of valid strings in the extended
>           string table (prompted by a comment in unibilium's sources).

Since the number of valid string capabilities is not necessarily the
same as extstrslen, it's not possible to sanity check the total number
of items up front anymore.
2018-10-13 20:24:02 -04:00
c9baaa9200 Merge #9095 'CI/travis/macOS: fix missing pip3' 2018-10-13 15:59:49 -07:00
aa87dd2b89 Merge #9122 from janlazo/vim-8.1.0473 2018-10-13 14:40:16 -07:00
78418e17e9 CI/travis/macOS: silence non-error messages from homebrew
Reduces the log size by 11% (1100/9670 lines).
2018-10-13 23:34:49 +02:00
3d2493a3fd CI/travis/macOS: use "sudo rm" to remove cores
After bumping Travis macOS to 10.13, it now hangs at:

    + check_core_dumps --delete quiet
    + local del=
    + test --delete = --delete
    + del=1
    + shift
    + local app=quiet
    + test osx = osx
    ++ find /cores/ -type f -print
    + local 'cores=/cores//core.554
    /cores//core.641
    /cores//core.801'
    + test -z '/cores//core.554
    /cores//core.641
    /cores//core.801'
    + local core
    + for core in '$cores'
    + test 1 = 1
    + print_core quiet /cores//core.554
    + local app=quiet
    + local core=/cores//core.554
    + test quiet = quiet
    + echo 'Found core /cores//core.554'
    Found core /cores//core.554
    + return 0
    + rm /cores//core.554
    override r--------  root/admin for /cores//core.554?

The cores are always present on the Travis macOS 10.13 image! Hilarious.
2018-10-13 23:34:49 +02:00
e39dade80b test: adjust timer tests
Timer tests are less reliable on Travis CI macOS 10.12 (most egregious).
Also somewhat on 10.13.
2018-10-13 23:34:49 +02:00
12376cc01c memline: process_still_running is bool 2018-10-13 17:16:42 -04:00
726baefdf7 vim-patch:8.1.0473: user doesn't notice file does not exist when swap file does
Problem:    User doesn't notice file does not exist when swap file does.
Solution:   Add a note that the file cannot be found.  Make the "still
            running" notice stand out.
d6105cb408
2018-10-13 17:13:47 -04:00
0995f460fb CI/travis/macOS: fix missing pip3
homebrew or Travis changed something, now `pip3` isn't in $PATH.
`ls /usr/local/opt/python/libexec/bin` confirmed this, no matter what
brew reinstall/relink/upgrade are used.

Bumping the macOS image to 10.12 or 10.13 makes the problem go away.

    ==> Processing gcc49 formula rename to gcc@4.9
    ==> Unlinking gcc49
    ==> Moving gcc49 versions to /usr/local/Cellar/gcc@4.9
    ==> Relinking gcc@4.9
    Warning: gcc@4.9 is outdated!
    To avoid broken installations, as soon as possible please run:
      brew upgrade
    Or, if you're OK with a less reliable fix:
      brew upgrade gcc@4.9
    python info:
      Python 2.7.12
      Python 2.7.12
      ci/before_install.sh: line 18: python3: command not found
      pip 8.1.2 from /usr/local/lib/python2.7/site-packages (python 2.7)
      pip 8.1.2 from /usr/local/lib/python2.7/site-packages (python 2.7)
      ci/before_install.sh: line 21: pip3: command not found
      pyenv versions:
      * system (set by /Users/travis/.pyenv/version)
    Upgrade Python 3.
    To restore the stashed changes to /usr/local/Homebrew run:
      'cd /usr/local/Homebrew && git stash pop'
    ==> Caveats
    Python has been installed as
      /usr/local/bin/python3
    Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
    `python3`, `python3-config`, `pip3` etc., respectively, have been installed into
      /usr/local/opt/python/libexec/bin
    If you need Homebrew's Python 2.7 run
      brew install python@2
    Pip, setuptools, and wheel have been installed. To update them run
      pip3 install --upgrade pip setuptools wheel
    You can install Python packages with
      pip3 install <package>
    They will install into the site-package directory
      /usr/local/lib/python3.7/site-packages
    See: https://docs.brew.sh/Homebrew-and-Python
    ==> Summary
    º  /usr/local/Cellar/python/3.7.0: 8,864 files, 153.8MB, built in 6 minutes 32 seconds
    ...
    Upgrade Python 3 pip.
    ci/before_install.sh: line 30: pip3: command not found
    travis_time🔚0d23f522:start=1538818824750644000,finish=1538819451424021000,duration=626673377000
    The command "ci/before_install.sh" failed and exited with 127 during .
    Your build has been stopped.
    /Users/travis/.travis/job_stages: line 373: shell_session_update: command not found

    ==> Processing gcc49 formula rename to gcc@4.9
    ==> Unlinking gcc49
    ==> Moving gcc49 versions to /usr/local/Cellar/gcc@4.9
    ==> Relinking gcc@4.9
    Warning: gcc@4.9 is outdated!
    To avoid broken installations, as soon as possible please run:
      brew upgrade
    Or, if you're OK with a less reliable fix:
      brew upgrade gcc@4.9
    python info:
      Python 2.7.12
      Python 2.7.12
      ci/before_install.sh: line 18: python3: command not found
      pip 8.1.2 from /usr/local/lib/python2.7/site-packages (python 2.7)
      pip 8.1.2 from /usr/local/lib/python2.7/site-packages (python 2.7)
      ci/before_install.sh: line 21: pip3: command not found
      pyenv versions:
      * system (set by /Users/travis/.pyenv/version)
    Upgrade Python 3.
    To restore the stashed changes to /usr/local/Homebrew run:
      'cd /usr/local/Homebrew && git stash pop'
    ==> Caveats
    Python has been installed as
      /usr/local/bin/python3
    Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
    `python3`, `python3-config`, `pip3` etc., respectively, have been installed into
      /usr/local/opt/python/libexec/bin
    If you need Homebrew's Python 2.7 run
      brew install python@2
    Pip, setuptools, and wheel have been installed. To update them run
      pip3 install --upgrade pip setuptools wheel
    You can install Python packages with
      pip3 install <package>
    They will install into the site-package directory
      /usr/local/lib/python3.7/site-packages
    See: https://docs.brew.sh/Homebrew-and-Python
    ==> Summary
    º  /usr/local/Cellar/python/3.7.0: 8,864 files, 153.8MB, built in 6 minutes 32 seconds
    ...
    Upgrade Python 3 pip.
    ci/before_install.sh: line 30: pip3: command not found
    travis_time🔚0d23f522:start=1538818824750644000,finish=1538819451424021000,duration=626673377000
    The command "ci/before_install.sh" failed and exited with 127 during .
    Your build has been stopped.
    /Users/travis/.travis/job_stages: line 373: shell_session_update: command not found
2018-10-13 22:33:01 +02:00
d14283c7a0 Merge #9118 2018-10-13 21:07:54 +02:00
717e2db274 Revert "vim-patch:8.0.0971: 'winptydll' missing from :options"
Revert f4e2df4527.
We don't support 'winptydll' and probably don't have any reason to.
2018-10-13 21:06:26 +02:00
79a11ecfd3 Merge pull request #9121 from bfredl/virt_invalid
API: make nvim_buf_set_virtual_text handle invalid chars
2018-10-13 20:15:28 +02:00
824f36a980 vim-patch:8.0.1590: padding in list type wastes memory (#9119)
Problem:    Padding in list type wastes memory.
Solution:   Reorder struct members to optimize padding. (Dominique Pelle,
            closes vim/vim#2704)
1a84024037
2018-10-13 10:56:20 -07:00
bddcbbb571 signs: Add "numhl" argument #9113
close #9113
ref #9040
2018-10-13 19:39:56 +02:00
3d84cf6ff4 api: make nvim_buf_set_virtual_text handle invalid chars
Clients are supposed to supply only valid text, but if it is
invalid, translate it rather than messing up the screen
2018-10-13 16:37:17 +02:00
8bbb28b973 Merge pull request #8968 from ckelsel/vim-8.0.0685
[RFC] vim-patch:8.0.0685
2018-10-12 22:04:39 -04:00
64b44018fa vim-patch:8.0.1843: entry for 'wrap' in options window is wrong
Problem:    Entry for 'wrap' in options window is wrong. (John Little)
Solution:   Make the change apply locally.
8776889b5b
2018-10-12 21:55:53 -04:00
3736f14896 vim-patch:8.0.1547: undo in the options window makes it empty
Problem:    Undo in the options window makes it empty.
Solution:   Set 'undolevels' while filling the buffer. (Yasuhiro Matthew,
            closes vim/vim#2645)
9c474b2773
2018-10-12 21:52:33 -04:00
f4e2df4527 vim-patch:8.0.0971: 'winptydll' missing from :options
Problem:    'winptydll' missing from :options.
Solution:   Add the entry.
0aed9a2e2e
2018-10-12 21:49:22 -04:00
aeda13cfdf vim-patch:8.0.0685: when conversion fails written file may be truncated
Problem:    When making backups is disabled and conversion with iconv fails
            the written file is truncated. (Luo Chen)
Solution:   First try converting the file and write the file only when it did
            not fail. (partly by Christian Brabandt)
e6bf655bc4
2018-10-12 19:49:14 -04:00
4c780d663f Merge pull request #9114 from nono/vim-2f0584910c0e
vim-patch:2f0584910c0e
2018-10-12 15:39:36 -04:00
b26411bacd Merge pull request #9117 from nono/vim-25a6e8a769aa
vim-patch:25a6e8a769aa
2018-10-12 15:39:07 -04:00
b5e3fec621 vim-patch:2f0584910c0e
Update runtime files
2f0584910c
2018-10-12 21:33:13 +02:00
942f3587c3 vim-patch:25a6e8a769aa
Small runtime update
25a6e8a769
2018-10-12 21:28:32 +02:00
167b72a647 vim-patch:8.0.1489: there is no easy way to get the global directory (#9109)
Problem:    There is no easy way to get the global directory, esp. if some
            windows have a local directory.
Solution:   Make getcwd(-1) return the global directory. (Andy Massimino,
            closes vim/vim#2606)
5459129af2
2018-10-12 21:25:00 +02:00
15a71338e3 Merge #8902 'doc' 2018-10-12 17:44:44 +02:00
fb043f8ea3 Merge pull request #9096 from nono/vim-7f2e9d7c9cdf
vim-patch:7f2e9d7c9cdf
2018-10-11 22:24:52 -04:00
e52293757a doc: manpage: formatting, update --headless 2018-10-11 19:32:44 +02:00
ea12efa66b doc: mouse: cleanup, fixup
- 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
2018-10-11 19:32:44 +02:00
ab69944978 doc/develop.txt: brevity
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.
2018-10-11 19:32:44 +02:00
b12c20e466 doc: emphasize that "python" means "python 2" 2018-10-11 19:32:44 +02:00
b11f5aa119 doc: xdg, MAINTAIN.md, channel-id, job control
- tutor: emphasize K
2018-10-11 19:32:31 +02:00
384770556b Merge #9106 from janlazo/vim-8.0.1837
vim-patch:8.0.1837
2018-10-11 08:58:43 +02:00
2bf1aa5628 vim-patch:8.0.1777: cannot cleanup before loading another colorscheme (#9104)
Problem:    Cannot cleanup before loading another colorscheme.
Solution:   Add the ColorSchemePre autocommand event.
60a68362aa
2018-10-11 08:27:37 +02:00
0cd786b905 lint 2018-10-10 23:26:26 -04:00
25baeb39e3 vim-patch:8.0.1837: one character cmdline abbreviation not triggered after '<,'>
Problem:    One character cmdline abbreviation not triggered after '<,'>.
Solution:   Skip over the special range. (Christian Brabandt, closes vim/vim#2320)
5e3423d192
2018-10-10 23:24:38 -04:00
e17e21e4cf vim-patch:8.1.0468: MS-Windows: filter command with pipe character fails (#9101)
Problem:    MS-Windows: Filter command with pipe character fails. (Johannes
            Riecken)
Solution:   Find the pipe character outside of quotes. (Yasuhiro Matsumoto,
            closes vim/vim#1743, closes vim/vim#3523)
0664089ecc
2018-10-10 11:32:21 +02:00
8c7c8f5962 Merge #8954 from janlazo/vim-8.0.1423 2018-10-10 11:20:43 +02:00
0394cb23e9 lint 2018-10-09 21:55:35 -04:00
c2e7f39528 vim-patch:8.0.1423: error in return not caught by try/catch
Problem:    Error in return not caught by try/catch.
Solution:   Call update_force_abort(). (Yasuhiro Matsomoto, closes vim/vim#2483)
fabaf753e2
2018-10-09 21:38:33 -04:00
f4b2b66661 Merge pull request #9079 from bfredl/tui_cursor
TUI cursor fixes: avoid memory errors after resize with invalid cursor position
2018-10-09 12:21:17 +02:00
2c680a5854 vim-patch:8.0.1779: deleting in a block selection causes problems (#9099)
Problem:    Deleting in a block selection causes problems.
Solution:   Check the length of the line before adding bd.textcol and
            bd.textlen. (Christian Brabandt, closes vim/vim#2825)
35e802e713
2018-10-09 09:04:51 +02:00
85e8fd96f4 Merge #9098 'vim-patch:8.1.{459,463,466}' 2018-10-09 09:02:26 +02:00
f181efdeaf vim-patch:8.1.0466: autocmd test fails
Problem:    Autocmd test fails.
Solution:   Do call inchar() when flushing typeahead.
6a2633b00b
2018-10-08 21:14:07 -04:00
573567aef6 vim-patch:8.1.0463: "simalt ~x" in .vimrc blocks swap file prompt
Problem:    "simalt ~x" in .vimrc blocks swap file prompt.
Solution:   Flush buffers before prompting. (Yasuhiro Matsumoto,
            closes vim/vim#3518, closes vim/vim#2192)
798184cc67
2018-10-08 17:58:35 -04:00
c64d6702e5 vim-patch:8.1.0459: Test_executable fails when there is a dog in the system
Problem:    Test_executable fails when there is a dog in the system.
Solution:   Rename the dog. (Hirohito Higashi)
a05a0d325c
2018-10-08 16:35:46 -04:00
05cbe0da30 Merge #9092 from janlazo/vim-8.0.1807 2018-10-08 21:04:46 +02:00
1892d28c60 oldtests: win: fix executable() assertions
Windows has "Read and execute" permission via ACL
but nvim and libuv do not support ACL.
Windows does not support the executable bit in chmod-style permissions
but it is safe to assume that if the file exists and is readable,
then it is most likely executable.
This means that win.ini and shell32.dll are "executable"
because they exist, are readable, and are in PATH.

PATHEXT does not affect the executable permission of a file;
it exists to run files on the shell while omitting the file extension.
Assume that PATHEXT is intended for cmd.exe only
because powershell can execute powershell files (ie. *.ps1)
without changing PATHEXT or related cmd.exe environment variable.

In the future, nvim should check the outputs of 'assoc' and 'ftype',
cmd.exe internal commands, or check the registry.
Powershell can be used for ACL if C++/C# API is too difficult to use.
2018-10-08 12:34:24 -04:00
512e0caae2 Merge #9036 'func_attr_printf' 2018-10-07 19:36:01 +02:00
6a29a7bfb0 vim-patch:7f2e9d7c9cdf
Update runtime files.
7f2e9d7c9c
2018-10-07 17:35:24 +02:00
f25f42bf03 vim-patch:8.1.0453: MS-Windows: executable() is not reliable
Problem:    MS-Windows: executable() is not reliable.
Solution:   Use $PATHEXT properly. (Yasuhiro Matsumoto, closes vim/vim#3412)
8295666dc2
2018-10-07 10:30:29 -04:00
2c84421de2 src/nvim/eval.c
src/nvim/eval/typval.c
src/nvim/fileio.c
src/nvim/main.c
src/nvim/regexp_nfa.c
src/nvim/spellfile.c

changed some EMSG[..] Macros to emsgf
2018-10-07 12:24:29 +02:00
f95e0ae926 build: adjust some messages (#9087) 2018-10-06 18:45:34 +02:00
ab3a4a4896 vim-patch:8.1.0454: resolve() was not tested with a symlink cycle
Problem:    resolve() was not tested with a symlink cycle.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3513)
2610990709
2018-10-06 11:42:15 -04:00
22804c66a5 vim-patch:8.0.1807: function to set terminal name is too long
Problem:    Function to set terminal name is too long.
Solution:   Refactor the function.  Fix typo in test.
69e056915c
2018-10-06 11:36:12 -04:00
6fe9a12268 Merge #9090 'clint.py: --stdin-filename' 2018-10-06 15:17:52 +02:00
075dc42fb2 test: replace wait() with pre-assertion in assert_term_colors 2018-10-06 11:36:09 +02:00
1bf83ea8e1 TUI: delete "first-row" workaround after resize
This was caused by cursor position being invalid right
after tui_grid_resize, which is now fixed
2018-10-06 11:36:08 +02:00
cc305213d7 TUI: always use safe cursor movement after resize
The old code could lead to a memory error in the following situation:

0. The previous cursor position was row 50 since before, on a grid
larger than 50 rows.
1. grid_resize changes the grid height to 40, and invalidly assumes the
resize moved the physical cursor to row 0
2. Some event used a operation that could move the cursor (such as clear), and
then reset the cursor to the "true" position row 50 (pointless after #8221, but
I forgot to remove it)
3. raw_line/cheap_to_print is invoked, and tries to inspect the grid at
row 50 (memory error)
4. grid_cursor_goto would have been called at this point, and set a
valid cursor position 0-39.
2018-10-06 11:29:51 +02:00
1e7eb20c91 clint: add support for --stdin-filename 2018-10-05 23:14:14 +02:00
2351b931dd clint: use fileinput for stdin
Fixes handing of "-" on Python 3:

    Traceback (most recent call last):
      File "…/Vcs/neovim/src/clint.py", line 3625, in <module>
        main()
      File "…/Vcs/neovim/src/clint.py", line 3618, in main
        ProcessFile(filename, _cpplint_state.verbose_level)
      File "…/Vcs/neovim/src/clint.py", line 3464, in ProcessFile
        'replace').read().split('\n')
      File "/usr/lib/python3.7/codecs.py", line 701, in read
        return self.reader.read(size)
      File "/usr/lib/python3.7/codecs.py", line 500, in read
        data = self.bytebuffer + newdata
    TypeError: can't concat str to bytes
2018-10-05 23:13:44 +02:00
39ad99b594 TUI: check libvte version for undercurl support #9088
Support was added in https://github.com/GNOME/vte/commit/efaf8f3c.

Fixes #9083
2018-10-05 14:54:04 +02:00
c05982cf35 vim-patch.sh: Skip Vim screen-dump files 2018-10-05 09:51:38 +02:00
c1c5c4f8e4 vim-patch:8.1.0440: remove() with a range not sufficiently tested (#9076)
Problem:    remove() with a range not sufficiently tested.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3497)
2bfddfc508
2018-10-04 18:40:59 +02:00
79b358facd Merge #9078 from janlazo/vim-8.0.1832 2018-10-04 11:43:56 +02:00
94e585944d Merge pull request #9081 from jamessan/embed-crash
Fix crash if --embed is used more than once
2018-10-03 10:04:54 -04:00
eb7b2c7912 Fix crash if --embed is used more than once 2018-10-03 07:29:08 -04:00
c0d835764f vim-patch:8.1.0047: no completion for :unlet $VAR
Problem:    No completion for :unlet $VAR.
Solution:   Add completion. (Jason Franklin)
1983401088
2018-10-02 22:47:47 -04:00
07fbdf4acc vim-patch:8.0.1832: cannot use :unlet for an environment variable
Problem:    Cannot use :unlet for an environment variable.
Solution:   Make it work.  Use unsetenv() if available.
            (Yasuhiro Matsumoto, closes vim/vim#2855)
137374fd65
2018-10-02 20:44:48 -04:00
65206714bc TUI: fix support for undercurl/underline color #9080 2018-10-03 00:35:25 +02:00
14ae394532 Merge pull request #9052 from blueyed/undercurl
tui: add support for undercurl and colored underline
2018-10-02 15:10:47 +02:00
171c80e227 Merge pull request #9064 from bfredl/uidoc
UI: rename ext_newgrid to ext_linegrid and add --embed UI startup recommendations
2018-10-02 10:55:47 +02:00
bab3b0ad45 ui: reserve the right to split a screen redraw into multiple batches. 2018-10-02 10:52:37 +02:00
43823acae2 ui: rename ext_newgrid to ext_linegrid 2018-10-01 21:24:15 +02:00
b98af01260 ui: update docs for safe startup procedure 2018-10-01 21:24:15 +02:00
c4006a621e tui: add support for undercurl and underline color
Fixes https://github.com/neovim/neovim/issues/7479.
2018-10-01 16:22:26 +02:00
8ac44984c4 Revert "TUI: terminfo_start: use unibi_from_term directly"
If $TERM is not defined then unibi_from_term() would crash.

Reverts 3bdc34d065.
ref #9072
2018-10-01 00:42:19 +02:00
e2647366c9 Merge pull request #9073 from blueyed/vim-patch-ff
vim-patch.sh: use --ff with git-pull
2018-09-30 18:36:19 -04:00
c2f337ce97 vim-patch.sh: use --ff with git-pull
I have `merge.ff = no` in my Git config to not use fast-forward merges
by default, but when updating the Vim sources it should not cause a
merge commit.

[ci skip]
2018-09-30 21:05:26 +02:00
3bdc34d065 TUI: terminfo_start: use unibi_from_term directly (#9072)
Avoids redundant call to `getenv("TERM")`.

Ref: e3b16d6219/uniutil.c (L203-L211)
2018-09-30 20:39:45 +02:00
3999aa755e man.vim: set $MANWIDTH=999
On some systems, mandoc disallows $MANWIDTH greater than 1000.
E.g. FreeBSD:
b7d613ae8a/contrib/mandoc/manpath.c (L312)

closes #9065
2018-09-30 18:35:19 +02:00
6c496db4b7 undo: Fix infinite loop if undo_read_byte returns EOF #2880
Problem:  Corrupt(?) persistent undofile leads to an infinite loop.
Solution: Break out of loop if undo_read_byte returns EOF (cf.
          u_read_undo() which does this too).

backtrace from lldb (@ a743297be2):

    Process 70700 stopped
    * thread 1: tid = 0x147d2d1, 0x00007fff8c8facd7 libsystem_pthread.dylib`__mtx_droplock + 209, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
        frame 0: 0x00007fff8c8facd7 libsystem_pthread.dylib`__mtx_droplock + 209
    libsystem_pthread.dylib`__mtx_droplock + 209:
    -> 0x7fff8c8facd7:  movq   %rcx, -0x50(%rbp)
       0x7fff8c8facdb:  movq   %r8, -0x58(%rbp)
       0x7fff8c8facdf:  movq   %rdx, -0x68(%rbp)
       0x7fff8c8face3:  movq   %r14, -0x60(%rbp)
    (lldb) bt
    * thread 1: tid = 0x147d2d1, 0x00007fff8c8facd7 libsystem_pthread.dylib`__mtx_droplock + 209, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
      * frame 0: 0x00007fff8c8facd7 libsystem_pthread.dylib`__mtx_droplock + 209
        frame 1: 0x00007fff8c8fab4e libsystem_pthread.dylib`pthread_mutex_unlock + 63
        frame 2: 0x00007fff915da2a4 libsystem_c.dylib`getc + 63
        frame 3: 0x000000010e6194b9 nvim`undo_read_byte(bi=0x00007fff5181a838) + 25 at undo.c:1553
        frame 4: 0x000000010e619685 nvim`unserialize_uhp(bi=0x00007fff5181a838, file_name=0x000000000f2e8060) + 421 at undo.c:840
        frame 5: 0x000000010e618abb nvim`u_read_undo(name=0x0000000000000000, hash=0x00007fff5181af80, orig_name=0x000000000f370dd0) + 1579 at undo.c:1363
        frame 6: 0x000000010e4a8db9 nvim`readfile(fname=0x000000000f370dd0, sfname=0x000000000f370dd0, from=0, lines_to_skip=0, lines_to_read=2147483647, eap=0x00007fff5181b6a0, flags=1) + 21017 at fileio.c:
    1961
        frame 7: 0x000000010e3ecc8b nvim`open_buffer(read_stdin=0, eap=0x00007fff5181b6a0, flags=0) + 603 at buffer.c:153
    ...

closes #2879
closes #2880
2018-09-30 17:54:24 +02:00
84fcba9b01 editorconfig: Fix charset name #9070
According to
https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
the possible values of the charset property are "latin1", "utf-8",
"utf-16be", "utf-16le", or "utf-8-bom" (case insensitive), not "utf_8"

It breaks https://github.com/sgur/vim-editorconfig/ for example.
2018-09-30 17:02:19 +02:00
4c57169745 dialog_changed: Remove mistaken assert #9069
It fails with `nvim -u NONE -c 'set modified' -c 'confirm q'`.

Introduced in 3dffc842f (vim-patch:8.0.0983), but the Vim patch [1] does not
have this assertion.

NULL gets handled in `dialog_msg` [2].

1: 3f9a1ff141
2: c6d36b97ba/src/nvim/ex_docmd.c (L9704-L9705)
2018-09-30 15:47:02 +02:00
c6d36b97ba Merge #9067 from janlazo/vim-8.0.1485 2018-09-30 14:48:29 +02:00
9dcd5bd9c5 vim-patch:8.1.0067: syntax highlighting not working when re-entering a buffer
Problem:    Syntax highlighting not working when re-entering a buffer.
Solution:   Do force executing autocommands when not called recursively.
a5616b0136
2018-09-30 02:58:34 -04:00
6a680548ec vim-patch:8.1.0066: nasty autocommand causes using freed memory
Problem:    Nasty autocommand causes using freed memory. (Dominique Pelle)
Solution:   Do not force executing autocommands if the value of 'syntax' or
            'filetype' did not change.
c3ffc9b8d3
2018-09-30 02:51:04 -04:00
33ef959814 vim-patch:8.1.0068: nasty autocommands can still cause using freed memory
Problem:    Nasty autocommands can still cause using freed memory.
Solution:   Disallow using setloclist() and setqflist() recursively.
2f82ca7d79
2018-09-30 02:06:43 -04:00
cf7e351c24 lint 2018-09-29 22:11:50 -04:00
458a6f58b6 globals: arg_had_last is bool 2018-09-29 16:53:55 -04:00
63b1a7d0cf vim-patch:8.0.1485: weird autocmd may cause arglist to be changed recursively
Problem:    Weird autocmd may cause arglist to be changed recursively.
Solution:   Prevent recursively changing the argument list. (Christian
            Brabandt, closes vim/vim#2472)
9e33efd152
2018-09-29 16:45:51 -04:00
6e146d4132 test: check_cores(): Fix tmp dir exclusion (#9061)
tmpdir_get() may be an absolute path, but we invoke glob() with
a relative `initial_path`.

That can lead to this error:

    [  ERROR   ] test/functional/helpers.lua @ 752: after_each
    test/helpers.lua:95: cannot open ./Xtest-tmpdir/nvim8jKCjR: No such file or directory
    stack traceback:
            test/helpers.lua:95: in function 'glob'
            test/helpers.lua:273: in function 'check_cores'
            test/functional/helpers.lua:757: in function <test/functional/helpers.lua:752>
2018-09-28 08:58:22 +02:00
b09f173d93 vim-patch:8.1.0416: sort doesn't report deleted lines (#9062)
Problem:    Sort doesn't report deleted lines.
Solution:   Call msgmore(). (Christian Brabandt, closes vim/vim#3454)
b0e982bf05
2018-09-28 08:56:54 +02:00
64a8a8fd22 Merge pull request #9056 from bfredl/tui_repr
TUI code simplification and dead code elimination
2018-09-27 12:59:31 +02:00
33887206b9 Merge #9060 from janlazo/vim-8.1.0120 2018-09-27 10:47:37 +02:00
ba17bcfefc vim-patch:8.1.0435: cursorline highlight not removed in some situation (#9059)
Problem:    Cursorline highlight not removed in some situation. (Vitaly
            Yashin)
Solution:   Reset last_cursorline when resetting 'cursorline'. (Christian
            Brabandt, closes vim/vim#3481)
8c63e0ec31
2018-09-27 10:33:39 +02:00
a1976c7390 man.vim: Start at the top #9023
fixes #9057
2018-09-27 10:08:31 +02:00
96a34daab7 lint 2018-09-27 03:17:36 -04:00
edb26f2c65 tui: eliminate scrolling region data structure
The scrolling region is always local to a single grid_scroll event, use
local variables and parameters instead.

The invocation of reset_scroll_region in grid_resize is cargo-culted to use
margin reset under exactly the same circumstances, not sure if it is necessary
though.
2018-09-27 08:50:48 +02:00
25e6d37705 vim-patch:8.1.0120: buffer 'modified' set even when :sort has no changes
Problem:    Buffer 'modified' set even when :sort has no changes.
Solution:   Only set 'modified' when lines are moved. (Jason Franklin)
dc9e955fb0
2018-09-26 21:32:45 -04:00
1b8939d233 tui: eliminate grid->attrs, use indexed cell->attr
remove dead ugrid_put
2018-09-26 19:30:21 +02:00
fc18fad74f Merge #9053 from janlazo/vim-8.1.0433 2018-09-26 08:13:21 +02:00
c6350e4150 vim-patch:8.1.0436: can get the text of inputsecret() with getcmdline()
Problem:    Can get the text of inputsecret() with getcmdline(). (Tommy Allen)
Solution:   Don't return the text.
ee91c33570
2018-09-25 23:13:29 -04:00
28ac4a99f2 vim-patch:8.1.0433: mapping can obtain text from inputsecret()
Problem:    Mapping can obtain text from inputsecret(). (Tommy Allen)
Solution:   Disallow CTRL-R = and CTRL-\ e when using inputsecret().
31cbadf74b
2018-09-25 23:09:51 -04:00
8240b8b596 terminal: Redraw statusline on title change #8973
The statusline may incorporate b:term_title, so redraw it when that
title changes.

Introduce a new function status_redraw_buf to redraw windows associated
with the current buffer.
2018-09-25 08:47:48 +02:00
7862c3ae3e Merge #9047 from jamessan/log-crash 2018-09-25 08:07:51 +02:00
7bff9a5de8 TUI: Alacritty supports DECSCUSR (#9048)
Alacritty may set TERM to"alacritty" or "alacritty-direct" if it finds its terminfo.
2018-09-25 07:54:25 +02:00
d59bf058ab log: Assert that we haven't started freeing memory before logging
This is to catch situations like the previous commit, which somehow
avoided detection by any of the CI builds.
2018-09-24 22:56:24 -04:00
1bd916df35 os_unix: Log exit code before freeing all memory
When building with -DEXITFREE, the ILOG call would result in a crash
trying to access VV_PROGPATH, which had already been released:

    (gdb) bt
    #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
    #1  0x00007f8f761082f1 in __GI_abort () at abort.c:79
    #2  0x00007f8f760ffa8a in __assert_fail_base (fmt=0x7f8f76253ec8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
        assertion=assertion@entry=0x1c74280 <.str.8> " ,\t\n", file=file@entry=0x1c73fe2 "256]'", line=line@entry=610,
        function=function@entry=0x1c742e0 <.str.9+32> "") at assert.c:92
    #3  0x00007f8f760ffb02 in __GI___assert_fail (assertion=0x1c74280 <.str.8> " ,\t\n", file=0x1c73fe2 "256]'", line=610,
        function=0x1c742e0 <.str.9+32> "") at assert.c:101
    #4  0x00000000012d87c1 in vim_getenv (name=0x2f5a460 <get_special_key_name.string+64> "NVIM_LOG_FILE") at ../src/nvim/os/env.c:608
    #5  0x00000000012d6538 in expand_env_esc (srcp=0x1c2f4e0 <.str.10+32> "",
        dst=0x2f5a460 <get_special_key_name.string+64> "NVIM_LOG_FILE", dstlen=4095, esc=false, one=false, prefix=0x0)
        at ../src/nvim/os/env.c:351
    #6  0x00000000012d85af in expand_env_esc (srcp=0x625000000100 "\004", dst=0x7ffeed88cf40 "", dstlen=32766, esc=237, one=136,
        prefix=0x60200401c8b4 <error: Cannot access memory at address 0x60200401c8b4>) at ../src/nvim/os/env.c:472
    #7  0x0000000000eb4274 in do_log_to_file (log_file=0x0, log_level=0, context=0x0, func_name=0x0, line_num=0, eol=false, fmt=0x0)
        at ../src/nvim/log.c:254
    #8  0x0000000000eb305b in open_log_file () at ../src/nvim/log.c:164
    #9  0x0000000000eb2cc6 in logmsg (log_level=<error reading variable: Cannot access memory at address 0x268>,
        context=<error reading variable: Cannot access memory at address 0x260>,
        func_name=<error reading variable: Cannot access memory at address 0x258>,
        line_num=<error reading variable: Cannot access memory at address 0x254>,
        eol=<error reading variable: Cannot access memory at address 0x253>,
        fmt=<error reading variable: Cannot access memory at address 0x248>) at ../src/nvim/log.c:109
    #10 0x00000000013022c7 in mch_free_acl (aclent=0x4f59100) at ../src/nvim/os_unix.c:132
    #11 0x0000000000efddac in getout (exitval=0) at ../src/nvim/main.c:681
    #12 0x0000000000c1bb3e in ex_quit (eap=0x7ffeed88cd00) at ../src/nvim/ex_docmd.c:6067
    #13 0x0000000000bab781 in do_one_cmd (cmdlinep=0x7ffeed88f180, flags=10, cstack=0x7ffeed88f1a0, fgetline=0x0, cookie=0x0)
        at ../src/nvim/ex_docmd.c:2228
    #14 0x0000000000b8de6d in do_cmdline (cmdline=0x7ffeed891ae2 "quit", fgetline=0x0, cookie=0x0, flags=10)
        at ../src/nvim/ex_docmd.c:592
    #15 0x0000000000b94036 in do_cmdline_cmd (cmd=0x7ffeed891ae2 "quit") at ../src/nvim/ex_docmd.c:268
    #16 0x0000000000efb900 in exe_commands (parmp=0x7ffeed890900) at ../src/nvim/main.c:1699
    #17 0x0000000000ee96b2 in main (argc=11, argv=0x7ffeed890fa8) at ../src/nvim/main.c:524
2018-09-24 22:56:19 -04:00
59b2e6d35d deps: revert to jemalloc 4.5.0 (#9035)
- Since the jemalloc upgrade to 5.1.0, I'm seeing weird behavior such as
  infinite loops inside jemalloc routines.
- VimR maintainer reported major performance regression correlated with
  jemalloc 5.1.0.

ref https://github.com/neovim/neovim/pull/7808

reverts 765515010f
2018-09-25 00:06:52 +02:00
200c8b9cca build: Unify USE_BUNDLED, USE_BUNDLED_DEPS (#9046)
It's confusing that the Makefile uses a different name than CMake.
2018-09-24 23:18:48 +02:00
8cb04c2230 fixed lint errors 2018-09-24 22:05:01 +02:00
50c22325df src/nvim/eval.c: printf error 2018-09-24 21:31:57 +02:00
affef0aab8 add func_attr_printf in :
log.c
message.c
strings.c

fixed some printf warnings in:

src/nvim/undo.c
src/nvim/eval.c
src/nvim/eval/encode.c
src/nvim/eval/typval.c
src/nvim/ex_getln.c
src/nvim/fileio.c
src/nvim/lua/executor.c
src/nvim/main.c
src/nvim/regexp_nfa.c
src/nvim/shada.c
src/nvim/spellfile.c
src/nvim/tui/terminfo.c
src/nvim/garray.h
2018-09-24 21:28:04 +02:00
044cd242e7 vim-patch:8.1.0428: the :suspend command is not tested (#9043)
Problem:    The :suspend command is not tested.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3472)
3b30168f04
2018-09-24 01:59:42 +02:00
248478f5a0 vim-patch:8.1.0429: no test for :lcd with 'shellslash' (#9041)
Problem:    No test for :lcd with 'shellslash'.
Solution:   Add a test. (Daniel Hahler, closes vim/vim#3475)
c75878c923

Related NA patch:
vim-patch:8.1.0343
2018-09-23 21:46:21 +02:00
1a1164339a Merge pull request #9039 from blueyed/undercurl
tui: code consistency in update_attrs
2018-09-23 20:30:56 +02:00
535ef67ef0 minor: tui: update_attrs: code consistency 2018-09-23 19:34:39 +02:00
f8f83579ff Merge #9034 'swapfile: always show dialog' 2018-09-23 18:51:39 +02:00
d3c90cbbb4 vim-patch:8.0.1557: printf() does not work with only one argument (#9038)
Problem:    printf() does not work with only one argument. (Daniel Hahler)
Solution:   Allow using just the format. (Ken Takata, closes vim/vim#2687)
c71807db9c
2018-09-23 17:15:17 +02:00
990c147de3 test: Do not load entire log-file into memory
With DEBUG-level logging, after `make test`, log file could be 1+ GB.
2018-09-23 15:58:02 +02:00
22c83a4de9 swapfile: Always show swap dialog (E325)
If swapfile dialog prompts for input, it must be displayed to the user.

fix #8840
fix #9027
2018-09-23 15:58:01 +02:00
c3d24368a1 shortmess+=F: Hide :bnext, :bprev fileinfo messages 2018-09-23 15:58:01 +02:00
9183e2c67e vim-patch:8.1.0389: :behave command is not tested (#9030)
Problem:    :behave command is not tested.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3429)
da1f71d75f
2018-09-23 10:55:06 +02:00
eee93f36d8 Merge #9031 from janlazo/vim-8.1.0414 2018-09-23 10:53:57 +02:00
197d907e09 func_attr.h: FUNC_ATTR_PRINTF 2018-09-23 10:49:20 +02:00
bcc174e6df vim-patch:8.0.0370: invalid memory access when setting wildchar empty
Problem:    Invalid memory access when setting wildchar empty.
Solution:   Avoid going over the end of the option value. (Dominique Pelle,
            closes vim/vim#1509)  Make option test check all number options with
            empty value.
a12e40351d
2018-09-23 00:59:11 -04:00
fe191d95a2 vim-patch:8.0.0368: not all options are tested with a range of values
Problem:    Not all options are tested with a range of values.
Solution:   Generate a test script from the source code.
2f5463df01
2018-09-22 17:12:07 -04:00
a52c38d790 vim-patch:8.1.0414: v:option_old is cleared when using :set in OptionSet autocmd
Problem:    v:option_old and v:option_new are cleared when using :set in
            OptionSet autocmd. (Gary Johnson)
Solution:   Don't trigger OptionSet recursively.
3f3fb0b147
2018-09-22 17:10:16 -04:00
2b06c32a23 Merge #8898 from justinmk/vim-8.1.0310
vim-patch:8.1.0310: file info msg with 'F' in 'shortmess'
2018-09-22 18:53:16 +02:00
c236e80cf3 Merge pull request #9024 from bfredl/embed_ui2
always wait for UI with --embed, unless --headless is supplied
2018-09-22 10:20:23 +02:00
4da5cb38d3 startup: always wait for UI with --embed, unless --headless also is supplied 2018-09-22 10:18:28 +02:00
7f990741f7 TUI: Reset cursor color when applicable #8572
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
2018-09-22 03:07:21 +02:00
28b5a637b5 test/old: test_options: Accommodate Nvim default 2018-09-21 22:35:20 +02:00
efbc33cbbc vim-patch:8.1.0310: file info msg with 'F' in 'shortmess'
Problem:    File info message not always suppressed with 'F' in 'shortmess'.
            (Asheq Imran)
Solution:   Save and restore msg_silent. (Christian Brabandt, closes vim/vim#3221)
2f0f871159

ref #8840
ref #9027
2018-09-21 22:35:09 +02:00
4fa3492a6f Merge #9023 2018-09-21 21:59:54 +02:00
ac4d5d9935 vim-patch:8.0.0682: no test for synIDtrans() (#8966)
Problem:    No test for synIDtrans().
Solution:   Add a test. (Dominique Pelle, closes vim/vim#1796)
0b2eef24bc
2018-09-21 10:27:50 +02:00
dc256e376d man.vim: Fix very long justified lines #9023
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?
2018-09-21 10:17:37 +02:00
9081cad514 man.vim: Ignore $MANWIDTH, use soft wrap #9023
fix #9017
close #9023
2018-09-21 10:17:37 +02:00
ecdd2df88a shell/logging: Fix E730 with verbose system({List}) #9009
ref https://github.com/neovim/neovim/issues/9001#issuecomment-421843790

Steps to reproduce:
    :set verbose=9
    :call system(['echo'])
    E730: using List as a String
2018-09-21 09:20:04 +02:00
ad6bbe4468 Merge #9022 from janlazo/vim-8.0.1215 2018-09-21 08:20:20 +02:00
01b2fa53f4 lint 2018-09-21 00:05:06 -04:00
300a7a4cf4 replace fallthrough comment with macro
Follow-up of vim-patch:8.0.1215
2018-09-21 00:05:06 -04:00
e55ebae373 Merge pull request #9021 from bfredl/embed_fix
startup: don't erase screen on `:hi Normal` during startup (for non-newgrid UIs)
2018-09-20 15:20:40 +02:00
6a329b0548 vim-patch:8.0.1215: newer gcc warns for implicit fallthrough
Problem:    Newer gcc warns for implicit fallthrough.
Solution:   Consistently use a FALLTHROUGH comment. (Christian Brabandt)
2f40d129bf
2018-09-20 06:59:04 -04:00
5487624730 startup: don't erase screen on :hi Normal during startup
NB: existing `color default` test was actually enough to trigger the bug,
when ext_newgrid=false is used. I created the `:hi Normal` test as
I thought the builtin colors wouldn't set Normal (unless 'bg' is changed)
But as the root cause actually comes from `:hi Normal`, it makes sense
to still add the separate test (if `color default` here gets optimized to
become a no-op, or something).
2018-09-20 12:25:31 +02:00
47d74bf32f doc: test/README.md (#9020)
- testdir location
- no old style tests are left in the fixed list in the Makefile

[ci skip]
2018-09-20 09:37:53 +02:00
8b60253ce7 cleanup/TUI: remove old unused code #9013
- Checks for ECHOE, ICANON were left over from Vim code. We already
  reference the symbols elsewhere without checking.
- newline_on_exit, intr_char: Both are vestigial remnants of Vim 4.x,
  not implemented in Nvim. intr_char is a termios/stty feature, it's
  probably not useful because users have other ways to configure their
  terminals.
2018-09-19 07:59:09 +02:00
d0401e827b Merge #9014 from justinmk/log-more 2018-09-19 07:55:46 +02:00
7c00b9efca log: RPC, input, other events 2018-09-19 01:11:09 +02:00
b9bcfa9bc8 log: rename do_log to logmsg 2018-09-19 00:58:25 +02:00
a316258d2c test: system_spec: remove redundant clear() 2018-09-19 00:49:18 +02:00
809fff94e6 Merge pull request #8754 from bfredl/embed_ui
startup: make --embed wait for first request so embedding UI can display startup messages
2018-09-18 20:52:13 +02:00
bd8d43c6fe startup: wait for embedder before executing startup commands and files
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)
2018-09-18 19:22:16 +02:00
32ad52ae04 TUI: Skip redundant "stop" event (macOS kernel panic) (#9007)
When the TUI suspends (:suspend, CTRL-z) it calls tui_terminal_stop (but
does NOT set `ui->data=NULL`, so `tui_is_stopped` returns false). If the
host terminal dies, it sends SIGCONT, SIGHUP (usually in that order):

    ERROR 2018-09-16T19:30:17.065 25821 suspend_event:1153: SIGCONT
    ERROR 2018-09-16T19:30:17.065 25821 on_signal:162: SIGHUP
    ERROR 2018-09-16T19:30:17.155 25821 on_signal:162: SIGHUP

Race: if SIGHUP is handled before SIGCONT, it calls ui_builtin_stop()
which schedules tui_stop before the TUI was resumed?

libuv uv_close() aborts if the handle is already closed/closing.
Somehow that causes macOS to panic. #8075

    Assertion failed: (!uv__is_closing(handle)), function uv_close, file src/unix/core.c, line 117.

    Thread 0:: Dispatch queue: com.apple.main-thread
    0   libsystem_kernel.dylib        	0x00007fff67d69ec2 kevent + 10
    1   libuv.1.dylib                 	0x000000010609304d uv__io_poll + 892
    2   libuv.1.dylib                 	0x0000000106083904 uv_run + 339
    3   nvim                          	0x0000000105e76f7b loop_poll_events + 74
    4   nvim                          	0x0000000105fa5f51 ui_bridge_stop + 206
    5   nvim                          	0x0000000105fa4c00 ui_builtin_stop + 50
    6   nvim                          	0x0000000105f26ee9 mch_exit + 29
    7   nvim                          	0x0000000105eda84a getout + 518
    8   nvim                          	0x0000000105e778b3 multiqueue_process_events + 77
    9   nvim                          	0x0000000105f24c5a os_breakcheck + 49
    10  nvim                          	0x0000000105eb7ea3 auto_next_pat + 463
    11  nvim                          	0x0000000105eb7603 apply_autocmds_group + 1289
    12  nvim                          	0x0000000105eb0e8d apply_autocmds + 36
    13  nvim                          	0x0000000105f5a412 screenalloc + 1892
    14  nvim                          	0x0000000105f5b223 screen_resize + 190
    15  nvim                          	0x0000000105fa52e3 ui_refresh + 257
    16  nvim                          	0x0000000105e8c3d9 do_cmdline + 6614
    17  nvim                          	0x0000000105f03a72 normal_execute + 3996
    18  nvim                          	0x0000000105f89925 state_enter + 164
    19  nvim                          	0x0000000105efe08d normal_enter + 125
    20  nvim                          	0x0000000105ed9ffd main + 6858
    21  libdyld.dylib                 	0x00007fff67c19115 start + 1

    Thread 1 Crashed:
    0   libsystem_kernel.dylib        	0x00007fff67d68e3e __pthread_kill + 10
    1   libsystem_pthread.dylib       	0x00007fff67ea7150 pthread_kill + 333
    2   libsystem_c.dylib             	0x00007fff67cc5312 abort + 127
    3   libsystem_c.dylib             	0x00007fff67c8d368 __assert_rtn + 320
    4   libuv.1.dylib                 	0x00000001060835bf uv_close + 247
    5   nvim                          	0x0000000105fa0ebb tui_terminal_stop + 221
    6   nvim                          	0x0000000105f9ff3d tui_stop + 14
    7   nvim                          	0x0000000105e778b3 multiqueue_process_events + 77
    8   nvim                          	0x0000000105fa0c89 tui_main + 302
    9   libsystem_pthread.dylib       	0x00007fff67ea46c1 _pthread_body + 340
    10  libsystem_pthread.dylib       	0x00007fff67ea456d _pthread_start + 377
    11  libsystem_pthread.dylib       	0x00007fff67ea3c5d thread_start + 13

TODO:
- Set `ui->data = NULL` to flag UI as "stopped"? But loop_poll_events
  drains *all* fast_events, so could skip some events...
2018-09-18 08:16:38 +02:00
0a4d7ce669 Merge pull request #9011 from janlazo/vim-8.0.1428
vim-patch:8.0.{1428,1443}
2018-09-18 07:21:24 +02:00
58559a2249 vim-patch:8.0.1443: compiler complains about uninitialized variable
Problem:    Compiler complains about uninitialized variable. (Tony Mechelynck)
Solution:   Assign a value to the variable.
059fd01021
2018-09-17 22:40:29 -04:00
a00247e147 vim-patch:8.0.1428: compiler warning on 64 bit MS-Windows system
Problem:    Compiler warning on 64 bit MS-Windows system.
Solution:   Change type from "int" to "size_t". (Mike Williams)
200ea8ffaa
2018-09-17 22:38:10 -04:00
8de87c7b1c Merge pull request #8180 from bfredl/eol_text
support "virtual text" annotations (currently after EOL only)
2018-09-17 15:36:10 +02:00
45f53b370b buffer: add support for virtual text annotations 2018-09-17 10:41:29 +02:00
398b9fde85 Merge #9008 from janlazo/vim-8.0.1416 2018-09-17 10:40:48 +02:00
a0ada7dac4 lint 2018-09-16 20:55:59 -04:00
0b60372792 vim-patch:8.0.1417: test doesn't search for a sentence
Problem:    Test doesn't search for a sentence. Still fails when searching for
            start of sentence. (Dominique Pelle)
Solution:   Add paren. Check for MAXCOL in dec().
1bd999f982
2018-09-16 20:55:46 -04:00
91352b36b7 vim-patch:8.0.1416: crash when searching for a sentence
Problem:    Crash when searching for a sentence.
Solution:   Return NUL when getting character at MAXCOL. (closes vim/vim#2468)
8ada6aa929
2018-09-16 20:46:06 -04:00
9f1401e25c Merge #9004 from janlazo/vim-8.0.1374 2018-09-17 00:12:31 +02:00
17ab6dc12b Merge #9005 from janlazo/vim-8.0.1395 2018-09-16 23:44:29 +02:00
6beb5cf439 oldtests: set nrformats to Vim default 2018-09-16 17:39:50 -04:00
567c0e6cd7 runtime/colors: move check_colors.vim to runtime/tools 2018-09-16 17:08:23 -04:00
9c98e4845a vim-patch:8.0.1400: color scheme check script shows up as color scheme
Problem:    Color scheme check script shows up as color scheme.
Solution:   Move it to the "tools" subdirectory. (closes vim/vim#2457)
8ee2d36e21
2018-09-16 10:56:53 -04:00
7f762a2e09 vim-patch:8.0.1395: it is not easy to see if a colorscheme is well written
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
2018-09-16 10:54:44 -04:00
3c3c733c3c vim-patch:8.0.1374: CTRL-A does not work with an empty line
Problem:    CTRL-A does not work with an empty line. (Alex)
Solution:   Decrement the end only once. (Hirohito Higashi, closes vim/vim#2387)
5fe6bdf858
2018-09-16 10:24:59 -04:00
b2d7b70f4d loop_close: Drain thread_events (#8990)
loop_schedule_deferred may leak its allocated Event if the Event does
not get processed (when Nvim exits).

It only happens on exit, so we tried to ignore it in .asan-blacklist,
but for that isn't working for unknown reasons.

    = ==22007==ERROR: LeakSanitizer: detected memory leaks
    = Direct leak of 88 byte(s) in 1 object(s) allocated from:
    =      0 0x4ef7a3 in malloc /local/mnt/workspace/tmp/ubuntu_rel/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:67:3
    =      1 0xfcafc1 in try_malloc /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:88:15
    =      2 0xfcb1e9 in xmalloc /home/travis/build/neovim/neovim/build/../src/nvim/memory.c:122:15
    =      3 0xa6e75f in loop_schedule_deferred /home/travis/build/neovim/neovim/build/../src/nvim/event/loop.c:91:19
    =      4 0x18ab048 in tui_main /home/travis/build/neovim/neovim/build/../src/nvim/tui/tui.c:377:5
    =      5 0x18fe120 in ui_thread_run /home/travis/build/neovim/neovim/build/../src/nvim/ui_bridge.c:102:3
    =      6 0x7f09e5e58183 in start_thread /build/eglibc-ripdx6/eglibc-2.19/nptl/pthread_create.c:312
    = SUMMARY: AddressSanitizer: 88 byte(s) leaked in 1 allocation(s).
2018-09-16 11:22:32 +02:00
9ed46a77e6 vim-patch:8.1.0355 Incorrect adjusting the popup menu (#8996)
Problem:    Incorrect adjusting the popup menu for the preview window.
Solution:   Compute position and height properl. (Ronan Pigott)  Also show at
            least ten items. (closes vim/vim#3414)
2018-09-16 11:15:46 +02:00
3bce5207cf vim-patch:8.0.1363: recover swap file ending with .stz #9002
Problem:    Recovering does not work when swap file ends in .stz.
Solution:   Check for all possible swap file names. (Elfling, closes vim/vim#2395,
            closes vim/vim#2396)
af903e5d49
2018-09-16 11:12:20 +02:00
dadcfe22ca Merge #8998 from janlazo/vim-8.0.1275 2018-09-14 19:21:09 +02:00
c03e8307d2 vim-patch:8.0.1201: "yL" is affected by 'scrolloff' (#8997)
Problem:    "yL" is affected by 'scrolloff'. (Eli the Bearded)
Solution:   Don't use 'scrolloff' when an operator is pending.
44cc4cf72f
2018-09-14 19:16:30 +02:00
1bc44a805a Merge #8993 from janlazo/vim-8.0.1184 2018-09-14 19:12:18 +02:00
a6d4a2fb8d lint 2018-09-14 01:02:34 -04:00
db90c0c9bf globals: KeyTyped is bool 2018-09-14 01:01:00 -04:00
20354dbd75 vim-patch:8.0.1275: CmdlineLeave autocmd prevents fold from opening
Problem:    CmdlineLeave autocmd prevents fold from opening. (Waivek)
Solution:   Save and restore KeyTyped. (closes vim/vim#2305)
c9e9c71409
2018-09-13 23:08:16 -04:00
315a8d2217 vim-patch:8.1.0175: marks test fails in very wide window
Problem:    Marks test fails in very wide window. (Vladimir Lomov)
Solution:   Extend the text to match 'columns'. (closes vim/vim#3180, closes vim/vim#3181)
bde14d8e24
2018-09-13 20:13:02 -04:00
64e74dc784 vim-patch:8.1.0168: output of :marks is too short with multi-byte chars
Problem:    Output of :marks is too short with multi-byte chars. (Tony
            Mechelynck)
Solution:   Get more bytes from the text line.
9d5185bf9d
2018-09-13 20:13:02 -04:00
a78d465927 vim-patch:8.0.1184: the :marks command is not tested
Problem:    The :marks command is not tested.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#2197)
9b69f22e66
2018-09-13 20:13:02 -04:00
ae8515a544 Merge pull request #8995 from wsdjeg/patch-1
Make neovim timer ID start from 1
2018-09-13 21:17:42 +02:00
f6d5426fc8 Update eval.c 2018-09-13 21:55:20 +08:00
949bcd7810 Merge pull request #8992 from bfredl/cmd-snr
getchar: allow <SID> in <Cmd> mapping
2018-09-13 14:45:43 +02:00
5056d40b16 getchar: allow <SID> in <Cmd> mapping 2018-09-13 11:02:24 +02:00
d0c8dfc578 vim-patch:8.0.1089: range count in user command
Problem:    Cannot get range count in user command.
Solution:   Add <range> argument.
c168bd4bd3

close #8946
2018-09-13 10:20:34 +02:00
ea5337d9b5 vim-patch:8.0.1172: when E734 is given option is still set (#8988)
Problem:    When E734 is given option is still set.
Solution:   Assign NULL to "s". (Christian Brabandt)
2a6a6c3014
2018-09-13 07:52:31 +02:00
d5702a4534 Merge #8987 from justinmk/vim-8.1.0373 2018-09-13 01:51:17 +02:00
021f67df12 style: indent, then lint 2018-09-13 01:18:12 +02:00
ba27284f07 vim-patch:8.1.0374: moving the cursor is slow when 'relativenumber' is set
Problem:    Moving the cursor is slow when 'relativenumber' is set.
Solution:   Only redraw the number column, not all lines.
bd9a53c06c
2018-09-13 01:08:12 +02:00
e7a9c76ab0 vim-patch:8.1.0373: screen updating still slow when 'cursorline' is set
Problem:    Screen updating still slow when 'cursorline' is set.
Solution:   Fix setting last_cursorline.
1b7fefcbce
2018-09-13 00:32:14 +02:00
656648d855 Merge #8913 'popupmenu placement'
close #8913
2018-09-13 00:29:00 +02:00
59c5c4f006 test: popupmenu placement 2018-09-13 00:27:42 +02:00
a5fe6d34a9 vim-patch:8.0.1161 2018-09-13 00:27:32 +02:00
26b2c1fe15 popupmnu.c: Fix popup placement when preview window is below 2018-09-13 00:27:31 +02:00
7a26b9b62b vim-patch:8.1.0372: screen updating slow when 'cursorline' is set (#8986)
Problem:    Screen updating slow when 'cursorline' is set.
Solution:   Only redraw the old and new cursor line, not all lines.
90a997987d
2018-09-12 23:06:26 +02:00
9124bb755c Merge pull request #8985 from justinmk/ui-no-clearall
UI/cleanup: Remove most redraw_later_clear() calls
2018-09-12 21:37:55 +02:00
90b7d25882 do_shell, do_filter: Remove "clear screen", "wait for return" calls
The output from shell commands is already handled by the messages.c/UI
layer.
2018-09-12 08:30:26 +02:00
31c3d54668 UI/cleanup: Remove most redraw_later_clear() calls
Vim :! may "mess up the screen" because of e.g. switching between cooked
mode, but Nvim just uses pipes. So maybe we can avoid these
redraw_later_clear() CYA calls.
2018-09-12 08:30:26 +02:00
931e15471c Merge #8984 from janlazo/vim-8.1.0034 2018-09-12 07:36:28 +02:00
e15c34fbc2 lint 2018-09-11 23:04:54 -04:00
38c52c63ac vim-patch:8.0.1809: various typos
Problem:    Various typos.
Solution:   Correct the mistakes, change "cursur" to "cursor". (closes vim/vim#2887)
b946482190
2018-09-11 23:02:22 -04:00
8a845ab3ef vim-patch:8.1.0219: expanding ## fails to escape backtick
Problem:    Expanding ## fails to escape backtick.
Solution:   Escape a backtick in a file name. (closes vim/vim#3257)
2c8c681bfc
2018-09-11 22:42:17 -04:00
a021b30ede vim-patch:8.1.0034: cursor not restored with ":edit #"
Problem:    Cursor not restored with ":edit #".
Solution:   Don't assume autocommands moved the cursor when it was moved to
            the first non-blank.
adb8fbec4f
2018-09-11 19:23:04 -04:00
61df24b998 vim-patch:8.0.1154: 'indentkeys' does not work properly (#8980)
Problem:    'indentkeys' does not work properly. (Gary Johnson)
Solution:   Get the cursor line again. (Christian Brabandt, closes vim/vim#2151)
1b38344e00
2018-09-11 19:55:46 +02:00
d6b3c09129 Merge pull request #8945 from ZviRackover/fix-7401-step5
mbyte: remove mb_char2bytes
2018-09-11 09:03:09 +02:00
036051b218 Merge pull request #8974 from janlazo/vim-8.0.1377 2018-09-11 08:33:21 +02:00
77628d90a4 Merge pull request #8979 from janlazo/vim-8.1.0174 2018-09-11 08:26:24 +02:00
566f573378 move: dir in onepage() is Direction
Move vim.h in move.h to implicitly include buffer_defs.h and pos.h.
2018-09-10 23:16:16 -04:00
1a43aef9ec move: drop has_mbyte check
has_mbyte is always true in nvim.
2018-09-10 23:01:45 -04:00
e1fa242a6c vim-patch:8.1.0174: after paging up and down fold line is wrong
Problem:    After paging up and down fold line is wrong.
Solution:   Correct the computation of w_topline and w_botline. (Hirohito
            Higashi)
907dad72ef
2018-09-10 20:34:34 -04:00
d4e6a75a06 Merge pull request #8971 from bfredl/flush_on_exit
ui: flush UI state on exit
2018-09-10 18:58:06 +02:00
207cfce3de vim-patch:8.1.0011: maparg() and mapcheck() confuse empty and non-existing (#8976)
Problem:    maparg() and mapcheck() confuse empty and non-existing.
Solution:   Return <Nop> for an existing non-empty mapping. (closes vim/vim#2940)
f88a5bc102
2018-09-10 09:27:04 +02:00
d9fcd43638 Merge #8967 'vim-patch:8.0.1781' 2018-09-10 09:24:16 +02:00
0c80fead86 vim-patch:8.0.1781: file names in quickfix window are not shortened
Problem:    File names in quickfix window are not always shortened.
Solution:   Shorten the file name when opening the quickfix window. (Yegappan
            Lakshmanan, closes vim/vim#2851, closes vim/vim#2846)
a796d46f29
2018-09-10 06:45:13 +02:00
39ab7cc6fb vim-patch:8.0.1378: autoload script sources itself when defining function
Problem:    Autoload script sources itself when defining function.
Solution:   Pass TFN_NO_AUTOLOAD to trans_function_name(). (Yasuhiro
            Matsumoto, closes vim/vim#2423)
3388d33457
2018-09-09 20:30:32 -04:00
3fd9ffd368 vim-patch:8.0.1377: cannot call a dict function in autoloaded dict
Problem:    Cannot call a dict function in autoloaded dict.
Solution:   Call get_lval() passing the read-only flag.
6e65d594aa
2018-09-09 18:12:25 -04:00
bbbed9fc66 Merge #8063 from blueyed/vim-8.0.0708 2018-09-09 19:54:27 +02:00
dd0dd4d78d vim-patch:8.0.1115: crash when using foldtextresult() recursively (#8972)
Problem:    Crash when using foldtextresult() recursively.
Solution:   Avoid recursive calls. (Yasuhiro Matsumoto, closes vim/vim#2098)
495b7dd213
2018-09-09 19:22:10 +02:00
d47af7f10e CI/Codecov: disable changes status
It fails PRs which otherwise would succeed (e.g. #8971), and the Codecov
status page doesn't load, so we can't see what it's complaining about.

Reverts 5c7237640f
ref #8910
2018-09-09 19:12:32 +02:00
088ae23e4e ui: flush UI state on exit 2018-09-09 16:42:53 +02:00
c5790d9189 Merge pull request #8915 from rickyz/line_wrapping
Fix terminal line wrapping detection in the TUI.
2018-09-09 12:44:03 +02:00
e50ff1b2e9 Merge #8970 from janlazo/vim-8.0.0749 2018-09-09 12:37:28 +02:00
a8bd4de28a Merge #8969 from janlazo/vim-8.0.1006 2018-09-09 11:29:18 +02:00
329cfc3303 lint: clean-up after parent commits 2018-09-09 10:45:50 +03:00
ac13e65ae0 Remove has_mbytes local to lines changed in parent commit 2018-09-09 10:45:50 +03:00
cbdbc4f63d Refactor: Remove occurences of mb_char2bytes 2018-09-09 10:45:50 +03:00
49647ae973 digraph: delete code that checks enc_utf8
enc_utf8 is always true in nvim.
2018-09-08 23:42:14 -04:00
03bcfb54db digraph: refactor code that checks has_mbyte
has_mbyte is always true in nvim.
2018-09-08 23:42:14 -04:00
95608136d5 tests: update expected output of :digraph command 2018-09-08 22:28:35 -04:00
5f1a5d264a vim-patch:8.0.0749: some unicode digraphs are hard to remember
Problem:    Some unicode digraphs are hard to remember.
Solution:   Add alternatives with a backtick. (Chris Harding, closes vim/vim#1861)
816e7660e1
2018-09-08 21:29:47 -04:00
40e894f595 oldtests: win: fix buffer pathsep 2018-09-08 12:25:19 -04:00
3794e83d98 vim-patch:8.0.1040: cannot use another error format in getqflist()
Problem:    Cannot use another error format in getqflist().
Solution:   Add the "efm" argument to getqflist(). (Yegappan Lakshmanan)
3653822546
2018-09-08 11:52:59 -04:00
a8b996160d lint 2018-09-08 11:31:55 -04:00
213a66441f vim-patch:8.0.1031: "text" argument for getqflist() is confusing
Problem:    "text" argument for getqflist() is confusing. (Lcd47)
Solution:   Use "lines" instead. (Yegappan Lakshmanan)
2c809b7c7d
2018-09-08 11:31:24 -04:00
1790f81f56 vim-patch:8.0.1029: return value of getqflist() is inconsistent
Problem:    Return value of getqflist() is inconsistent.  (Lcd47)
Solution:   Always return an "items" entry.
da73253a0b
2018-09-08 10:43:30 -04:00
fe81b926d3 test_largefile.vim: adjust comment to run it 2018-09-08 16:43:27 +02:00
53eb835e8f vim-patch:8.0.1326: largefile test fails on CI, glob test on MS-Windows
Problem:    Largefile test fails on CI, glob test on MS-Windows.
Solution:   Remove largefile test from list of all tests. Don't run
            Test_glob() on non-unix systems.  More cleanup. (Yegappan
            Lakshmanan, closes vim/vim#2354)
6e77df2d85
2018-09-08 16:43:27 +02:00
2c64f01674 vim-patch:8.0.0708: some tests are old style
Problem:    Some tests are old style.
Solution:   Change a few tests from old style to new style. (pschuh,
            closes vim/vim#1813)

292eff0c5a
2018-09-08 16:43:27 +02:00
9bf2741ba4 vim-patch:8.0.1023: it is not easy to identify a quickfix list
Problem:    It is not easy to identify a quickfix list.
Solution:   Add the "id" field. (Yegappan Lakshmanan)
a539f4f1ae
2018-09-08 08:13:48 -04:00
b4acf609ac vim-patch:8.0.1006: quickfix list changes when parsing text with 'erroformat'
Problem:    Cannot parse text with 'erroformat' without changing a quickfix
            list.
Solution:   Add the "text" argument to getqflist(). (Yegappan Lakshmanan)
7adf06f4e2
2018-09-07 22:59:12 -04:00
50eadfe2e9 Merge #8962 from janlazo/vim-8.0.0733 2018-09-07 09:51:59 +02:00
a9d83e8112 ASAN/LeakSanitizer: fix typo in blacklist 2018-09-07 08:34:34 +02:00
d99a268914 vim-patch:8.0.0922: quickfix list always added after current one
Problem:    Quickfix list always added after current one.
Solution:   Make it possible to add a quickfix list after the last one.
            (Yegappan Lakshmanan)
55b6926450
2018-09-07 00:00:22 -04:00
4eb923bfe0 vim-patch:8.0.0904: cannot set a location list from text
Problem:    Cannot set a location list from text.
Solution:   Add the "text" argument to setqflist(). (Yegappan Lakshmanan)
ae33833850
2018-09-06 22:36:49 -04:00
2be853d486 lint 2018-09-06 20:26:30 -04:00
c0d26ba4f9 main: advance in edit_buffers() is bool 2018-09-06 20:25:45 -04:00
cfb2828897 window: refactor boolean variables in win_close()
free_buf (param) and help_window (variable) are bool.
2018-09-06 20:24:29 -04:00
27d755cfd1 Merge pull request #8964 from bfredl/generated-sources
cmake: add "generated-sources" target
2018-09-06 21:34:18 +02:00
9e8f9dd5d4 cmake: add "generated-sources" target
This is intended to be used with source introspection tools like
clangd, where it would useful to regenerate headers and source files,
which introspection results depend on, without making a full
rebuild which takes much longer time than just generating headers.
2018-09-06 20:54:53 +02:00
dc15dcffad vim-patch:8.0.0782: using freed memory in quickfix code
Problem:    Using freed memory in quickfix code. (Dominique Pelle)
Solution:   Handle a help window differently. (Yegappan Lakshmanan)
d28cc3f55d
2018-09-06 06:15:35 -04:00
bb519fb261 vim-patch:8.0.0733: can only add entries to one list in the quickfix stack
Problem:    Can only add entries to one list in the quickfix stack.
Solution:   Move state variables from qf_list_T to qf_list_T. (Yegappan
            Lakshmanan)
a7df8c70c8
2018-09-05 23:02:14 -04:00
5de6f97408 Merge #8961 from ZyX-I/fix-8956 2018-09-06 01:30:53 +02:00
ZyX
a9fa66b5b8 functests: Add tests 2018-09-06 02:12:36 +03:00
ZyX
b728aad212 runtime/msgpack: Fix inf/nan regexp
Not making minus sign optional as inf/nan without optional minus should’ve
already been handled by the very first case.
2018-09-06 02:12:36 +03:00
51d42917f0 test/win: job_spec: increase jobwait() timeout
powershell is slow, and this timeout is "worst case" so it doesn't make
the tests more costly, only avoids a false-positive.

close #8958
2018-09-05 22:05:05 +02:00
55a721512b Merge #8953 from janlazo/vim-8.0.1190 2018-09-05 09:45:14 +02:00
bfe82d4650 Merge #8888 from janlazo/vim-8.0.1020 2018-09-05 09:38:34 +02:00
73849ceeb9 Merge #8948 from janlazo/vim-8.1.0331 2018-09-05 09:24:36 +02:00
30b70de39e Merge #8920 from janlazo/vim-8.0.0998 2018-09-05 09:19:06 +02:00
8b76034f3b Merge #8931 from justinmk/api-error-overrun 2018-09-05 08:37:46 +02:00
608ff261ad test: API validation: assert exact string
expect_err() matches against a pattern. Terminate the pattern with "$"
to check against buffer overrun.

ref #8931
2018-09-05 08:04:15 +02:00
db17d2c0fa API: Avoid overrun when formatting error-message
msgpack_rpc_to_object (called by handle_request .. msgpack_rpc_to_array)
always NUL-terminates API Strings.
But handle_request .. msgpack_rpc_get_handler_for operates on a raw
msgpack_object, before preparation.
2018-09-05 08:04:15 +02:00
9584674569 vim-patch:8.0.1595: no autocommand triggered before exiting
Problem:    No autocommand triggered before exiting.
Solution:   Add the ExitPre autocommand event.
12a96de430
2018-09-04 22:40:48 -04:00
b6e83ba284 vim-patch:8.1.0334: 'autowrite' takes effect when buffer is not to be written
Problem:    'autowrite' takes effect when buffer is not to be written.
Solution:   Don't write buffers that are not supposed to be written. (Even Q
            Jones, closes vim/vim#3391)  Add tests for 'autowrite'.
8c9e7b00f6
2018-09-04 22:40:48 -04:00
4d6ba4d06a vim-patch:8.0.1190: unusable after opening new window in BufWritePre event
Problem:    Vim becomes unusable after opening new window in BufWritePre
            event.
Solution:   Call not_exiting(). (Martin Tournoij, closes vim/vim#2205)
            Also for "2q" when a help window is open.  Add a test.
2c33d7bb69
2018-09-04 22:40:48 -04:00
f3c895569d lint 2018-09-04 21:33:39 -04:00
d29b71a1de ex_cmds: const variables in find_help_tags()
keep_lang (param) is bool.
2018-09-04 21:32:08 -04:00
9d7dc49db1 vim-patch:8.1.0235: more help tags that jump to the wrong location
Problem:    More help tags that jump to the wrong location.
Solution:   Add more exceptions and a table for "expr-" tags. (Hirohito
            Higashi)
3bf5e6a4c8
2018-09-04 21:16:34 -04:00
106b308ed4 vim-patch:8.0.1792: MS-Windows users expect -? to work like --help
Problem:    MS-Windows users expect -? to work like --help.
Solution:   Add -?. (Christian Brabandt, closes vim/vim#2867)
c3e81694fc

Include runtime/ changes from 85eee130f4 to pass 8.1.0231 tests.
2018-09-04 21:16:34 -04:00
24b16ed35e vim-patch:8.1.0231: :help -? goes to help for -+
Problem:    :help -? goes to help for -+.
Solution:   Add -? to list of special cases. (Hirohito Higashi)
a5bc38b8c1
2018-09-04 21:16:34 -04:00
5c90bbae2a vim-patch:8.0.1383: local additions in help skips some files
Problem:    Local additions in help skips some files. (joshklod)
Solution:   Check the base file name length equals.
35c5e8155d
2018-09-04 21:16:34 -04:00
d4cc4e0871 vim-patch:8.0.0998: strange error when using K while only spaces are selected
Problem:    Strange error when using K while only spaces are selected.
            (Christian J. Robinson)
Solution:   Check for blank argument.
a4f99f5a8b
2018-09-04 21:16:34 -04:00
9fe8e3cb2f CI/AppVeyor: Disable gcov build for PRs
Currently the "gcov" build always fails on AppVeyor. It makes the builds
very slow, so disable it for PRs until the problem is fixed.

closes #8911
closes #8912
2018-09-04 21:19:30 +02:00
65e4c9afe2 Merge #8955 'deps: update jemalloc, libvterm' 2018-09-04 21:05:20 +02:00
f8e042f732 tests: call getchar(1) in timer callback
Test changes from 8.0.1020 and 8.0.1048.
2018-09-04 10:00:17 -04:00
96b3dbcea5 lint 2018-09-04 10:00:17 -04:00
3b744f1ea2 vim-patch:8.1.0052: when mapping to <Nop> times out the next mapping is skipped
Problem:    When a mapping to <Nop> times out the next mapping is skipped.
Solution:   Reset "timedout" when waiting for a character. (Christian
            Brabandt, closes vim/vim#2921)
83f4cbd973
2018-09-04 10:00:17 -04:00
efa132da82 vim-patch:8.0.1048: no test for what 8.0.1020 fixes
Problem:    No test for what 8.0.1020 fixes.
Solution:   Add test_feedinput().  Add a test. (Ozaki Kiichi, closes vim/vim#2046)
5e80de3f3e
2018-09-04 10:00:17 -04:00
c87510b0e8 vim-patch:8.0.1020: when a timer calls getchar(1) input is overwritten
Problem:    When a timer calls getchar(1) input is overwritten.
Solution:   Increment tb_change_cnt in inchar(). (closes vim/vim#1940)
0f0f230012
2018-09-04 10:00:17 -04:00
90519107f2 Merge #8921 'highlight: Fix after-EOL matches at cursor' 2018-09-04 07:05:20 +02:00
3b156664b5 build/MSVC: remove libvterm-Fix-escape-sequences-for-MSVC.patch
Not needed after libvterm commit:
487f21dbf6
2018-09-04 06:41:55 +02:00
9de949ea3e deps: update libvterm
Changes: a9c7c6fd20...3f62ac6b7b

- "better handling of double-width unicode characters"
  cfde7f2095
  https://github.com/neovim/neovim/issues/4976#issuecomment-418170022
- "Fix implementation of query on bracketed paste mode"
  005845cd58
- compiler-warning fixes
- FocusIn/FocusOut reporting
  1343c8c0f9

Fixes #4976 (cursor "off-by-one" behavior after  (Wide unicode glyphs)
in :terminal)
2018-09-04 10:41:51 +02:00
765515010f deps: update to jemalloc 5.1.0
ref https://github.com/neovim/neovim/pull/7808
2018-09-04 10:41:51 +02:00
8fd3725cc8 tui: Hint wrapped lines to terminals.
Previously, when neovim would wrap a line across multiple lines,
terminal emulators could not detect that the lines represent a single
wrapped line as opposed to several separate lines. As a result, many
terminals' selection/copying functionality would treat a wrapped line as
several newline-delimited lines.

Fix this by reenabling a "special trick" from Vim. When a line is
wrapped, write the last character of that line followed by the first
character of the next line to the terminal. This hints to the terminal
that the next line is a continuation of the current line.

Extends the raw_line event with a "wrap" parameter which controls when
to do wrap hinting.
2018-09-03 03:25:02 -07:00
7ff63fcdc0 Merge pull request #8942 from bfredl/attr_state
screen.lua: extend snapshot_util() to work with extension state
2018-09-03 12:16:49 +02:00
2694fa759f Add tests for highlighting after the end of a line. 2018-09-03 03:13:03 -07:00
6c3b0fb831 vim-patch:8.1.0344: 'hlsearch' highlighting has a gap after /$
Problem:    'hlsearch' highlighting has a gap after /$.
Solution:   Remove suspicious code. (Ricky Zhou, closes vim/vim#3400)

7ee3f15b21
2018-09-03 03:13:03 -07:00
74937589d0 screen.lua: extend snapshot_util() to work with extension state
Simplify handling of attributes: collect new attributes in the same pass
as screen lines are rendered, instead of using two passes.
2018-09-03 10:36:55 +02:00
3e1daa84e9 oldtests: win: fix pathsep in :mkview test 2018-09-03 00:10:13 -04:00
6deddb26de vim-patch:8.1.0336: mkview test still fails on CI
Problem:    mkview test still fails on CI.
Solution:   Ignore curswant, don't see another solution.
dd5d18eadf
2018-09-02 23:35:02 -04:00
d7432145ff vim-patch:8.1.0335: mkview test fails on CI
Problem:    mkview test fails on CI.
Solution:   Attempt to force recomputing curswant after folding.
2bf4fe07b6
2018-09-02 23:33:56 -04:00
bd7371f460 vim-patch:8.1.0333: :mkview does not restore cursor properly after "$"
Problem:    :mkview does not restore cursor properly after "$". (Dominique
            Pelle)
Solution:   Position the cursor with "normal! $".
92c1b69641
2018-09-02 23:30:42 -04:00
5c9cd009e1 vim-patch:8.1.0331: insufficient test coverage for :mkview and :loadview
Problem:    Insufficient test coverage for :mkview and :loadview.
Solution:   Add tests. (Dominique Pelle, closes vim/vim#3385)
627cb6a6b3
2018-09-02 21:12:09 -04:00
f62d4865d8 Merge #8934 'Remove mb_ptr2len_len, mb_ptr2cells, mb_ptr2cells_len' 2018-09-01 19:46:46 +02:00
064495a53a doc/defaults: document ttimeoutlen default (#8943) 2018-09-01 18:17:49 +02:00
71bb4fd481 man.vim: guard against reload (#8940)
Some plugins attempt to reload autoloaded scripts.
Use a guard to prevent this.

fix #8939
2018-09-01 11:42:43 +02:00
a3549286b2 lint: clean-up after parent commits 2018-08-31 22:47:50 +03:00
1015aa6ff3 Remove has_mbytes from lines local to parent commit 2018-08-31 22:47:49 +03:00
1c03a06487 Refactor: remove mb_ptr2len_len, mb_ptr2cells and mb_ptr2cells_len
Remove occurences of these macros.
2018-08-31 22:45:10 +03:00
e30ccd56d9 shell.c: fix scan-build NPE warning #8932 2018-08-29 22:00:38 +02:00
93ee31bf65 spellfile.c: Remove dead assignment #8933
Looks like a harmless accident of ebe5051977 (which was a followup to its parent  fa7ace446e).
2018-08-29 21:56:06 +02:00
c5c3b0b8f9 Fix dead assignment. 2018-08-29 16:54:21 +05:30
17ce06d1c9 Merge #8930 'vim-patch:8.1.0022' 2018-08-29 08:11:16 +02:00
81c2cbe099 getchar: fix {read,copy,start}_redo() params
Update function signature as follows:
- read_redo(bool, bool)
- copy_redo(bool)
- start_redo(long, bool)
2018-08-29 00:27:07 -04:00
9fab77c7fb globals: cmd_silent is bool 2018-08-29 00:17:30 -04:00
7c38f60b3b vim-patch:8.1.0022: repeating put from expression register fails
Problem:    Repeating put from expression register fails.
Solution:   Re-evaluate the expression register. (Andy Massimino,
            closes vim/vim#2945)
833093bfb0
2018-08-29 00:08:15 -04:00
461d46d8ac Merge #8863 'refactor: Remove mb_head_off()' 2018-08-28 23:43:04 +02:00
a2403a0ed9 Merge #8863 'refactor: Remove mb_head_off() ' 2018-08-28 23:37:30 +02:00
885ca3b7a6 Merge #8929 from janlazo/vim-8.0.0983 2018-08-28 22:39:02 +02:00
acdede50ce test: Dump $NVIM_LOG_FILE contents (#8926)
Do this at the test-framework level instead of CI (Travis) scripts.
Then it works for QuickBuild and AppVeyor.

ref eb6dd3e42d
2018-08-28 22:13:34 +02:00
2996179482 lint 2018-08-28 16:09:26 -04:00
60f1acd0ef ex_cmds2: checkall in dialog_changed() is bool 2018-08-28 16:01:16 -04:00
5a1c93584f vim-patch:8.1.0214 fixup: remove feature-guard
FEAT_AUTOCHDIR is not defined for Nvim.

ref #8927
2018-08-28 21:49:41 +02:00
87904ae3c4 vim-patch:8.1.0214 (#8927)
Problem:    +autochdir feature not reported by has() or :version.
Solution:   Add the feature in the list.
Author:     Bram Moolenaar <Bram@vim.org>

83ec2a7f5f
2018-08-28 21:41:30 +02:00
3dffc842fe vim-patch:8.0.0983: unnecessary check for NULL pointer
Problem:    Unnecessary check for NULL pointer.
Solution:   Remove the NULL check in dialog_changed(), it already happens in
            dialog_msg(). (Ken Takata)
3f9a1ff141
2018-08-28 15:41:15 -04:00
0a77dc7e05 options: do not use gettext for +printheader (#8928)
It is not translatable as of vim-patch:8.0.1001.
2018-08-28 21:33:32 +02:00
643ef257b3 API: nvim_unsubscribe(): Handle unknown events #8745
close #8745
2018-08-28 10:20:19 +02:00
10e885bdfc vim-patch:8.0.1001: setting 'encoding' makes 'printheader' invalid (#8925)
Problem:    Setting 'encoding' makes 'printheader' invalid.
Solution:   Do not translate the default value of 'printheader'. (Yasuhiro
            Matsumoto, closes vim/vim#2026)
0903d56f5c
2018-08-28 08:51:22 +02:00
dee0d7f4e9 Merge pull request #8891 from bfredl/keyexpect
use keyword args for screen:expect{...} + hl fixup for ext_cmdline
2018-08-27 16:02:22 +02:00
3d88287e30 tests: introduce screen:expect{...} form 2018-08-27 15:15:49 +02:00
03978a0f29 ext_cmdline: use new highlight representation for cmdline_block
Make sure cmdline updates will receive highlight specifications the same
way as screen cells. This is controlled by the ext_newgrid option so
nothing is changed by default (as screen cells are also not changed by
default).  This was already done for the cmdline itself in #8221, this
extends it to cmdline_block. Which currently doesn't store highlights,
but the placeholder should be one that makes sense for future use.
2018-08-27 11:51:52 +02:00
a8b4d76a0a health.vim: Detect missing init.vim
closes #4877
2018-08-27 01:35:58 +02:00
cbc8c0c625 vim-patch:8.1.0322: Test_copy_winopt() does not restore 'hidden' (#8918)
Problem:    Test_copy_winopt() does not restore 'hidden'.
Solution:   Restore the option, fix indent. (Ozaki Kiichi, closes vim/vim#3367)
7cb33a14c9
2018-08-27 01:14:33 +02:00
cd1d9d8a7c Merge #8916 from janlazo/vim-8.1.0144 2018-08-26 21:20:22 +02:00
246fa3e81d oldtests: comment out test for 'set cpo+=.'
nvim does not support POSIX cpoptions.
2018-08-26 14:41:50 -04:00
ff8e239493 vim-patch:8.1.0144: the :cd command does not have good test coverage
Problem:    The :cd command does not have good test coverage.
Solution:   Add more tests. (Dominique Pelle, closes vim/vim#2972)
b2e0c94a4d
2018-08-26 09:56:34 -04:00
fa285bde45 win/dist: nvim-qt v0.2.10 (#8901)
ref https://github.com/equalsraf/neovim-qt/issues/417
2018-08-26 15:29:00 +02:00
eb663d5367 Merge #8903 from janlazo/vim-8.0.0883 2018-08-26 15:20:59 +02:00
8f058dca89 Merge #8904 from janlazo/vim-8.0.0900 2018-08-26 15:17:54 +02:00
7898de5211 vim-patch:8.1.0327: the "g CTRL-G" command isn't tested much (#8914)
Problem:    The "g CTRL-G" command isn't tested much.
Solution:   Add more tests. (Dominique Pelle, closes vim/vim#3369)
0529583ff1
2018-08-26 15:05:55 +02:00
8a677f8a4b src/nvim/testdir/Makefile: define NEW_TESTS automatically (#8909)
This avoids having to maintain this manually.

Tried to bring this upstream to Vim, but it does not work with non-GNU
make apparently in an easy way (https://github.com/vim/vim/pull/3376).

For Neovim GNU make can be used for this apparently.

diff (generated via):

    $(shell printf '%s\n' $(NEW_TESTS) > 1)
    $(shell printf '%s\n' $(NEW_TESTS2) > 2)
    $(error $(shell echo $(NEW_TESTS) | wc -c) $(shell echo $(NEW_TESTS2) | wc -c))

Changes:

 - Removed, already included in test_alot:
   - test_changedtick.res
   - test_filter_map.res
   - test_findfile.res
   - test_ga.res
   - test_lambda.res
   - test_put.res
   - test_recover.res
   - test_tabpage.res

 - Added (apparently forgotten to be added to NEW_TESTS):
   - test_breakindent.res: added in 49b671f8f
   - test_display.res: added in a0c7e35ee
   - test_help.res, added in 41bffeacf
   - test_lispwords.res, added in 54b9510e0
   - test_textformat.res, added in ef39f854d
2018-08-26 14:45:25 +02:00
5c7237640f CI/Codecov: enable changes status (#8910)
This helps to identify unexpected changes.
2018-08-26 14:24:22 +02:00
c581517f8a Merge #8908 'build/doc: generate vimindex.html' 2018-08-26 14:08:45 +02:00
e85bed0830 vim-patch:8.0.1214: accessing freed memory when EXITFREE is set
Problem:    Accessing freed memory when EXITFREE is set and there is more than
            one tab and window. (Dominique Pelle)
Solution:   Free options later.  Skip redraw when exiting.
4f1982800f
2018-08-25 10:52:36 -04:00
add2a62398 runtime/doc: fix broken links found by make html 2018-08-25 16:38:24 +02:00
2e5c299f11 warn about tests without libintl 2018-08-25 23:13:34 +09:00
ff18d3b827 build/doc: generate vimindex.html
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
2018-08-25 15:25:49 +02:00
16b55d2e9d vim-patch:8.0.1468: illegal memory access in del_bytes()
Problem:    Illegal memory access in del_bytes().
Solution:   Check for negative byte count. (Christian Brabandt, closes vim/vim#2466)
191f18bad0
2018-08-24 23:02:51 -04:00
13f028e416 vim-patch:8.0.0900: :tab options doesn't open a new tab page
Problem:    :tab options doesn't open a new tab page. (Aviany)
Solution:   Support the :tab modifier. (closes vim/vim#1960)
ab6c8587ba
2018-08-24 22:15:42 -04:00
bdffa01b52 vim-patch:8.0.1404: invalid memory access on exit
Problem:    Invalid memory access on exit when autocommands wipe out a buffer.
            (gy741, Dominique Pelle)
Solution:   Check if the buffer is still valid. (closes vim/vim#2449)
606d45ccd8
2018-08-24 21:19:13 -04:00
59b53e7bc7 vim-patch:8.0.1228: invalid memory access in GUI test
Problem:    Invalid memory access in GUI test.
Solution:   Check that the row is not outside of the screen.
0e19fc07e7
2018-08-24 20:41:52 -04:00
cba3025c43 vim-patch:8.0.0883: invalid memory access with nonsensical script
Problem:    Invalid memory access with nonsensical script.
Solution:   Check "dstlen" being positive. (Dominique Pelle)
1c864093f9
2018-08-24 20:03:29 -04:00
c0157e8fe0 remote/host.vim: specify {nosuf} for globpath() (#8882) 2018-08-24 10:17:59 +02:00
e7d020e08f Merge #8894 from janlazo/editorconfig-makefile 2018-08-24 09:12:08 +02:00
2ab80b944b Merge #8896 from janlazo/vim-8.1.0083 2018-08-24 09:09:46 +02:00
748cd91c20 search: fix types of findsent() variables
dir (param) is of type Direction (enum).
cpo_J, found_dot, noskip (local var) are bool. cpo_J is const.
startlnum (local var) is const int. Declare it in same scope as cpo_J.
2018-08-23 19:07:19 -04:00
42428b3f85 vim-patch:8.1.0083: "is" and "as" have trouble with quoted punctuation
Problem:    "is" and "as" have trouble with quoted punctuation.
Solution:   Check for punctuation before a quote. (Jason Franklin)
8516071124
2018-08-23 18:50:29 -04:00
925c153f86 doc: remove mention of "drop" register (#8893)
close #8881
2018-08-23 19:49:23 +02:00
c5b5eaabad oldtests: reindent Makefile to 8-width tab 2018-08-23 13:48:47 -04:00
13673ea78d editorconfig: Makefile uses 8-width tab indent 2018-08-23 13:47:15 -04:00
e89df8a54d vim-patch:8.0.1682: auto indenting breaks inserting a block (#8892)
Problem:    Auto indenting breaks inserting a block.
Solution:   Do not check for cursor movement if indent was changed. (Christian
            Brabandt, closes vim/vim#2778)
8c87a2b1fe
2018-08-23 19:13:05 +02:00
a5d00527a1 Merge pull request #8887 from janlazo/vim-8.0.1242
[RDY] vim-patch:8.0.1242
2018-08-23 10:48:06 -04:00
dfbb75fdab Merge pull request #8889 from janlazo/vim-8.0.0999
[RDY] vim-patch:8.0.{999,1041,1043,1044}
2018-08-23 10:45:58 -04:00
6c8851be4e lint 2018-08-23 10:00:53 -04:00
27fbffeb4f vim-patch:8.0.1044: warning for uninitialized variable
Problem:    Warning for uninitialized variable. (John Marriott)
Solution:   Initialize ind_pre.
2254a8ad0c
2018-08-23 10:00:53 -04:00
fb68c97ce8 vim-patch:8.0.1043: warning for uninitialized variable
Problem:    Warning for uninitialized variable. (John Marriott)
Solution:   Move code to check indent inside "if".
4ec86ddd77
2018-08-23 10:00:53 -04:00
d677ae5f64 vim-patch:8.0.1041: bogus characters when indenting during visual-block append
Problem:    Bogus characters appear when indenting kicks in while doing a
            visual-block append.
Solution:   Recompute when indenting is done. (Christian Brabandt)
e2e69e4813
2018-08-23 10:00:53 -04:00
fe57a8a4e4 vim-patch:8.0.0999: indenting raw C++ strings is wrong
Problem:    Indenting raw C++ strings is wrong.
Solution:   Add special handling of raw strings. (Christian Brabandt)
dde81312b0
2018-08-23 04:09:24 -04:00
012cd35bfb vim-patch:8.0.1151: "vim -c startinsert!" doesn't append (#8886)
Problem:    "vim -c startinsert!" doesn't append.
Solution:   Correct line number on startup. (Christian Brabandt, closes vim/vim#2117)
09ca932f8e
2018-08-22 19:33:06 +02:00
eaf8e57cf9 vim-patch:8.0.1242: function argument with only dash is seen as number zero
Problem:    Function argument with only dash is seen as number zero. (Wang
            Shidong)
Solution:   See a dash as a string. (Christian Brabandt)
ffd99f729b
2018-08-22 13:06:04 -04:00
a466bd2927 Merge #8880 from janlazo/vim-8.0.1331 2018-08-22 08:40:56 +02:00
54e6ef73f0 vim-patch:8.0.1790: 'winfixwidth' is not always respected by :close
Problem:    'winfixwidth' is not always respected by :close.
Solution:   Prefer a frame without 'winfixwidth' or 'winfixheight'. (Jason
            Franklin)
c136af29c0
2018-08-21 22:36:31 -04:00
b5fc21dbf0 vim-patch:8.0.1707: when 'wfh' is set ":bel 10new" scrolls window
Problem:    When 'wfh' is set ":bel 10new" scrolls window. (Andrew Pyatkov)
Solution:   Set the fraction before changing the window height. (closes vim/vim#2798)
98da6ecab9
2018-08-21 12:44:06 -04:00
39777ad4b8 vim-patch:8.0.1426: "gf" and <cfile> don't accept ? and & in URL
Problem:    "gf" and <cfile> don't accept ? and & in URL. (Dmitrii Tcyganok)
Solution:   Check for a URL and allow for extra characters. (closes vim/vim#2493)
9e3dfc6501
2018-08-21 12:17:17 -04:00
387c3be82a vim-patch:8.0.1331: possible crash when window can be zero lines high
Problem:    Possible crash when window can be zero lines high. (Joseph
            Dornisch)
Solution:   Only set w_fraction if the window is at least two lines high.
3679c17917
2018-08-21 11:57:04 -04:00
19aa8ccf85 Merge pull request #8879 from janlazo/vim-8.1.0303
[RDY] vim-patch:8.1.0303
2018-08-21 11:29:24 -04:00
822ae1a81c vim-patch:8.1.0303: line2byte() is wrong for last line with 'noeol'
Problem:    line2byte() is wrong for last line with 'noeol' and 'nofixeol'.
Solution:   Fix off-by-one error. (Shane Harper, closes vim/vim#3351)
c26f7c6053
2018-08-21 10:20:17 -04:00
3807520001 Merge #8877 from janlazo/vim-8.0.1441 2018-08-21 09:33:09 +02:00
0c9888cdbe vim-patch:8.1.0110: file name not displayed with ":file" (#8878)
Problem:    File name not displayed with ":file" when 'F' is in 'shortmess'.
Solution:   Always display the file name when there is no argument (Christian
            Brabandt, closes vim/vim#3070)
fc0896093c

closes #8817
closes #8873
2018-08-21 09:25:48 +02:00
8872fce120 vim-patch.sh: Also check for .git/ directory
In the case of nested repos, such as when "neovim/" repo contains
"neovim/.vim-src/" repo,
    git rev-parse --show-toplevel
returns the fullpath to the "neovim/" repo, which failed the condition.

ref #8875
ref c05d7153d3
2018-08-21 08:37:49 +02:00
150b1b7b40 Merge #8861 from janlazo/vim-8.0.1364 2018-08-21 08:20:40 +02:00
ee51061b8c lint 2018-08-20 23:49:34 -04:00
612f3fd57a undo: undo_undoes is bool 2018-08-20 23:49:34 -04:00
0ff4854800 undo: did_undo,absolute in u_undo_end() are bool 2018-08-20 23:49:34 -04:00
6f55aa3502 undo: update undo_time() function signature
sec,file,absolute (params) are bool.
Fix callers and local variables of undo_time().
2018-08-20 23:49:34 -04:00
19717ca1e8 undo: above,did_undo in undo_time() are bool 2018-08-20 23:49:34 -04:00
66ed6297b0 vim-patch:8.0.1441: using ":undo 0" leaves undo in wrong state
Problem:    Using ":undo 0" leaves undo in wrong state.
Solution:   Instead of searching for state 1 and go above, just use the start.
            (Ozaki Kiichi, closes vim/vim#2595)
ce46d934af
2018-08-20 21:48:08 -04:00
0839c44257 Merge #8866 from janlazo/vim-8.0.0878 2018-08-20 23:09:10 +02:00
751c35d41b Merge #8872 from janlazo/vim-8.0.0762 2018-08-20 22:41:24 +02:00
768bc68d7e Merge #8860 from lucc/nvim_get_proc 2018-08-20 18:12:19 +02:00
c05d7153d3 vim-patch.sh: Use git-rev-parse to check repo (#8875)
Explicitly checking for the .git/ directory doesn't work in various
situations (e.g., git-worktree).

[ci skip]
2018-08-20 17:41:00 +02:00
96035a8343 search: "include" in current_tagblock() is bool 2018-08-20 10:44:34 -04:00
7763c19a70 vim-patch:8.1.0290: "cit" on an empty HTML tag changes the whole tag
Problem:    "cit" on an empty HTML tag changes the whole tag.
Solution:   Only adjust the area in Visual mode. (Andy Massimino,
            closes vim/vim#3332)
b476cb7d8d
2018-08-20 10:15:06 -04:00
953c3fcfee lint 2018-08-20 00:09:52 -04:00
f528aeff6e vim-patch:8.0.1487: test 14 fails
Problem:    Test 14 fails.
Solution:   Fix of-by-one error.
8846ac5aed
2018-08-20 00:09:52 -04:00
1d2b702008 vim-patch:8.0.1486: accessing invalid memory with "it"
Problem:    Accessing invalid memory with "it". (Dominique Pelle)
Solution:   Avoid going over the end of the line. (Christian Brabandt,
            closes vim/vim#2532)
82846a00ac
2018-08-20 00:05:12 -04:00
2c0998e104 vim-patch:8.0.1291: C indent wrong when * immediately follows comment
Problem:    C indent wrong when * immediately follows comment. (John Bowler)
Solution:   Do not see "/*" after "*" as a comment start. (closes vim/vim#2321)
f8c53d3d26
2018-08-20 00:05:12 -04:00
c553109932 vim-patch:8.1.0018: using "gn" may select wrong text when wrapping
Problem:    Using "gn" may select wrong text when wrapping.
Solution:   Avoid wrapping when searching forward. (Christian Brabandt)
bdb657924d
2018-08-19 15:53:34 -04:00
ff1d111120 vim-patch:8.0.1148: gN doesn't work on last match with 'wrapscan' off
Problem:    "gN" doesn't work on last match with 'wrapscan' off. (fcpg)
Solution:   Adjust for searching backward. (Christian Brabandt)
22ab547dc2
2018-08-19 09:01:19 -04:00
098e1f9dfd vim-patch:8.0.0762: ml_get error with :psearch in buffer without a name
Problem:    ml_get error with :psearch in buffer without a name. (Dominique
            Pelle)
Solution:   Use the buffer number instead of the file name.  Check the cursor
            position.
c31f9ae4f1
2018-08-18 21:55:54 -04:00
89fec12e9f vim-patch:8.0.1418: no test for expanding backticks
Problem:    No test for expanding backticks.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#2479)
ae6f865125
2018-08-18 11:26:00 -04:00
98632f1cce doc: Remove irrelevant line about "only the first" vimrc is used
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
2018-08-18 10:35:51 -04:00
4d10024a56 API: Remove path prefix from command name in nvim_get_proc()
On macOS the output from `ps -o comm` might contain the full path of the
executable.  The `ucomm` would be the basename only but is less portable
(see previous commit).
2018-08-18 14:37:33 +02:00
0223c81457 lint 2018-08-17 22:07:55 -04:00
7482aef113 normal: don't check has_mbyte
has_mbyte is always true for nvim.
2018-08-17 22:07:55 -04:00
f46728c241 vim-patch:8.0.1091: test for <cexpr> fails without +balloon_eval feature
Problem:    Test for <cexpr> fails without +balloon_eval feature.
Solution:   Remove #ifdefs.
95c83c64be
2018-08-17 22:07:55 -04:00
3d71366af1 vim-patch:8.0.1090: cannot get the text under the cursor like v:beval_text
Problem:    cannot get the text under the cursor like v:beval_text
Solution:   Add <cexpr>.
65f084749b
2018-08-17 17:36:40 -04:00
f53c95e7a8 vim-patch:8.1.0159: completion for user names does not work for a prefix.
Problem:    Completion for user names does not work if a prefix is also a full
            matching name. (Nazri Ramliy)
Solution:   Accept both full and partial matches. (Dominique Pelle)
6c5d104302
2018-08-17 17:36:40 -04:00
f5b7fd5fa3 ex_docmd: forceit,usefilter are bool 2018-08-17 09:07:15 -04:00
c7db42faab Merge pull request #8859 from bfredl/cmdline_norm
cmdline: always use save_cmdline before command_line_enter
2018-08-17 13:33:47 +02:00
4a46ab8de9 cmdline: always use save_cmdline before command_line_enter
":normal :" might be invoked in various ways, so its safest to always
allow recursive invocation of cmdline mode
2018-08-17 10:48:48 +02:00
58ad7fc578 ops: refactor get_spec_reg()
Return value is bool.
errmsg (param) is bool in here and in getaltfname().
allocated (param) is bool.
2018-08-16 23:05:33 -04:00
015df9c66e vim-patch:8.0.1787: cannot insert the whole cursor line
Problem:    Cannot insert the whole cursor line.
Solution:   Make CTRL-R CTRL-L work. (Andy Massimino, closes vim/vim#2857)
e2c8d83926
2018-08-16 21:33:30 -04:00
68cd18eb04 vim-patch:8.1.0101: no test for getcmdwintype()
Problem:    No test for getcmdwintype().
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3068)
81612b7a7d
2018-08-16 12:56:51 -04:00
14b148f0ad vim-patch:8.0.1816: no test for setcmdpos()
Problem:    No test for setcmdpos().
Solution:   Add a test. (Dominique Pelle, closes vim/vim#2901)
ff3be4fe1e
2018-08-16 12:30:15 -04:00
1dcdac013e vim-patch:8.0.1649: no completion for argument list commands
Problem:    No completion for argument list commands.
Solution:   Add arglist completion. (Yegappan Lakshmanan, closes vim/vim#2706)
cd43effeca
2018-08-16 11:47:56 -04:00
be552c8340 vim-patch:8.0.1231: expanding file name drops dash
Problem:    Expanding file name drops dash. (stucki)
Solution:   Use the right position. (Christian Brabandt, closes vim/vim#2184)
c312b8b87a
2018-08-16 11:08:00 -04:00
6531b175ad vim-patch:8.0.0878: no completion for :mapclear
Problem:    No completion for :mapclear.
Solution:   Add completion (Nobuhiro Takasaki et al. closes vim/vim#1943)
cae92dc3d5
2018-08-16 10:42:13 -04:00
c03fc7ef3e vim-patch:8.0.1509: test for failing drag-n-drop command no longer fails
Problem:    Test for failing drag-n-drop command no longer fails.
Solution:   Check for the "dnd" feature.
294959528e
2018-08-16 03:22:48 -04:00
0f9622ca25 vim-patch:8.0.1508: the :drop command is not always available
Problem:    The :drop command is not always available.
Solution:   Include :drop in all builds. (Yasuhiro Matsumoto, closes vim/vim#2639)
5a656864a0
2018-08-16 03:16:14 -04:00
d110c6d790 lint: cleanup after parent commits 2018-08-16 07:39:48 +03:00
30392b6356 Remove has_mbyte from lines near changes in parent commit 2018-08-16 06:03:49 +03:00
b10d822a77 vim-patch:8.1.0186: test for getwininfo() fails in GUI
Problem:    Test for getwininfo() fails in GUI.
Solution:   Account for missing tabline.
44a693a1bd
2018-08-15 21:17:33 -04:00
2036d04284 vim-patch:8.1.0184: not easy to figure out the window layout
Problem:    Not easy to figure out the window layout.
Solution:   Add "wincol" and "winrow" to what getwininfo() returns.
b6959a8e06
2018-08-15 20:37:53 -04:00
2bddc4ca54 Remove occurences of mb_head_off 2018-08-15 22:02:33 +03:00
b89c08901c vim-patch:8.0.1364: there is no easy way to get the window position
Problem:    There is no easy way to get the window position.
Solution:   Add win_screenpos().
22044dc317
2018-08-15 12:20:46 -04:00
b5cfac0894 Merge pull request #8806 from bfredl/bce
tui: fix resize and use BCE more often
2018-08-15 13:02:20 +02:00
794e7b4359 API: Use ps -o comm in nvim_get_proc()
- The POSIX version of ps(1) only specifies "comm" for the "-o" option
  but not "ucomm".  See
  http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html
- On Linux (with the procps-ng package) "ucomm" is an alias for "comm".
  See https://gitlab.com/procps-ng/procps
- OpenBSD also has "ucomm" as an alias for "comm" (with the extra note
  "Name to be used for accounting."). See https://man.openbsd.org/ps
- FreeBSD describes "ucomm" as "Name to be used for accounting." but
  does not say that it should be an alias for "comm". See
  https://www.freebsd.org/cgi/man.cgi?query=ps
2018-08-15 12:39:10 +02:00
ac2d661450 Merge #8829 from ZviRackover/fix-7401-step2 2018-08-15 10:28:53 +02:00
bdcd3c31c6 Merge #8852 from janlazo/vim-8.1.0161 2018-08-15 10:26:21 +02:00
26506f14bc Merge #8856 from janlazo/vim-8.0.1209 2018-08-15 10:18:22 +02:00
be1525d3c9 lint 2018-08-15 02:13:13 -04:00
a0938e068f vim-patch:8.0.1633: a TextChanged autocmd triggers when it is defined
Problem:    A TextChanged autocmd triggers when it is defined after creating a
            buffer.
Solution:   Set b_last_changedtick when opening a buffer. (Hirohito Highlight,
            closes vim/vim#2742)
8c64a36e40
2018-08-15 01:27:30 -04:00
ee37a0c79a vim-patch:8.0.1413: accessing freed memory in :cbuffer
Problem:    Accessing freed memory in :cbuffer.
Solution:   Get quickfix list after executing autocmds. (closes vim/vim#2470)
aaf6e43b7a
2018-08-15 01:27:30 -04:00
0bdd4e8393 oldtests: finish port of 8.0.1224 2018-08-15 01:27:30 -04:00
8e2a892e70 vim-patch:8.0.1409: buffer overflow in :tags command
Problem:    Buffer overflow in :tags command.
Solution:   Use vim_snprintf(). (Dominique Pelle, closes vim/vim#2471, closes vim/vim#2475)
            Add a test.
132f75255e
2018-08-15 01:27:30 -04:00
1daf2cb0ea vim-patch:8.0.1488: emacs tags no longer work
Problem:    Emacs tags no longer work. (zdohnal)
Solution:   Do not skip over end of line.
0d20737732
2018-08-15 01:27:30 -04:00
5e38ff105c vim-patch:8.0.1218: writing to freed memory in autocmd
Problem:    Writing to freed memory in autocmd.
Solution:   Make a copy of the tag line. (Dominique Pelle, closes vim/vim#2245)
8d84ff1a3c
2018-08-15 01:27:30 -04:00
84569693e1 vim-patch:8.0.1209: still too many old style tests
Problem:    Still too many old style tests.
Solution:   Convert a few more tests to new style. (Yegappan Lakshmanan,
            closes vim/vim#2230)
53f0c96239
2018-08-15 01:27:30 -04:00
5a0d0286ff TUI: use BCE again more often, as it provides smoother resizes and scrolling
add exceptions for terminals we know doesn't support BCE
2018-08-14 12:34:35 +02:00
5fad02c081 tui: reenable cursor movement optimizations (leftover from #8221) 2018-08-14 12:34:35 +02:00
e5bcf83380 tui: hack for invalid first line with non-bce resize 2018-08-14 12:34:35 +02:00
6c5f9219ef tui: use bce properly 2018-08-14 12:34:35 +02:00
f767cee100 Merge pull request #8790 from bfredl/hlattr
pass highlight attrs per value and thread-safely to TUI thread
2018-08-14 12:33:12 +02:00
999d33faf4 lint: clean up after parent commit 2018-08-14 08:38:38 +03:00
538ace9aae oldtests: win: a directory is not executable
Tests in 'test/functional/core/job_spec.lua' depend on this behavior.
2018-08-13 22:07:25 -04:00
bec5e4cb61 Merge #8832 from eraserhd/vim-insert-setline-undo-fixes 2018-08-14 02:17:05 +02:00
a1a5e35e9a vim-patch:8.1.0262: not enough testing for getftype()
Problem:    Not enough testing for getftype().
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3300)
1598f9937a
2018-08-13 16:06:29 -04:00
163680a58e vim-patch:8.0.1630: trimming white space is not that easy
Problem:    Trimming white space is not that easy.
Solution:   Add the trim() function. (Bukn, closes vim/vim#1280)
295ac5ab5e
2018-08-13 12:04:36 -04:00
e346c01c31 vim-patch:8.1.0161: buffer not updated with 'autoread' set if file was deleted
Problem:    Buffer not updated with 'autoread' set if file was deleted.
            (Michael Naumann)
Solution:   Don't set the timestamp to zero. (closes vim/vim#3165)
386bc82a3f

Sleep 2 seconds for autoread (https://github.com/neovim/neovim/pull/7592).
2018-08-13 11:33:04 -04:00
7676fc7562 Remove occurrences of 'has_mbyte' near lines changes by parent commit 2018-08-13 18:07:40 +03:00
7046258a38 Remove all occurrences of mb_off2cells 2018-08-13 18:07:40 +03:00
fa4c260100 cursor_shape: use attribute ids instead of syntax ids
As attribute ids is the convention in the UI protocol
Also remove non-threadsafe calls in tui.c to syntax module.
2018-08-13 13:35:35 +02:00
fab555e59c highlight: HlAttrs is a value type; treat it like such 2018-08-13 13:35:35 +02:00
ee5cc88a73 Merge #8851 from janlazo/vim-8.0.1227 2018-08-13 00:47:51 +02:00
a4c957bab7 lint 2018-08-12 18:21:58 -04:00
cfb2383c26 vim-patch:8.0.1397: pattern with \& following nothing gives an error
Problem:    Pattern with \& following nothing gives an error.
Solution:   Emit an empty node when needed.
890dd05492
2018-08-12 18:09:43 -04:00
3fd2efdb26 vim-patch:8.0.1257: no test for fix of undefined behavior
Problem:    No test for fix of undefined behavior.
Solution:   Add a test. (closes vim/vim#2255)
2973daafe1
2018-08-12 18:03:30 -04:00
0b38011328 vim-patch:8.0.1243: no test for what 8.0.1227 fixes
Problem:    No test for what 8.0.1227 fixes.
Solution:   Add a test that triggers the problem. (Christian Brabandt)
f45938cc20
2018-08-12 17:57:04 -04:00
7faf682525 vim-patch:8.0.1227: undefined left shift in readfile()
Problem:    Undefined left shift in readfile(). (Brian 'geeknik' Carpenter)
Solution:   Add cast to unsigned. (Dominique Pelle, closes vim/vim#2253)
dc1c981294
2018-08-12 17:56:23 -04:00
97331cab67 Merge #8843 from janlazo/vim-8.0.0828 2018-08-12 19:35:20 +02:00
ff19f08477 deps: get gperf-3.1.tar.gz from our mirror 2018-08-12 16:21:21 +02:00
addd181369 Merge #8837 from janlazo/vim-8.0.1290 2018-08-12 14:54:18 +02:00
1211fa09cf Merge #8833 from janlazo/vim-8.0.1004 2018-08-12 14:11:47 +02:00
ae24c9b270 Merge #8847 from janlazo/vim-8.0.1037 2018-08-12 13:05:59 +02:00
47f9ab4635 CI/travis: fix restore from cache
a369385009 fixed this for "~/.cache/nvim-deps/", but strangely not for
"~/.cache/nvim-deps-downloads/".

ref a369385009
ref #8316
ref #8281

Seen in https://travis-ci.org/neovim/neovim/jobs/414982972 :

    Using third-party dependencies from Travis cache (last update: Aug 11 23:00:15 2018).
    cp: /Users/travis/build/neovim/neovim/deps-downloads/nvim-deps-downloads/…/nvim-deps-downloads/libvterm/a9c7c6fd20fa35e0ad3e0e98901ca12dfca9c25c.tar.gz:
    name too long (not copied)
2018-08-12 12:38:38 +02:00
8ad46a25cb eval: match in find_some_match() is bool 2018-08-11 19:30:08 -04:00
3d77ca39c7 lint 2018-08-11 18:57:54 -04:00
d6a25f89b8 regexp: drop has_mbyte check in regmatch()
has_mbyte is always true in nvim.
2018-08-11 17:45:18 -04:00
594536a1e7 vim-patch:8.0.1361: some users don't want to diff with hidden buffers
Problem:    Some users don't want to diff with hidden buffers.
Solution:   Add the "hiddenoff" item to 'diffopt'. (Alisue, closes vim/vim#2394)
97ce419201
2018-08-11 15:06:07 -04:00
90128843f6 diff: drop enc_utf8 check in diff_equal_char()
enc_utf8 is always true for nvim.
2018-08-11 14:54:48 -04:00
fd334ec2a8 vim-patch:8.0.1046: code duplication in diff mode
Problem:    Code duplication in diff mode.
Solution:   Use diff_equal_char() also in diff_cmp(). (Rick Howe)
ae96b8d058
2018-08-11 14:54:39 -04:00
4f93d05d39 vim-patch:8.0.1037: "icase" of 'diffopt' is not used for highlighting
Problem:    "icase" of 'diffopt' is not used for highlighting differences.
Solution:   Also use "icase". (Rick Howe)
da22b8cc8b
2018-08-11 14:54:39 -04:00
d624aea454 lint 2018-08-11 14:37:17 -04:00
5f4a231e3f vim-patch:8.1.0099: exclamation mark in error message not needed
Problem:    Exclamation mark in error message not needed.
Solution:   Remove the exclamation mark.
3c867daaf0
2018-08-11 14:32:59 -04:00
9c4f6307b7 vim-patch:8.1.0097: superfluous space before exclamation mark
Problem:    Superfluous space before exclamation mark.
Solution:   Remove the space.  Don't translate debug message.
5efa0102de
2018-08-11 14:32:59 -04:00
96dc8c0d28 vim-patch:8.1.0090: "..." used inconsistently in a message
Problem:    "..." used inconsistently in a message.
Solution:   Define the message with " ..." once. (hint by Ken Takata)
9b0c5c23bd
2018-08-11 14:32:59 -04:00
b3ad509905 vim-patch:8.1.0078: "..." used inconsistently in messages
Problem:    "..." used inconsistently in messages.
Solution:   Drop the space before " ...".
c166927a32
2018-08-11 14:32:59 -04:00
cb708d203b vim-patch:8.0.1517: invalid memory acces with pattern using look-behind match
Problem:    Invalid memory acces with pattern using look-behind match.
            (Dominique Pelle)
Solution:   Get a pointer to the right line.
bc197195b0
2018-08-11 14:32:59 -04:00
5ed303c22b vim-patch:8.0.1470: integer overflow when using regexp pattern
Problem:    Integer overflow when using regexp pattern. (geeknik)
Solution:   Use a long instead of int. (Christian Brabandt, closes vim/vim#2251)
2c7b906afb
2018-08-11 14:32:59 -04:00
f7f65f5a82 vim-patch:8.0.1254: undefined left shift in gethexchrs()
Problem:    Undefined left shift in gethexchrs(). (geeknik)
Solution:   Use unsigned long. (idea by Christian Brabandt, closes vim/vim#2255)
4c22a91d20
2018-08-11 14:32:59 -04:00
dd6c1a0a8f vim-patch:8.0.0828: Coverity: may dereference NULL pointer
Problem:    Coverity: may dereference NULL pointer.
Solution:   Bail out if calloc_state() returns NULL.
983b3a5bc4
2018-08-11 14:32:59 -04:00
22311457ab refactor: Replace vim_strrchr() with strrchar() (#8718)
ref #1474
2018-08-11 16:14:10 +02:00
6aefae8c4e terminfo: add header guard, stdint.h for int8_t (#8848)
Lint fixes for single-include test.
2018-08-11 16:06:57 +02:00
c30812be7b Merge #8845 from janlazo/vim-8.0.1490 2018-08-10 20:08:18 +02:00
a5e3f4da34 tutor: don't set statusline (#8844)
also, remove unused function tutor#InfoText()

fixes #8842
2018-08-10 19:01:17 +02:00
5ee9161f81 lint 2018-08-10 12:54:18 -04:00
efbf70600c vim-patch:8.0.1490: number of spell regions is spread out through the code
Problem:    Number of spell regions is spread out through the code.
Solution:   Define MAXREGIONS.
2993ac5fce
2018-08-10 12:35:38 -04:00
2841e89cf1 Merge pull request #7981 from mhinz/update-terminfo-rxvt
[RDY] terminfo: update built-in terminfo entries by script
2018-08-10 10:35:39 -04:00
092f1a3e2c terminfo: update built-in terminfo entries
The arrays are put in their own file: terminfo_defs.h. This makes it simple to
update all terminfo entries in one go using scripts/update_terminfo.sh.

The entries were compiled with tic 6.1 and some use the extended number format.
2018-08-10 14:58:23 +02:00
ceeca24205 terminfo: add scripts/update_terminfo.sh
This script updates the built-in terminfo entries.

[skip ci]
2018-08-10 14:58:23 +02:00
fcd58c59eb Merge pull request #8838 from jamessan/vim-patch-issue-regex
vim-patch.sh: Fix replacement which converts #1234 to vim/vim#1234
2018-08-09 20:11:44 -04:00
68411dc189 vim-patch.sh: Fix replacement which converts #1234 to vim/vim#1234
Noticed in cb7bdf5f, where the script incorrectly converted `#ifdef` to
`vim/vim#ifdef`.

[skip ci]
2018-08-09 20:10:41 -04:00
09c2184660 oldtests: Test_undofile() passes
Set undodir to Vim's default value.
Fix pathsep of expected undofile path for Windows.
Comment out invalid test case for Neovim.
2018-08-09 19:53:05 -04:00
c6dd84e00b Fix lint 2018-08-09 16:46:50 -07:00
3c41df2691 vim-patch:8.1.0256: using setline() in TextChangedI splits undo
Problem:    Using setline() in TextChangedI splits undo.
Solution:   Use another solution for undo not working properly.
9fa9506853

This deviates from Vim in the handling of the CursorHoldI event.  In
Vim, any buffer changes are merged into the insert.  In Neovim,
CursorHoldI is handled via the multiqueue, and the point at which
the cursor hold is implemented (in input.c) doesn't know enough about it.
Making all queued events merge into the insert seems more wronger since
changes by other asynchronous events really should be separately
undoable.
2018-08-09 16:46:50 -07:00
d45efa5793 vim-patch:8.1.0245: calling setline() in TextChangedI autocmd breaks undo
Problem:    Calling setline() in TextChangedI autocmd breaks undo. (Jason
            Felice)
Solution:   Don't save lines for undo when already saved. (closes vim/vim#3291)
91d2e783b4
2018-08-09 16:46:11 -07:00
0a8be9f8ef vim-patch:8.1.0057: popup menu displayed wrong when using autocmd
Problem:    Popup menu displayed wrong when using autocmd.
Solution:   Use aucmd_prepbuf().  Force updating status line if the popup menu
            is going to be redrawn anyway. (Christian Brabandt, closes vim/vim#3009)
6ba3ec1bac
2018-08-09 16:46:01 -07:00
cf9dd7a3f4 Merge #8835 from janlazo/vim-8.0.1819 2018-08-10 00:01:32 +02:00
1c1722105c vim-patch:8.1.0025: no test for the undofile() function
Problem:    No test for the undofile() function.
Solution:   Add test. (Dominique Pelle, closes vim/vim#2958)
e5fa11186f
2018-08-09 16:06:00 -04:00
6853690c78 vim-patch:8.0.1433: illegal memory access after undo
Problem:    Illegal memory access after undo. (Dominique Pelle)
Solution:   Avoid the column becomes negative. (Christian Brabandt,
            closes vim/vim#2533)
95dbcbea6d
2018-08-09 15:32:13 -04:00
fc8965787b memline: fnamecmp_ino() returns bool 2018-08-09 14:19:26 -04:00
e36fce75fb vim-patch:8.0.1819: swap file warning for file with non-existing directory
Problem:    Swap file warning for a file in a non-existing directory, if there
            is another with the same file name. (Juergen Weigert)
Solution:   When expanding the file name fails compare the file names.
8c3169c58e
2018-08-09 14:12:57 -04:00
4e963f2462 vim-patch:8.0.1290: seq_cur of undotree() wrong after undo
Problem:    seq_cur of undotree() wrong after undo.
Solution:   Get the actual sequence number instead of decrementing the current
            one. (Ozaki Kiichi, closes vim/vim#2319)
80eaddd3a0
2018-08-09 13:30:42 -04:00
cb7bdf5f92 vim-patch:8.1.0024: test % command (#8834)
Problem:    % command not testded on vim/vim#ifdef and comment.
Solution:   Add tests. (Dominique Pelle, closes vim/vim#2956)
6b69e5c646
2018-08-09 18:41:36 +02:00
6ad8294d5c vim-patch:8.1.0257: no test for pathshorten()
Problem:    No test for pathshorten().
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3295)
bfde0b482d
2018-08-09 09:49:07 -04:00
218fccaba4 vim-patch:8.1.0204: inputlist() is not tested
Problem:    inputlist() is not tested.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3240)
947b39e761
2018-08-09 09:25:26 -04:00
047dfcd294 vim-patch:8.1.0008: no test for strwidth()
Problem:    No test for strwidth().
Solution:   Add a test. (Dominique Pelle, closes vim/vim#2931)
42ab17b8e3
2018-08-09 08:09:37 -04:00
4420dc3067 vim-patch:8.0.1421: accessing invalid memory with overlong byte sequence
Problem:    Accessing invalid memory with overlong byte sequence.
Solution:   Check for NUL character. (test by Dominique Pelle, closes vim/vim#2485)
e6640ad44e
2018-08-09 00:55:20 -04:00
a445887985 vim-patch:8.0.1410: hang when using count() with an empty string
Problem:    Hang when using count() with an empty string.
Solution:   Return zero for an empty string. (Dominique Pelle, closes vim/vim#2465)
338e47fdfd
2018-08-09 00:44:06 -04:00
fe6cf2812b vim-patch:8.0.1105: match() and matchend() are not tested
Problem:    match() and matchend() are not tested.
Solution:   Add tests. (Ozaki Kiichi, closes vim/vim#2088)
1190cf68e2
2018-08-08 22:38:23 -04:00
3c6eb9871a vim-patch:8.0.1004: matchstrpos() without a match returns too many items
Problem:    Matchstrpos() without a match returns too many items.
Solution:   Also remove the second item when the position is beyond the end of
            the string. (Hirohito Higashi)  Use an enum for the type.
8d9f0ef5c6
2018-08-08 21:59:24 -04:00
0b3555b5dd Merge #8831 from janlazo/vim-8.1.0009 2018-08-09 02:30:19 +02:00
72fecad1ff Merge #8804 from battlmonstr/lang_region_crash
Fix crash in lang_init() on macOS if lang_region = NULL
2018-08-09 02:02:36 +02:00
0478fb3b58 Merge #8797 from janlazo/vim-8.0.0687 2018-08-09 02:00:28 +02:00
c7efc6047d vim-patch.sh: Pass directory name to find (#8830)
BSD/Mac find requires directory names before arguments.
2018-08-09 01:56:55 +02:00
f7f79c60bb vim-patch:8.1.0241: effect of ":tabmove N" is not clear
Problem:    Effect of ":tabmove N" is not clear.
Solution:   Add a test that shows the behavior. (Christian Brabandt,
            closes vim/vim#3288)
7cc596547a
2018-08-08 19:36:07 -04:00
345789f9ef vim-patch:8.1.0009: tabpages insufficiently tested
Problem:    Tabpages insufficiently tested.
Solution:   Add more test coverage. (Dominique Pelle, closes vim/vim#2934)
dbe8869c41
2018-08-08 19:35:35 -04:00
d581398779 ruby: detect rbenv shims for other versions (#8733)
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().
2018-08-09 00:47:35 +02:00
c1187d4af0 defaults: win: 'shellpipe' for cmd.exe (#8827)
">%s 2>&1" redirects stderr to a file, same as 'shellredir' on Windows.
2018-08-08 23:37:14 +02:00
8213109304 Merge #8821 from janlazo/vim-8.1.0003 2018-08-08 10:49:09 +02:00
d6af425322 oldtests: win: set shellpipe for cmd.exe
Redirect errors from :make to error file.
Fix execption error in test_compiler.vim on Windows.
2018-08-07 23:04:04 -04:00
b7a417c5e6 Merge #8744 from janlazo/vim-8.0.0890 2018-08-08 02:22:34 +02:00
c06613d2f6 Merge #8665 'Remove mb_ptr2char macro' 2018-08-08 01:24:18 +02:00
d5e8b3f451 misc: fixpos in del_char() is bool 2018-08-07 19:07:54 -04:00
0e4a54a17b edit: end_insert in check_auto_format() is bool 2018-08-07 13:20:46 -04:00
a2eff8f15c edit: did_add_space is bool 2018-08-07 13:16:38 -04:00
672449e448 memline: copy in ml_replace() is bool 2018-08-07 13:11:51 -04:00
80df0a8fd2 ops: is_del in block_prep() is bool 2018-08-07 12:13:41 -04:00
2b229b816b window: no_display in restore_win() is bool 2018-08-07 11:40:54 -04:00
1468946154 ops: add const to shift_block() variables 2018-08-07 11:35:07 -04:00
5493139c9f tests: win: fix pathsep of :compiler paths 2018-08-06 23:51:10 -04:00
daca22f5b2 vim-patch:8.1.0005: test for :compiler command fails on MS-Windows
Problem:    Test for :compiler command fails on MS-Windows.
Solution:   Ignore difference in path.
d19b234154
2018-08-06 22:55:04 -04:00
196cc13130 vim-patch:8.1.0004: test for :compiler command sometimes fails
Problem:    Test for :compiler command sometimes fails.
Solution:   Be less strict about the error message. (Dominique Pelle)
54651f7494
2018-08-06 22:54:16 -04:00
f9f37193d1 vim-patch:8.1.0003: the :compiler command is not tested
Problem:    The :compiler command is not tested.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#2930)
10561fe0a3
2018-08-06 22:53:53 -04:00
c233277737 eval: add const to f_gettabvar() variables 2018-08-06 21:56:39 -04:00
e6127a49db edit: temp in ins_del() is const int 2018-08-06 21:56:39 -04:00
f807a7de04 vim-patch:8.1.0007: no test for "o" and "O" in Visual block mode
Problem:    No test for "o" and "O" in Visual block mode.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#2932)
2e94976abd
2018-08-06 21:56:39 -04:00
343c226abf vim-patch:8.0.1811: no test for winrestcmd()
Problem:    No test for winrestcmd().
Solution:   Add a test. (Dominique Pelle, closes vim/vim#2894)
72cf47a279
2018-08-06 21:56:39 -04:00
1b3cbb39a1 vim-patch:8.0.1705: when making a vertical split the mode message isn't updated
Problem:    When making a vertical split the mode message isn't always
            updated, "VISUAL" remains. (Alexei Averchenko)
Solution:   Only reset clear_cmdline when filling all columns of the last
            screen line. (Tom M. closes vim/vim#2611)
5bab555c2f
2018-08-06 21:56:39 -04:00
a8ff55d50e vim-patch:8.0.1446: acessing freed memory after window command in auto command
Problem:    Acessing freed memory after window command in auto command.
            (gy741)
Solution:   Adjust the pointer in the parent frame. (Christian Brabandt,
            closes vim/vim#2467)
6f361c9912
2018-08-06 21:56:39 -04:00
ce5d755048 vim-patch:8.0.1579: virtual replace test fails in GUI
Problem:    Virtual replace test fails in GUI.
Solution:   Don't save key options if they were not set.
df0d24b627
2018-08-06 21:56:39 -04:00
62424fe6ee vim-patch:8.0.1577: virtual replace test fails on MS-Windows
Problem:    Virtual replace test fails on MS-Windows.
Solution:   Make adding a termcap entry work for a builtin terminal.
            Restore terminal keys in a better way.
e780848150
2018-08-06 21:56:39 -04:00
f53c2578e7 vim-patch:8.0.1575: crash when using virtual replace
Problem:    Crash when using virtual replace.
Solution:   Adjust orig_line_count.  Add more tests. (Christian Brabandt)
63e82db6fc
2018-08-06 21:56:39 -04:00
7f2e352700 vim-patch:8.0.0879: crash when shifting with huge number
Problem:    Crash when shifting with huge number.
Solution:   Check for overflow. (Dominique Pelle, closes vim/vim#1945)
bae5a17a73
2018-08-06 21:56:39 -04:00
0e57c753d6 vim-patch:8.0.1601: highlight test fails on Win32
Problem:    Highlight test fails on Win32.
Solution:   Check for vtp and vcon support.
ff1e879577
2018-08-06 21:56:39 -04:00
e105e1242a vim-patch:8.0.1600: crash when setting t_Co to zero when 'termguicolors' is set
Problem:    Crash when setting t_Co to zero when 'termguicolors' is set.
Solution:   Use IS_CTERM instead of checking the number of colors.
            (closes vim/vim#2710)
f708ac592f
2018-08-06 21:56:39 -04:00
11bd0b8870 vim-patch:8.0.1169: highlignting one char too many with 'list' and 'cul'
Problem:    Highlignting one char too many with 'list' and 'cul'.
Solution:   Check for 'list' being active. (Ozaki Kiichi, closes vim/vim#2177)
5ece3e359c
2018-08-06 21:56:39 -04:00
a920ae89e9 vim-patch:8.0.1168: wrong highlighting with combination of match and 'cursorline'
Problem:    wrong highlighting with combination of match and 'cursorline'.
Solution:   Use "line_attr" when appropriate. (Ozaki Kiichi, closes vim/vim#2111)
            But don't highlight more than one character.
0aa398f55a
2018-08-06 21:56:38 -04:00
593c0bd77f vim-patch:8.0.1216: tabline is not always updated for :file command
Problem:    Tabline is not always updated for :file command. (Norio Takagi)
Solution:   Set redraw_tabline. (Hirohito Higashi)
6ce6504808
2018-08-06 21:56:38 -04:00
059986e038 vim-patch:8.0.1160: getting tab-local variable fails after closing window
Problem:    Getting tab-local variable fails after closing window.
Solution:   set tp_firstwin and tp_lastwin. (Jason Franklin, closes vim/vim#2170)
816968defc
2018-08-06 21:56:38 -04:00
d671168574 vim-patch:8.0.0890: still many old style tests
Problem:    Still many old style tests.
Solution:   Convert several tests to new style. (Yegappan Lakshmanan)
75373f3808
2018-08-06 21:56:38 -04:00
5cecd7a93a style: fixing minor issues noted in code review. 2018-08-06 22:27:10 +03:00
071aab5148 Remove some occrrences of enc_utf8 and has_mbyte
Removing uses and related dead code in the locallity of changes of
the two parent commits.
2018-08-06 20:48:07 +03:00
cd3b2e4b6b lint: clean-up after parent commit 2018-08-06 20:48:07 +03:00
10b6afd652 Remove all occurences of the mb_ptr2char macro
First step towards implemening issue #7401.

The same can be done for all deprecated mb_ functions in follow-up
patches.
2018-08-06 20:48:07 +03:00
1593ee7cf2 Merge #8820 from janlazo/vim-8.0.0671 2018-08-06 19:16:42 +02:00
41dbb69a85 lint 2018-08-06 11:49:59 -04:00
47d52e1578 globals: did_ai is bool 2018-08-06 11:49:59 -04:00
b9ab363636 globals: did_si is bool 2018-08-06 11:49:59 -04:00
7692dfeecb globals: can_si is bool 2018-08-06 11:49:59 -04:00
5309ad29d4 globals: can_si_back is bool 2018-08-06 11:49:59 -04:00
6bff0f7b60 edit: haveto_redraw (local variable) is bool 2018-08-06 11:49:59 -04:00
96f165e744 edit: can_cindent is bool 2018-08-06 11:49:59 -04:00
8f75debd86 edit: fix variables in ins_mousescroll()
Declare and initialize them on same line.
Add const if possible.
Refactor 'did_scroll' local variable from int to bool.
2018-08-06 11:49:59 -04:00
4df0ea98dc globals: typebuf_was_filled is bool 2018-08-06 11:49:59 -04:00
3aca372ac8 vim-patch:8.1.0240: g:actual_curbuf set in wrong scope (#8818)
Problem:    g:actual_curbuf set in wrong scope. (Daniel Hahler)
Solution:   Prepend the "g:" name space. (closes vim/vim#3279)
3cb4448b8a
2018-08-06 03:37:15 +02:00
4ca2cf4b47 vim-patch:8.0.1507: timer test is a bit flaky
Problem:    Timer test is a bit flaky.
Solution:   Add it to the list of flaky tests.
bfbea567d8
2018-08-05 17:55:49 -04:00
e7e2115de5 vim-patch:8.0.0948: crash if timer closes window while dragging status line
Problem:    Crash if timer closes window while dragging status line.
Solution:   Check if the window still exists. (Yasuhiro Matsumoto, closes
            vim/vim#1979)
989a70c590
2018-08-05 17:42:49 -04:00
fe6e4b3244 vim-patch:8.0.0722: screen is messed by timer up at inputlist() prompt
Problem:    Screen is messed by timer up at inputlist() prompt.
Solution:   Set state to ASKMORE. (closes vim/vim#1843)
c9041079a1
2018-08-05 17:20:09 -04:00
2b8792e303 vim-patch:8.0.0671: hang when typing CTRL-C in confirm() in timer
Problem:    When a function invoked from a timer calls confirm() and the user
            types CTRL-C then Vim hangs.
Solution:   Reset typebuf_was_filled. (Ozaki Kiichi, closes vim/vim#1791)
4eb6531b03
2018-08-05 17:18:57 -04:00
b42c80e561 eval, ex_getln: Fix incompatible pointer types (#8792)
Fixes #8786

gcc (GCC) 8.1.1 20180531 warning:

[76/182] Building C object src/nvim/CMakeFiles/nvim.dir/ex_getln.c.o
../src/nvim/ex_getln.c: In function ‘ExpandUserDefined’:
../src/nvim/ex_getln.c:5071:34: warning: cast between incompatible function types from ‘char * (*)(const char * const,  const int,  const char_u * const* const,  const _Bool)’ {aka ‘char * (*)(const char * const,  const int,  const unsigned char * const* const,  const _Bool)’} to ‘void * (*)(char_u *, int,  char_u **, int)’ {aka ‘void * (*)(unsigned char *, int,  unsigned char **, int)’} [-Wcast-function-type]
   retstr = call_user_expand_func((user_expand_func_T)call_func_retstr, xp,
2018-08-05 02:37:00 +02:00
5d8a47b6e0 syntax.h: fix include #8742 2018-08-05 01:50:25 +02:00
7a4d167a92 Merge #8742 vim-patch:8.0.0791,0831,1072,1078,1088 2018-08-04 20:12:48 +02:00
e861da247e Merge #8749 from janlazo/clint-tristate 2018-08-04 19:37:58 +02:00
a4c9447623 Merge #8799 from janlazo/nvim-8.0.1541 2018-08-04 19:09:46 +02:00
c51c2f5a65 misc: refactor plines_win{,_nofill}()
Add const to params and variables (declare and init on same line).
winheight (param) is bool so replace TRUE/FALSE macros with true/false.
2018-08-02 23:11:27 -04:00
766683622a fold: add const to foldSplit() variables 2018-08-02 18:29:16 -04:00
6710522751 fold: add const to foldUpdateIEMSRecurse() vars 2018-08-02 17:51:38 -04:00
21acc7c0fa fold: add const to foldUpdateIEMS() variables 2018-08-02 17:29:21 -04:00
1ec5485db4 fold: add const to checkSmall() variables 2018-08-02 17:15:53 -04:00
20eeb61fb2 fold: declare and init vars in deleteFoldEntry()
Use sizeof() on pointer value, not explicit type, for memmove.
2018-08-02 13:10:25 -04:00
a515401cf0 fold: add const to foldMoveTo() variables
Declare and initialize variables on same line if possible.
2018-08-02 12:50:50 -04:00
407ac8b42d fold: add const to deleteFold() variables
Declare and initialize variables on same line if possible.
2018-08-02 11:58:50 -04:00
3de785e7b5 fold: add const to hasFoldingWin() variables
cache is bool so update callers to pass true/false, not TRUE/FALSE.
2018-08-02 08:44:42 -04:00
2b9fc9a13f Merge pull request #8660 from phodge/7688-nvim-buf-lines-should-return-empty-list-for-unloaded-buffer
handle unloaded buffers in nvim_buf_*() functions
2018-08-02 13:28:36 +02:00
d2c1d9c466 ex_cmds: add const to helptags_one() variables 2018-08-01 23:21:17 -04:00
144e85b7b9 ex_cmds: add const to fix_help_buffer() variables 2018-08-01 23:02:52 -04:00
d29c02710e hardcopy: refactor mch_print_start_line()
Refactor the following affected functions:
- prt_line_number()
- prt_header()

These use prt_set_font(), refactored in 872a76f3dac14fdcb7dc7b34cecd3acb4370d56f for TriState.
2018-08-01 15:28:50 -04:00
d536fb018f hardcopy: bold,italic,underline are TriState 2018-08-01 15:28:50 -04:00
c0dbd8df95 fold: use_level,maybe_small are bool
use_levelp, maybe_smallp in check_closed() are bool ptrs.
2018-08-01 15:28:50 -04:00
44cb491f6e globals: virtual_op is TriState 2018-08-01 15:28:49 -04:00
faa9869a9e fold: recursive in deleteFoldEntry() is bool 2018-08-01 15:28:49 -04:00
14cffc3d1d fold: fold_changed is bool 2018-08-01 15:28:49 -04:00
667b8cd108 fold: finish in foldUpdateIEMSRecurse() is bool 2018-08-01 15:28:49 -04:00
3f8ba68895 screen: screen_cleared is TriState 2018-08-01 15:28:49 -04:00
971e9370ad fold: lineFolded() is bool 2018-08-01 15:28:49 -04:00
6dfaf8e914 fold: check_closed() returns bool
Update affected variables (ie. had_folded).
Add const to params to restrict usage.

TODO: refactor win_T.w_lines[idx].wl_folded from char to bool
2018-08-01 15:28:49 -04:00
4fb9b42869 search: refactor variables in findmatchlimit()
Combine declaration and initialization.
Refactor int variables, that use TRUE/FALSE macros (not MAYBE), to bool.
2018-08-01 15:28:49 -04:00
ba6417091c search: start_in_quotes in findmatchlimit is TriState 2018-08-01 15:28:49 -04:00
0e55d88639 edit: dont_sync_undo is TriState 2018-08-01 15:28:49 -04:00
deae2e8434 ex_cmds: refactor utf8 variables to TriState
- utf8 in helptags_one()
- this_utf in fix_help_buffer()
2018-08-01 15:28:49 -04:00
f35df8d697 menu: enable in ex_menu() is TriState 2018-08-01 15:28:49 -04:00
f193b5241f fold: fold_T.fd_small is TriState 2018-08-01 15:28:49 -04:00
9e20398908 diff: refactor diff_a_works to use TriState 2018-08-01 15:28:44 -04:00
a095a48987 clint: detect MAYBE and recommend TriState
Vim uses MAYBE for 3-value boolean with FALSE/TRUE/MAYBE.
Use TriState type instead to restrict to 3 values, kFalse/kTrue/kNone.
2018-08-01 15:23:01 -04:00
e92f1bb271 Fix crash in lang_init() on macOS if lang_region = NULL
This is a regression after PR #7704:
mac: Set $LANG based on the system locale

CFStringGetCStringPtr sometimes returns "lang_region" = NULL,
in this case CFStringGetCString is used instead,
which places output to "buf", but "buf" was not used
by the code.
2018-08-01 12:00:13 +02:00
c83ecee885 syntax: syn_pattern.sp_syncing is bool 2018-07-30 18:09:34 -04:00
1c5eee3c91 syntax: add const to get_syntax_attr() params 2018-07-30 16:19:38 -04:00
8f647cf03c syntax: add const to syn_finish_line() params,vars 2018-07-30 15:29:22 -04:00
eafcfb2fb5 syntax: did_header is bool
Refactor all affected functions:
- add const
- declare and initialize on same line
- update boolean declarations from int with bool
2018-07-29 20:28:44 -04:00
d3f609db05 syntax: disptick_T is uint16_t 2018-07-29 18:03:16 -04:00
3feabcacb0 syntax: scl_id is int 2018-07-29 08:20:00 -04:00
3e6d3bf3bd vim-patch:8.0.1088: occasional memory use after free
Problem:    Occasional memory use after free.
Solution:   Use the highlight table directly, don't keep a pointer.
414168d97f
2018-07-29 07:52:45 -04:00
f0ca2283b0 vim-patch:8.0.1078: using freed memory with ":hi Normal"
Problem:    Using freed memory with ":hi Normal".
Solution:   Get "item" again after updating the table.
b4ea1914b8
2018-07-29 07:52:45 -04:00
6b7b56dabe vim-patch:8.0.1072: :highlight command causes a redraw even when nothing changed
Problem:    The :highlight command causes a redraw even when nothing changed.
Solution:   Only set "need_highlight_changed" when an attribute changed.
99433291b1
2018-07-29 07:52:45 -04:00
0c0318f8a7 vim-patch:8.0.0831: with 8 colors the bold attribute is not set properly
Problem:    With 8 colors the bold attribute is not set properly.
Solution:   Move setting HL_TABLE() out of lookup_color. (closes vim/vim#1901)
12d853fae1

Use TriState on lookup_color() to avoid 'NOLINT' comments.
2018-07-29 07:52:45 -04:00
5af90e2ee7 vim-patch:8.0.0791: terminal colors depend on the system
Problem:    Terminal colors depend on the system.
Solution:   Use the highlight color lookup tables.
b41bf8e6b4
2018-07-29 07:52:45 -04:00
51f939e912 syntax: refactor get_id_list()
Add const to parameters and variables.
Declare and init variables on same line.
Use `sizeof(*ptr)` to calculate size for malloc().
2018-07-29 07:51:51 -04:00
c18a1b9034 syntax: refactor syn_combine_list()
Add const on parameters and variables.
Update declarations to avoid typecasts.
Use `sizeof(*ptr)` for malloc() to reduce effect of type changes.
ie. short to int16_t

Update syn_compare_stub() variable declarations for consistency.
2018-07-29 07:51:51 -04:00
6646502bbb syntax: syn_cluster_T.scl_list is int16_t* 2018-07-29 07:51:51 -04:00
8888a6ce80 syntax: refactor syn_current_attr()
Declare and initialize variables on same line if possible.
Add const to parameters and variables.
Use bool for any parameter,variable using TRUE/FALSE macros.
Replace 'short' type with 'int16_t'.
2018-07-29 07:51:51 -04:00
db4bddb770 syntax: use const on check_keyword_id() variables
Declare and initialize variables as close as possible.
Use const pointers without changing semantics if possible.
2018-07-29 07:51:51 -04:00
2a7047b77c syntax: syn_state.sst_next_list is int16_t* 2018-07-29 07:51:51 -04:00
eb7aa76b13 syntax: current_next_list is int16_t* 2018-07-29 07:51:51 -04:00
095ddcb548 syntax: update types of stateitem_T members
Replace 'short' with 'int16_t' to match lint changes from 8.0.1541.
Update ID_LIST_ALL to match type of stateitem_T.si_cont_list.
2018-07-29 07:51:51 -04:00
6f5eadcdac syntax: use const on syn_list_keywords() variables 2018-07-29 07:51:50 -04:00
9b34b867dd syntax: update types for keyentry_T,sp_syn
Replace 'short' with 'int16_t'
2018-07-29 07:51:50 -04:00
e6993f2491 syntax: use const on copy_id_list() params,vars 2018-07-29 07:51:50 -04:00
ef3cbd91cb syntax: use const on add_keyword() params,vars 2018-07-29 07:51:50 -04:00
a34066963e syntax: update types of syn_opt_arg_T members
Use bool, not int, for booleans.
Use int16_t, not short, to match lint changes from patch 8.0.1541.
2018-07-29 07:51:50 -04:00
9229f7a05d syntax: use const on put_id_list() variables 2018-07-29 07:51:50 -04:00
b647ba6afb vim-patch:8.0.1541: synpat_T is taking too much memory
Problem:    synpat_T is taking too much memory.
Solution:   Reorder members to reduce padding. (Dominique Pelle, closes vim/vim#2671)
36f923014a
2018-07-29 07:51:50 -04:00
eaa2cd9f7c vim-patch:8.0.0735: no indication that the quickfix window/buffer changed
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
2018-07-28 23:58:34 -04:00
91b8210779 vim-patch:8.0.0687: minor issues related to quickfix
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
2018-07-28 23:58:34 -04:00
a2253744c9 system(): handle profiling and 'verbose' #8730
closes #8362

Vim's code calls `call_shell` directly from `get_system_output_as_rettv`
whereas in Nvim this function has been rewritten to not call `call_shell` but to call
`os_system` via `do_os_system`, losing the support for profiling and verbose.

Changing the code to call `call_shell` from `get_system_output_as_rettv`
seems to be too complicated to be worth it on the current version of the
code. So this commit duplicates the relevant code.
2018-07-29 03:49:11 +02:00
befc7de26f Merge pull request #8770 from janlazo/vim-8.0.0726 2018-07-29 02:00:48 +02:00
a4494b7cbc checkhealth: always report stderr with errors (#8783)
This also reports the exit code (e.g. 127 for when pyenv-which fails).
2018-07-29 01:46:59 +02:00
ade88fe4cc checkhealth: do not use exepath with host_prog (#8784)
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
2018-07-29 01:44:46 +02:00
bb33fc4f55 log.c: Fix possible truncation in buffer (#8791) 2018-07-29 01:38:17 +02:00
8951304c10 Merge #8793 from janlazo/vim-8.0.0837 2018-07-29 01:32:39 +02:00
e09e9ca810 lint 2018-07-27 18:43:53 -04:00
882782f0fb screen: add const and reindent update_debug_signs() 2018-07-27 18:43:53 -04:00
243d16688a vim-patch:8.0.0837: signs can be drawn on top of console messages
Problem:    Signs can be drawn on top of console messages.
Solution:   don't redraw at a prompt or when scrolled up. (Christian Brabandt,
            closes vim/vim#1907)
0792048842
2018-07-27 18:40:31 -04:00
9abe0bdb54 Merge pull request #8789 from bfredl/updatehl
screen.c: add update_window_hl to special redrawing entrypoints, fixes a crash
2018-07-27 23:20:58 +02:00
9a584773b5 screen.c: add update_window_hl to special redrawing entrypoints
The following (run as a script) used to cause a crash due to :sign using a
special redraw (not updating nvim's specific highlight data structures)
without proper redraw first, as split just flags for redraw later.

set cursorline
sign define piet text=>> texthl=Search
split
sign place 3 line=2 name=piet buffer=1
2018-07-27 17:11:01 +02:00
85a7170f19 Merge pull request #8767 from janlazo/vim-8.0.0493
[RDY] vim-patch:8.0.0493
2018-07-27 10:50:57 -04:00
594859fdd6 Merge pull request #8485 from janlazo/vim-8.0.1012
[RDY] vim-patch:8.0.{805,806,810,1012,1017}
2018-07-27 10:44:29 -04:00
e42688fcf3 Merge pull request #8769 from janlazo/vim-8.0.1502
[RDY] vim-patch:8.0.{1502,1512,1622}
2018-07-27 10:06:46 -04:00
5f15788dc3 tui: clip invalid regions on resize (#8779), fixes #8774 2018-07-26 19:55:26 +02:00
9c0c5e8bc6 Merge #8729 'log: milliseconds, format' 2018-07-25 16:29:23 +02:00
27dc42160f log.c: format: padding
- milliseconds: leading zeroes
- PID: whitespace padding
2018-07-25 15:29:57 +02:00
ea2e8f4f10 DOC: regenerate api docs 2018-07-25 15:07:13 +10:00
7ab27eeb53 DOC: add support for intro sections in api docs 2018-07-25 15:07:13 +10:00
b53b621ef6 functests: tests related to operations on unloaded buffers #7688 2018-07-25 15:07:13 +10:00
10bb11e8d1 API: update docs WRT behaviours/methods for unloaded buffers #7688 2018-07-25 15:07:13 +10:00
8ff0872cf7 API: add nvim_buf_is_loaded() #7688 2018-07-25 15:07:13 +10:00
40e2d6b59b API: buf_get_lines, buf_line_count handle unloaded buffers #7688 2018-07-25 15:07:13 +10:00
ae52170a52 cmake: bump API version 2018-07-25 14:09:04 +10:00
30bba7a10c vim-patch:8.0.1017: test for MS-Windows $HOME always passes
Problem:    Test for MS-Windows $HOME always passes.
Solution:   Rename the test function.  Make the test pass.
dde6034111

Assume $HOME contains the literal absolute path.
Nested environment variable expansion is unsupported.
2018-07-24 23:17:36 -04:00
5ed0975ea2 vim-patch:8.0.1012: MS-Windows: problem with $HOME when is was set internally
Problem:    MS-Windows: Problem with $HOME when is was set internally.
Solution:   Only use the $HOME default internally. (Yasuhiro Matsumoto, closes
            vim/vim#2013)
48340b62e8

Restore vim_getenv() behaviour for $HOME on Windows.
2018-07-24 23:17:28 -04:00
b0ab46056f vim-patch:8.0.0810: MS-Windows: tests still hang
Problem:    MS-Windows: tests still hang.
Solution:   Only create the XfakeHOME directory if it does not exist yet.
d0b6c6c54e
2018-07-24 22:31:26 -04:00
290a9632d6 vim-patch:8.0.0806: tests may try to create XfakeHOME twice
Problem:    Tests may try to create XfakeHOME twice.
Solution:   Avoid loading setup.vim twice.
f98246d484
2018-07-24 22:31:26 -04:00
28c3679b64 vim-patch:8.0.0805: GUI test fails with gnome2
Problem:    GUI test fails with gnome2.
Solution:   Set $HOME to an existing directory.
d1ee0043c0
2018-07-24 22:31:26 -04:00
ef86aad878 log.c: ISO 8601 date/time
After:
    INFO  2018-07-17T22:05:46.175 656 main:560: starting main loop
2018-07-24 19:36:38 +02:00
3258c6a2f4 log.c: include milliseconds
closes #8727

Before:
    INFO  180711.233956 11124 main:560: starting main loop
After:
    INFO  180711.233956.807 11124 main:560: starting main loop

Note:
  - Can't use uv_hrtime() nor uv_now(), they are not "since the epoch".
    Also, log.c can't assume a loop exists.
2018-07-24 19:36:38 +02:00
4d6a1e5566 log.c: message format
- Log-level name (INFO/ERROR/…) should be in the first column, so that
  filtering by log-level is maximally trivial.
- Use 2-digit year. 4-digit year is useless, logs don't survive for
  decades without context.

Before:
    2018/07/05 17:49:41 INFO  27596 on_process_exit:393: foo
After:
    INFO  180705.174941 27596 on_process_exit:393: foo
2018-07-24 19:25:51 +02:00
ddea519542 rename: os_get_localtime => os_localtime 2018-07-24 19:25:50 +02:00
72ddbb675f Merge pull request #8771 from bfredl/glitches
Fix redraw glitches with newgrid refactor

Fixes #8768 #8775
2018-07-24 17:45:42 +02:00
dcac926ced ui: fix glitches where scrolling region affects clearing of screen
the first implemented UI protocol clients (python-gui and builitin TUI)
allowed the cleared region to be restricted by setting the scroll region.
This was never used by nvim though, and not documented and implemented by
newer clients, to check we remain compatible with both kind of clients,
ensure the scroll region is in a reset state.
2018-07-24 16:38:51 +02:00
d545413492 screen.c: fix redrawing tabline when messages overflow screen 2018-07-24 16:38:24 +02:00
11861bc9c8 tests: add test for switching tabpage right after scroll 2018-07-24 16:37:48 +02:00
d183103b45 test: assert scroll region state for clear
some clients assume this, so tests should check it
2018-07-24 16:37:04 +02:00
ed5ac84ab0 tests: test for redrawing tabline when msgsep marker goes outside screen 2018-07-24 16:36:20 +02:00
f0a702d116 file_search: free stackp if vim_findfile() failed
ff_free_stack_element() accepts NULL ptr and returns early.
This removes the need to check if stackp is not NULL.
2018-07-24 01:15:24 -04:00
7c7701af12 vim-patch:8.1.0111: .po files do not use recommended names
Problem:    .po files do not use recommended names.
Solution:   Give a warning if the recommended name is not used.  Accept the
            recommended name for conversion. (Christian Brabandt, Ken Takata)
d1d037e901
2018-07-23 19:35:11 -04:00
57c095d5fc vim-patch:8.0.1839: script to check .po file doesn't check for plural header
Problem:    Script to check .po file doesn't check for plural header.
Solution:   Add a check that the plural header is present when needed.
9cfc7d885c
2018-07-23 12:42:46 -04:00
7cf36fc67e vim-patch:8.0.1778: script to check translations does not always work
Problem:    Script to check translations does not always work.
Solution:   Go to first line before searching for MIME.
b07bbb0d29
2018-07-23 12:41:29 -04:00
b63f5c170d vim-patch:8.0.0835: translations check with msgfmt does not work
Problem:    Translations check with msgfmt does not work.
Solution:   Add a space before the file name.
65cedb2074
2018-07-23 12:34:21 -04:00
45a2c6543c vim-patch:8.0.0830: translating messages is not ideal
Problem:    Translating messages is not ideal.
Solution:   Add a remark about obsolete messages.  Use msgfmt in the check
            script. (Christian Brabandt)
aaef1bae3c
2018-07-23 12:33:39 -04:00
1ed5abfe88 vim-patch:8.0.0794: checking translations fails with multiple NL
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
2018-07-23 11:50:37 -04:00
d551a49958 vim-patch:8.0.0734: the script to check translations can be improved
Problem:    The script to check translations can be improved.
Solution:   Restore the view when no errors are found.  Check for matching
            line break at the end of the message. (Christian Brabandt)
7f93703149
2018-07-23 10:31:37 -04:00
ddc243f32a vim-patch:8.0.0726: translations cleanup script is too conservative
Problem:    Translations cleanup script is too conservative.
Solution:   Also delete untranslated messages.
4d2ba822fd
2018-07-23 10:29:41 -04:00
6285b518d4 vim-patch:8.0.1622: possible NULL pointer dereference
Problem:    Possible NULL pointer dereferencey. (Coverity)
Solution:   Reverse the check for a NULL pointer.
6ed86ad170
2018-07-23 08:34:26 -04:00
84b8612987 vim-patch:8.0.1512: warning for possibly using NULL pointer
Problem:    Warning for possibly using NULL pointer. (Coverity)
Solution:   Skip using the pointer if it's NULL.
e4db7aedab
2018-07-23 08:34:25 -04:00
9fbbec76aa vim-patch:8.0.1502: in out-of-memory situation character is not restored
Problem:    In out-of-memory situation character is not restored. (Coverity)
Solution:   Restore the character in all situations.
71a43c0137
2018-07-23 00:01:07 -04:00
c8e7a447c5 build: Enable LTO (Link Time Optimization) #8654 2018-07-23 03:22:14 +02:00
2000b6a64a Merge #8589 'VimL: Remove legacy v:xx aliases' 2018-07-23 03:18:10 +02:00
cdbfdcfcc4 doc: README: "Transitioning from Vim" note (#8763) 2018-07-23 03:06:27 +02:00
765711e272 vim-patch:8.0.1765: CTRL-G j in Insert mode is incorrect when 'virtualedit' set (#8757)
Problem:    CTRL-G j in Insert mode is incorrect when 'virtualedit' is set.
Solution:   Take coladd into account. (Christian Brabandt, closes vim/vim#2743)
db0eedec16
2018-07-23 02:11:13 +02:00
48c0e916a1 Merge #8753 from janlazo/vim-8.0.0724 2018-07-23 02:10:06 +02:00
c9f2faf3bf vim-patch:8.0.1398: :packadd does not load packages from the "start" directory (#8762)
Problem:    :packadd does not load packages from the "start" directory.
            (Alejandro Hernandez)
Solution:   Make :packadd look in the "start" directory if those packages were
            not loaded on startup.
9e1d399e63
2018-07-23 02:04:49 +02:00
03bd5a4b91 Make "v:errmsg", "v:shell_error" and "v:this_session" distinct 2018-07-23 08:47:51 +09:00
563957e3cb vim-patch:8.0.0493: crash with cd command with very long argument
Problem:    Crash with cd command with very long argument.
Solution:   Check for running out of space. (Dominique Pellé, closes vim/vim#1576)
15618fa643
2018-07-22 19:34:58 -04:00
13d29cb9ed man.vim: improve manSentence regex (#8764)
ref https://github.com/neovim/neovim/pull/8709#issuecomment-406319186
2018-07-22 18:30:38 +02:00
94841e5eae Merge pull request #8221 from bfredl/hlstate
UI grid protocol revision: line based updates and semantic highlights
2018-07-21 14:41:49 +02:00
6b8cd827a9 ui: add tests for hlstate extension 2018-07-21 13:21:59 +02:00
0bdf8979a2 ui: docs for ext_newgrid and ext_hlstate 2018-07-21 13:21:59 +02:00
1adb01c120 ui: use line-based rather than char-based updates in screen.c
Add ext_newgrid and ext_hlstate extensions. These use predefined
highlights and line-segment based updates, for efficiency and
simplicity.. The ext_hlstate extension in addition allows semantic
identification of builtin and syntax highlights.

Reimplement the old char-based updates in the remote UI layer, for
compatibility. For the moment, this is still the default. The bulitin
TUI uses the new line-based protocol.

cmdline uses curwin cursor position when ext_cmdline is active.
2018-07-21 13:21:58 +02:00
2134396074 ui: add TODO for non-working terminal linewrap
Note: this has not been working since the TUI reimplementation
2018-07-21 13:20:38 +02:00
989b585e10 highlight: refactor to use stateful representation
This allows us to keep track of the source higlight groups,
and not only the final combined highlights.
2018-07-21 13:20:37 +02:00
696e24f311 highlight: extract low-level highlight logic from syntax, ui 2018-07-21 10:37:44 +02:00
5ff90a100a Merge #8761 from janlazo/vim-8.0.1503 2018-07-20 03:56:13 +02:00
f5d7123f6c version bump 2018-07-19 21:53:21 +02:00
588e86bda6 hardcopy: refactor mch_print_text_out()
Combine variable declaration and initialization to add const.
2018-07-19 12:33:05 -04:00
8441af37d8 vim-patch:8.1.0056: crash when using :hardcopy with illegal byte
Problem:    Crash when using :hardcopy with illegal byte.
Solution:   Check for string_convert() returning NULL. (Dominique Pelle)
43dee181f5
2018-07-19 12:21:14 -04:00
2ea619c10b vim-patch:8.0.1503: access memory beyond end of string
Problem:    Access memory beyond end of string. (Coverity)
Solution:   Keep allocated memory in separate pointer.  Avoid outputting the
            NUL character.
cdd09aa51a
2018-07-18 21:20:11 -04:00
489d32f2b8 startup: fix ":if 0|syntax on|endif" bug (#8731)
Problem: ":if 0|syntax {on,off}|endif" skips the default of "syntax on"
because the executor was setting the `did_syntax_onoff` flag even though
"syntax {on,off}" is not actually executed.

closes #8728
2018-07-18 14:30:11 +02:00
cd94dd6bb2 NVIM v0.3.1
FEATURES:
07499a842b #8709 man.vim: C highlighting for EXAMPLES section
07f82ad1be #8699 TUI: urxvt: also send xterm focus-reporting seqs
40911e435e #8616 API: emit nvim_buf_lines_event from :terminal
c46997aa87 #8546 fillchars: Add "eob" flag

FIXES:
74d19f685f #8576 startup: avoid blank stdin buffer if other files were opened
4874214139 #8737 Only waitpid() for processes that we care about
cd6e7e8cf3 #8743 Check all child processes for exit in SIGCHLD handler
c230ef24a2 #8746 channel.c: Prevent channel_destroy_early() from freeing uninitialized rpc stuff
0ed8b12a07 #8681 transstr_buf: fix length comparison
d241f278d3 #8708 TUI: Fix standout mode
9afed40ea6 #8698 man.vim: fix for mandoc
e889640048 #8682 provider/node: npm --loglevel silent
1cbc830189 #8613 API: nvim_win_set_cursor: set curswant
bf6048e81d #8628 checkhealth: Python: fix VIRTUAL_ENV check
3cc3506965 #8528 checkhealth: node.js: also search yarn

CHANGES:
b7514493a0 #8619 defaults: shortmess+=F
12481781a0 #8578 highlight: high-priority CursorLine if fg is set.
01570f1ff3 #8726 terminal: handle &confirm and :confirm on unloading
56065bbdc6 #8721 screen: truncate showmode messages
bf2460e2f9 #7551 buffer: fix copying :setlocal options
c1c14faad9 #8520 Ex mode: always "improved" (gQ)
050f3975f6 #7992 options: remove 'maxcombine` option (always 6)

INTERNAL:
463da84806 #7992 screen: use UTF-8 representation
2018-07-18 13:44:59 +02:00
44b4f8c6e9 Merge #8679 from justinmk/doc 2018-07-18 13:42:07 +02:00
0615450688 gen_api_vimdoc.py: add whitespace before "~" 2018-07-18 13:38:06 +02:00
1999919c31 doc 2018-07-18 13:38:06 +02:00
031d21221e vim-patch:8.0.1799: no test for :registers command
Problem:    No test for :registers command.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#2880)
7ce551f317
2018-07-17 09:49:39 -04:00
b99bbc680e vim-patch:8.0.0727: message about what register to yank into is not translated
Problem:    Message about what register to yank into is not translated.
            (LemonBoy)
Solution:   Add _().
60d0e97497
2018-07-17 09:02:37 -04:00
eab17e5093 vim-patch:8.0.0724: the message for yanking doesn't indicate the register
Problem:    The message for yanking doesn't indicate the register.
Solution:   Show the register name in the "N lines yanked" message. (Lemonboy,
            closes vim/vim#1803, closes vim/vim#1809)
e45deb7997
2018-07-17 09:01:18 -04:00
cd6e7e8cf3 Merge pull request #8743 from dimbleby/multiple-children
Check all child processes for exit in SIGCHLD handler
2018-07-16 10:26:24 -04:00
dfe79b67a5 Merge pull request #8651 from MichaHoffmann/feature_refactor_channel
channel.c: refactor spaghetti code
2018-07-15 19:55:53 +02:00
c230ef24a2 Merge pull request #8746 from oni-link/fix.rpcstart2
Fix crash in channel_job_start() in combination with rpc and unknown command
2018-07-15 19:48:40 +02:00
099718ae6d dispatch.c: changed api_set_error_call 2018-07-15 12:12:03 +02:00
c180741189 channel.c: Prevent channel_destroy_early() from freeing uninitialized rpc stuff
Without this patch the following commands would crash:
    :call rpcstart('unknown_command')

    :set sh=unknown_command
    :call jobstart('ls',{'rpc':1})
2018-07-15 09:30:47 +02:00
dee2bf7b52 Check all child processes for exit in SIGCHLD handler
If a second and third child exit while we are already in the handler, we
will only see a single additional SIGCHLD.  Therefore the handler must
not stop after processing a single child but should check all children.

Fixes #8740
2018-07-14 14:18:34 +01:00
ed02278e42 channel.c: refactor spaghetti code
channel.c: WIP remove redundant method check and added FUNC_ATTR_NONNULL_ALL macro

channel.c channel_defs.h helpers.c: added Error field to RequestEvent, added no_op handler func

channel.c: use const char* instead of string and cleanup

channel.c; channel_defs.h; helpers.c: removed error from event again; send errors directly to the channel without using handlers and events

channel.c: fixed memory leak and lint errors

api/private/dispatch.c; api/vim.c; msgpack_rpc/channel.c msgpack_rpc/helpers.c added Error* field to msgpack_get_handler_for; further refactored channel.c

channel.c:323 changed order of evaluation in if statement

channel.c: removed superflous whitespace

dispatch.c: review comment
2018-07-14 11:47:18 +02:00
4874214139 Merge pull request #8737 from dimbleby/overly-general-waitpid
Only waitpid() for processes that we care about
2018-07-13 19:59:09 -04:00
fe913d7838 Only waitpid() for processes that we care about
It seems as though in an AppImage there's an extra child process that
dies at some early point, before we have set up a SIGCHLD handler.  So
when we later get a SIGCHLD from a child that we do care about,
waitpid(-1, ...) tells us about the extra child - and we don't notice
that the interesting child has exited.

Or something like that!

See also:

* https://patchwork.kernel.org/patch/9949491/ in which perf hit
something similar
* discussion at the AppImage repository:
https://github.com/AppImage/AppImageKit/issues/812#issuecomment-404662110.

Fix is to be explicit about which process we are waitpid()'ing for, so
we never need be distracted by children that we don't know about.

Fixes #8104
2018-07-13 20:56:04 +01:00
392817c2da vim-patch:8.0.0630: it is not easy to work on lines without a match (#8734)
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. (closes vim/vim#1760)
f84b122a99
2018-07-13 21:14:46 +02:00
fc45c97829 Merge #8736 'vim-patch:8.0.0697: stable keymap.h' 2018-07-13 20:54:52 +02:00
eaf54132f9 keymap: add commented events to match 8.0.0697
KE_MOUSEMOVE, KE_CANCEL are added in later patches.
2018-07-13 11:43:05 -04:00
175297a23a tests: <SNR> is represented as 'R' (ASCII) 2018-07-12 20:26:54 -04:00
01570f1ff3 terminal: handle &confirm and :confirm on unloading (#8726)
Show a proper confirmation dialog when trying to unload a terminal buffer while
the confirm option is set or when :confirm is used.

Fixes https://github.com/neovim/neovim/issues/4651
2018-07-12 14:57:20 +02:00
56065bbdc6 Merge pull request #8721 from bfredl/quickresize
Fix redrawing issues with narrow screen and remove extra wait in resize tests
2018-07-12 12:21:11 +02:00
e51bffefa5 screen: truncate showmode messages
Before this, bottom of screen got messed up when modemsg (+ one extra
space to not force terminal scroll) didn't fit on one line.
2018-07-12 10:27:23 +02:00
798f05876c vim-patch:8.0.0{474,475,492,633,1251} (#8725)
* 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
2018-07-12 06:22:55 +02:00
671b244e6c Merge #8701 from janlazo/vim-8.0.1140 2018-07-12 05:24:21 +02:00
07499a842b man.vim: C highlighting for EXAMPLES section #8709 2018-07-12 01:13:52 +02:00
9adb6ed74a Merge pull request #8719 from jamessan/libuv-errno
test: Rename includes/pre/uv-errno.h to includes/pre/uv.h
2018-07-11 08:27:46 -04:00
38f0ac07b5 tests/screen.lua: treat "resize" like any other event
Saves ~10 seconds in UI tests
2018-07-11 12:57:01 +02:00
9f8bd77d7b test/includes: Use ${gen_cdefs} when pre-processing headers
Now that uv.h is directly being included, pre-processing of
test/includes/pre/uv.h fails on Linux with

    In file included from «SRCDIR»/neovim/test/includes/pre/uv.h:1:
    In file included from /usr/include/uv.h:62:
    /usr/include/uv/unix.h:72:11: fatal error: 'uv/pthread-barrier.h' file not found
    # include "uv/pthread-barrier.h"
              ^~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

This happens because we're missing -D_GNU_SOURCE (part of ${gen_cdefs}),
which makes the pthread_barrier_* functionality visible.
2018-07-11 00:26:28 -04:00
ba7704ab4e test: Rename includes/pre/uv-errno.h to includes/pre/uv.h
libuv users are only supposed to directly include uv.h.  In v1.21.0, all
the uv-*.h headers were renamed to uv/*.h, which caused the unit tests
to fail with

    [123/125] Generating post/uv-errno.h
    FAILED: test/includes/post/uv-errno.h
    cd «SRCDIR»/src/neovim/build/test/includes && /usr/bin/clang -std=c99 -E -P «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h -I/usr/include -I/usr/include -o «SRCDIR»/neovim/build/test/includes/post/uv-errno.h
    «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h:1:10: error: 'uv-errno.h' file not found with <angled> include; use "quotes" instead
    #include <uv-errno.h>
             ^~~~~~~~~~~~
             "uv-errno.h"

The intention of the file is to extend libuv's error constants with more
values used by the unit tests.  This can just as easily be achieved
without poking into pseudo-private header files.
2018-07-11 00:26:07 -04:00
0fb695df8a vim-patch:8.0.0697: recorded key sequences may become invalid
Problem:    Recorded key sequences may become invalid.
Solution:   Add back KE_SNIFF removed in 7.4.1433. Use fixed numbers for the
            key_extra enum.
8858498516
2018-07-10 21:52:11 -04:00
ec6e78e77c Merge pull request #8716 from mhinz/vim-patch/wrapped-lines
[RFC] vim-patch.sh: handle wrapped commit messages
2018-07-10 20:12:14 -04:00
35b269f51f vim-patch.sh: Unwrap commit messages when reviewing PRs
Longer summary lines for commits may be wrapped when downloading the
commit from GitHub.  Unwrapping the lines ensures they can be compared
with the raw Vim commits.

The difference before and after this patch using:

  ./scripts/vim-patch.sh -r 8684

Before:

  ✘ Wrong commit message.
    Expected:
  vim-patch:8.0.1464: completing directory after :find does not add slash

  Problem:    Completing directory after :find does not add slash.
  Solution:   Adjust the flags for globpath(). (Genki Sky)
  vim/vim@8a37b03
    Actual:
  vim-patch:8.0.1464: completing directory after :find does not
   add slash

  Problem:    Completing directory after :find does not add slash.
  Solution:   Adjust the flags for globpath(). (Genki Sky)

After:

  ✔ Found expected commit message.

[ci skip]
2018-07-10 19:54:44 -04:00
a315026dc2 vim-patch:8.0.0522: Win32: clipboard=unnamed in :global (#8717)
Problem:    MS-Windows: when 'clipboard' is "unnamed" yyp does not work in a
            :global command.
Solution:   When setting the clipboard was postponed, do not clear the
            register.
3fcfa35f82
2018-07-11 00:15:09 +02:00
0ed8b12a07 transstr_buf: fix length comparison #8681
closes #8466
closes #8664
Regression by 0d7daaad98.

- Fix length comparison.
- Fix loop(s) which iterated over all fields of array `pcc` even if it
  was not filled up (try unicode 0x9f as statusline character).

Note about the tests:
- To input unicode with more than two hex digits you can use <C-v>U...:
  a + U+fe20: a︠
  a + U+fe20 + U+fe21: a︠︡
2018-07-10 21:57:26 +02:00
627cc1b3d8 test: build_stl_str_hl (#8703)
Improve coverage of `build_stl_str_hl`.
Minor removal of dead code in the tested function.
2018-07-10 20:46:40 +02:00
2574f299e5 vim-patch:8.0.1464: add slash when completing directory #8684
Problem:    Completing directory after :find does not add slash.
Solution:   Adjust the flags for globpath(). (Genki Sky)
8a37b03289
2018-07-10 19:33:18 +02:00
d241f278d3 Merge pull request #8708 from blueyed/fix-standout
Fix standout mode
2018-07-10 11:32:27 -04:00
13bdc21faf Merge pull request #8712 from jamessan/unicode-11
Update unicode files
2018-07-10 06:53:48 -04:00
7b2f6a7e5f Update unicode files 2018-07-10 06:53:11 -04:00
44a284d71c vim-patch.sh: review_commit: Fix regex for vim version
067bb1e9f changed the commit format to include a brief description in
the summary line of the commit.
2018-07-09 13:55:21 -04:00
56af2f8c5f vim-patch.sh: Use single quotes to avoid doubling backslashes 2018-07-09 13:51:13 -04:00
9afed40ea6 man.vim: fix for mandoc (#8698)
When giving a section, the first candidate selection was not performed.

followup/fixup #8341
2018-07-08 17:31:10 +02:00
07f82ad1be TUI: urxvt: also send xterm focus-reporting seqs #8699
urxvt supports the xterm sequence for focus reporting in master / CVS
since 2016 [1].

This has not been released yet, but is expected to be in 9.23.

In 3d0ee17 a special case for rxvt was added, which requires a custom
urxvt extension, see #7578.

Since urxvt 9.23 is not released still, and extensions for handling this
manually appear to be in use, this sends both escape sequences for rxvt.

Fixes https://github.com/neovim/neovim/issues/8695.

1: 75264fa544 (diff-2c8f5590ce4fa7495edcf7572c89c77b)
2018-07-08 17:27:09 +02:00
813563365c [WIP/RFC] Fix standout mode
It was not working for me in different terminals.

This patch makes it work in the same way like reverse.

Test:

    :hi jediUsage cterm=standout | hi jediUsage
2018-07-08 17:26:17 +02:00
21879247e7 vim-patch:8.0.1387: wordcount test is old style
Problem:    Wordcount test is old style.
Solution:   Change into a new style test. (Yegappan Lakshmanan, closes vim/vim#2434)
a703aaee4d
2018-07-07 23:36:03 -04:00
9836283c49 vim-patch:8.0.1022: test 80 is old style
Problem:    Test 80 is old style.
Solution:   Turn it into a new style test. (Yegappan Lakshmanan)
1a333bc44a
2018-07-07 22:59:30 -04:00
57fafcea23 Merge #8702 from janlazo/nvim-8.0.0654 2018-07-08 00:08:21 +02:00
378d5f0fa3 clint: use stdout for normal/expected output (#8700) 2018-07-08 00:02:27 +02:00
a5ed460241 tests: endfunc allows uncommented bar 2018-07-07 13:31:55 -04:00
0ac67853b9 vim-patch: finish port of 8.0.0{654,663,667}
Fix ex_function so that :endfunction passes the test.
Remove variables, added in 60c0252672.
2018-07-07 10:17:13 -04:00
b5c0031d4e oldtests: fix func Test_echo_and_string() 2018-07-07 07:14:06 -04:00
37757b4f09 vim-patch:8.0.1253: still too many old style tests
Problem:    Still too many old style tests.
Solution:   Convert a few more tests to new style. (Yegappan Lakshmanan,
            closes vim/vim#2272)
430dc5d360

Skip Test_tag_file_encoding.
083_tag_search_with_file_encoding_spec.lua handles the same test case.
2018-07-06 23:51:46 -04:00
41ccdb1ef2 vim-patch:8.0.1140: still old style tests
Problem:    Still old style tests.
Solution:   Convert two tests to new style. (Yegappan Lakshmanan)
bb3e6416f1
2018-07-06 22:32:45 -04:00
336ce02a6e vim-patch:8.0.0663: unexpected error with 'verbose' (#8692)
Problem:    Giving an error message only when 'verbose' set is unexpected.
Solution:   Give a warning message instead.
f8be461d02
2018-07-06 20:50:08 +02:00
2bfabd5bf8 Merge #8680 from janlazo/vim-8.0.0640 2018-07-04 19:23:56 +02:00
e889640048 provider/node: npm --loglevel silent (#8682)
closes #8674
npm log level may cause unexpected output.
2018-07-04 12:13:36 +02:00
297dc3f997 vim-patch:8.0.0686: extra redraw when using CTRL-L in second window
Problem:    When typing CTRL-L in a window that's not the first one, another
            redraw will happen later. (Christian Brabandt)
Solution:   Reset must_redraw after calling screenclear().
9f5f7bf4d5
2018-07-03 21:14:00 -04:00
a8071354e1 vim-patch:8.0.0640: mismatch between help and actual message
Problem:    Mismatch between help and actual message for ":syn conceal".
Solution:   Change the message to match the help. (Ken Takata)
83064068ea
2018-07-03 20:59:12 -04:00
bd51a0cd04 Merge #8672 'test: nvim_buf_attach after delay' 2018-07-02 23:32:28 +02:00
4a83b64777 coverity/166184: Null pointer dereference (FP)
False positive: should never happen, because unibi_from_env() would return
NULL if $TERM is undefined.
2018-07-02 20:56:37 +02:00
f65a751d82 test: nvim_buf_attach: reduce delay
This test is mostly a demo/reference for:
https://github.com/neovim/neovim/issues/8634#issuecomment-400940467
so let's not pay a 1s penalty.
2018-07-02 20:47:28 +02:00
b4fcf02316 test: nvim_buf_attach response after initial delay
ref #8634
2018-07-01 17:31:58 +02:00
60ef7889a2 test: buffer_updates: 10s timeout 2018-07-01 17:31:00 +02:00
ef9ef75a7b Merge #8635 from janlazo/vim-8.0.0252 2018-07-01 15:29:20 +02:00
22d95e462e coverity/108274: tty-test.c: Insecure data handling (#8666) 2018-07-01 14:48:30 +02:00
3e4a058b01 test: port kword_test to Lua for utf_char2bytes()
Use LuaJIT FFI to create char pointer.
Validate output with utf_ptr2char(), vim_iswordc() and vim_iswordp().
Use const for LuaJIT string-to-char conversion.
2018-07-01 08:45:19 -04:00
6ff892165a vim-patch:8.0.0252: not properly recognizing word characters between 128 and 255
Problem:    Characters below 256 that are not one byte are not always
            recognized as word characters.
Solution:   Make vim_iswordc() and vim_iswordp() work the same way. Add a test
            for this. (Ozaki Kiichi)
4019cf90b8
2018-07-01 08:45:13 -04:00
40911e435e API: emit nvim_buf_lines_event from :terminal #8616
closes #8575
2018-07-01 14:42:56 +02:00
70626e6a1e vim-patch:8.0.0593: DRY: setting list/dict return value (#8639)
Problem:    Duplication of code for adding a list or dict return value.
Solution:   Add rettv_dict_set() and rettv_list_set(). (Yegappan Lakshmanan)
45cf6e910c
2018-06-30 14:16:10 +02:00
d088331ea3 Merge pull request #8661 from jamessan/gen_api_vimdoc
gen_api_vimdoc: Make executable and change #! to python3
2018-06-29 21:08:16 -04:00
85d5bf81b9 gen_api_vimdoc: Make executable and change #! to python3 2018-06-29 18:46:05 -04:00
a98a1d10e3 Merge pull request #8656 from bfredl/wd_ls
ui: don't crash when 'writedelay' is set and redrawing inside an event handler
2018-06-29 15:27:25 +02:00
5efab06198 ui: don't crash when 'writedelay' is set and redrawing inside an event handler 2018-06-28 23:38:06 +02:00
12481781a0 highlight: high-priority CursorLine if fg is set. #8578
closes #7383
closes #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
2018-06-28 01:49:40 +02:00
166aaf178c doc (#8652) 2018-06-28 00:48:17 +02:00
b40f87cdf5 Merge pull request #8650 from jamessan/skip-pydo-tests
oldtest: Disable tests that :py(3)do stop executing when buffer changes
2018-06-27 12:51:36 -04:00
363a232cb4 Merge #8645 from janlazo/vim-8.0.0677 2018-06-27 18:28:32 +02:00
9946a5ebd9 oldtest: Disable tests that :py(3)do stop executing when buffer changes
The current nvim <-> client handling of do_range needs to be adapted to
handle these sorts of checks.

See https://github.com/neovim/neovim/issues/8554
2018-06-27 08:03:46 -04:00
33eb5833b2 vim-patch:8.0.0688: cannot resize the window in a FileType autocommand
Problem:    Cannot resize the window in a FileType autocommand. (Ingo Karkat)
Solution:   Add the CMDWIN flag to :resize. (test by Ingo Karkat,
            closes vim/vim#1804)
9c4fefffb6
2018-06-26 10:21:39 -04:00
bfe029a11d vim-patch:8.0.0677: setting 'filetype' may switch buffers
Problem:    Setting 'filetype' internally may cause the current buffer and
            window to change unexpectedly.
Solution:   Set curbuf_lock. (closes vim/vim#1734)
1814183b86
2018-06-26 10:21:39 -04:00
da6874a7b2 API: nvim_win_set_cursor: set w_set_curswant #8640
This one behaves correctly eg in the presence of unicode.

ref #8613
2018-06-26 08:54:14 +02:00
cafb92487b Merge #8642 from janlazo/vim-8.0.0704 2018-06-26 08:14:09 +02:00
b79523681d vim-patch:8.0.0707: freeing wrong memory with certain autocommands
Problem:    Freeing wrong memory when manipulating buffers in autocommands.
            (James McCoy)
Solution:   Also set the w_s pointer if w_buffer was NULL.
f1d13478e3
2018-06-25 11:41:45 -04:00
fee4e39ca3 vim-patch:8.0.0706: crash when cancelling the cmdline window in Ex mode
Problem:    Crash when cancelling the cmdline window in Ex mode. (James McCoy)
Solution:   Do not set cmdbuff to NULL, make it empty.
5a15b6aa0a
2018-06-25 11:39:40 -04:00
b00211a551 vim-patch:8.0.0704: problems with autocommands when opening help
Problem:    Problems with autocommands when opening help.
Solution:   Avoid using invalid "varp" value.  Allow using :wincmd if buffer
            is locked. (closes vim/vim#1806, closes vim/vim#1804)
163095f088
2018-06-25 11:34:10 -04:00
cc0d50a2c2 Improved version of #8613
This one behaves correctly eg in the presence of unicode
2018-06-25 13:44:02 +01:00
1cbc830189 API: nvim_win_set_cursor: set curswant #8613
Fixes #8591
2018-06-25 02:14:55 +02:00
e475476d10 Merge #8621 from janlazo/vim-8.0.0642 2018-06-25 02:08:21 +02:00
7892192751 vim-patch:8.1.0107: getting buffer option clears message (#8637)
defe6424ae

Author: Bram Moolenaar <Bram@vim.org>
Date:   Sun Jun 24 15:14:07 2018 +0200

    patch 8.1.0107: Python: getting buffer option clears message

    Problem:    Python: getting buffer option clears message. (Jacob Niehus)
    Solution:   Don't use aucmd_prepbuf(). (closes #3079)
2018-06-24 22:27:32 +02:00
14b3741ec5 test: update writefile test for invalid list items
It validates list items with tv_check_str_on_nr()
to catch invalid types (ex. E745, E805).
If there is an invalid item, it does not write to the file.
2018-06-24 16:22:16 -04:00
47b26e8716 l10n: Update Ukrainian translation (#8622) 2018-06-24 22:19:21 +02:00
39e284772d vim-patch:8.0.0642: writefile() continues after detecting an error
Problem:    writefile() continues after detecting an error.
Solution:   Bail out as soon as an error is detected. (suggestions by Nikolai
            Pavlov, closes vim/vim#1476)
8cf91286ca
2018-06-24 16:19:21 -04:00
38fb835854 vim-patch:8.0.0548: saving the redo buffer only works one time (#8629)
Problem:    Saving the redo buffer only works one time, resulting in the "."
            command not working well for a function call inside another
            function call. (Ingo Karkat)
Solution:   Save the redo buffer at every user function call. (closes vim/vim#1619)
d4863aa99e
2018-06-24 22:16:57 +02:00
83be7cec98 vim-patch:8.0.0535: leak when exiting user function (#8574)
Problem:    Memory leak when exiting from within a user function.
Solution:   Clear the function call stack on exit.
6914c64ee5
2018-06-24 20:35:25 +02:00
89cb304ea0 vim-patch:8.0.0{538,539} (#8615)
* vim-patch:8.0.0538: no test for falling back to default term value

Problem:    No test for falling back to default term value.
Solution:   Add a test.
85045a73db

* vim-patch:8.0.0539: startup test fails on Mac

Problem:    Startup test fails on Mac.
Solution:   Use another term name, "unknown" is known. Avoid a 2 second delay.
08f88b139d

* oldtest: nvim does not support ':set term'
2018-06-24 20:23:33 +02:00
15bd936b96 win/deps: Fix copy to subdir (#8636)
The `external_blobs` target was not copying dependency files into
the correct subdirectories. This caused a bug where nvim-qt wouldn't
start because `qwindows.dll` was not located in the `platforms`
subdirectory.

closes https://github.com/equalsraf/neovim-qt/issues/422
2018-06-24 20:21:52 +02:00
3d688cc25d vim-patch:8.0.0627: "gn" selects only one character with 'nowrapscan' (#8632)
Problem:    When 'wrapscan' is off "gn" does not select the whole pattern when
            it's the last one in the text. (KeyboardFire)
Solution:   Check if the search fails. (Christian Brabandt, closes vim/vim#1683)
add8dce38d
2018-06-24 10:37:59 +02:00
bf6048e81d checkhealth: Python: fix VIRTUAL_ENV check (#8628)
Compare `$VIRTUAL_ENV` to `python_bin`.
This is necessary when `g:python_host_prog` is set to an absolute path,
and looking up `pyname` in `$PATH` yields another result.
2018-06-24 10:28:21 +02:00
ddde747644 vim-patch:8.0.0544: cppcheck warnings (#8627)
Problem:    Cppcheck warnings.
Solution:   Use temp variable. Change NUL to NULL. Swap conditions. (Dominique
            Pelle)
866c688610
2018-06-23 12:45:10 +02:00
7f7802e643 main: fix FALLTHROUGH hints (#8623)
GCC (Clang also?) does not recognize FALLTHROUGH comments when the
case is wrapped in braces.
2018-06-22 10:49:54 +02:00
bf2460e2f9 Merge pull request #7551 from bfredl/setl_bufwin
fix copying setl options for buffer currently displayed in another window
2018-06-22 09:53:46 +02:00
e1c6109e62 Merge #8618 'Replace b_changedtick with always-inline functions' 2018-06-22 08:35:28 +02:00
b7514493a0 defaults: shortmess+=F (#8619)
Because we default to laststatus=2 (statusline is always visible), the
:edit message is not useful.

ref #6289
2018-06-22 08:18:02 +02:00
ZyX
eaf2a25f12 *: Replace b_changedtick with new always-inline functions
Ref #8474
2018-06-22 00:44:31 +03:00
cf659a1926 Merge #8612 from janlazo/vim-8.0.0621 2018-06-21 22:54:08 +02:00
8917e0c301 buffer: fix copying setl options for buffer currently displayed in another window
vim-patch:8.0.1836: buffer-local window options may not be recent
Problem:    Buffer-local window options may not be recent if the buffer is
            still open in another window.
Solution:   Copy the options from the window instead of the outdated window
            options. (Bjorn Linse, closes vim/vim#2336)
25782a7ff4
2018-06-21 22:41:15 +02:00
10083ec4cc vim-patch:8.0.0648: possible use of NULL pointer
Problem:    Possible use of NULL pointer if buflist_new() returns NULL.
            (Coverity)
Solution:   Check for NULL pointer in set_bufref().
fadacf01d0
2018-06-21 12:50:31 -04:00
bf61885cb4 vim-patch:8.0.0621: :stag does not respect 'switchbuf'
Problem:    The ":stag" command does not respect 'switchbuf'.
Solution:   Check 'switchbuf' for tag commands that may open a new window.
            (Ingo Karkat, closes vim/vim#1681)  Define macros for the return values
            of getfile().
8ad80dea08
2018-06-21 12:50:30 -04:00
7ae7da8fb9 vim-patch:8.0.0468: g< after aborting an Ex command (#7941)
Problem:    After aborting an Ex command g< does not work. (Marcin
            Szamotulski)
Solution:   Postpone clearing scrollback messages to until the command line
            has been entered.  Also fix that the screen isn't redrawn if after
            g< the command line is cancelled.
f2405ed232
2018-06-21 11:36:26 +02:00
b92d6f490d vim-patch:8.0.{0632,1536} (#8609)
vim-patch:8.0.0632: the quotestar test is still a bit flaky
Problem:    The quotestar test is still a bit flaky.
Solution:   Kill any existing server to make the retry work.  Wait for the
            register to be filled.
1c13c0fe3e

vim-patch:8.0.1536: quotestar test is flaky when using the GUI
Problem:    Quotestar test is flaky when using the GUI.
Solution:   Add check that the star register arrived at the server.  Increase
            timeouts.
791010e648
2018-06-21 11:27:24 +02:00
52ebe34eeb vim-patch:8.0.0616: not always setting 'background' correctly after :hi Normal (#8606)
Problem:    When setting the cterm background with ":hi Normal" the value of
            'background' may be set wrongly.
Solution:   Check that the color is less than 16.  Don't set 'background' when
            it was set explicitly. (Lemonboy, closes vim/vim#1710)
1615b36b91

Restore reset_option_was_set(), removed in 419da839e0

ref #8595
ref #8597
2018-06-21 11:15:11 +02:00
8794a551bd vim-patch:8.0.0{469,581,583} (#8601)
vim-patch:8.0.0469: compiler warnings on MS-Windows
Problem:    Compiler warnings on MS-Windows.
Solution:   Add type casts. (Christian Brabandt)
0c0d4eca4d

vim-patch:8.0.0581: moving folded text is sometimes not correct
Problem:    Moving folded text is sometimes not correct.
Solution:   Bail out when "move_end" is zero. (Matthew Malcomson)
94be619e30

vim-patch:8.0.0583: fold test hangs on MS-Windows
Problem:    Fold test hangs on MS-Windows.
Solution:   Avoid overflow in compare.
b11c826ddc
2018-06-20 10:29:09 +02:00
b454d24e04 vim-patch:8.0.0669: CTRL-N at start of the buffer does not work correctly (#8600)
Problem:    In Insert mode, CTRL-N at start of the buffer does not work
            correctly. (zuloloxi)
Solution:   Wrap around the start of the buffer. (Christian Brabandt)
24a9e348aa
2018-06-20 08:17:00 +02:00
6e55c5997e vim-patch:8.0.0636: when reading the undo file fails may use uninitialized data (#8599)
Problem:    When reading the undo file fails may use uninitialized data.
Solution:   Always clear the buffer on failure.
56f2db562d
2018-06-20 02:29:51 +02:00
6294a807d3 Merge #8579 win: cmake: Improvements for building with IDEs 2018-06-20 02:19:42 +02:00
18710e7720 Merge #8596 from janlazo/vim-8.0.0615 2018-06-20 00:58:33 +02:00
b36aba9840 vim-patch:8.0.0551: the typeahead buffer is reallocated too often (#8598)
Problem:    The typeahead buffer is reallocated too often.
Solution:   Re-use the existing buffer if possible.
d34f9b1155
2018-06-20 00:56:55 +02:00
f389fea8fa Merge #8503 from janlazo/vim-8.0.0549 2018-06-20 00:54:25 +02:00
141df73930 vim-patch:8.0.0568: 1gd may hang
Problem:    "1gd" may hang.
Solution:   Don't get stuck in one position. (Christian Brabandt, closes vim/vim#1643)
60402d68da
2018-06-19 16:57:29 -04:00
14e70878c5 lint 2018-06-19 16:12:55 -04:00
3cc7462a0c vim-patch:8.0.0546: swap file exists briefly when opening the command window (#8588)
Problem:    Swap file exists briefly when opening the command window.
Solution:   Set the noswapfile command modifier before splitting the window.
            (James McCoy, closes vim/vim#1620)
3bab93998d
2018-06-19 21:22:34 +02:00
c1d7a28093 vim-patch:8.0.0549: no test for the 8g8 command
Problem:    No test for the 8g8 command.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#1615)
395b6bab33
2018-06-19 15:16:44 -04:00
b479f89979 vim-patch:8.0.0617: hardcopy test hangs on MS-Windows
Problem:    Hardcopy test hangs on MS-Windows.
Solution:   Check the postscript feature is supported.
763209c57b
2018-06-19 15:10:17 -04:00
6d4d271694 vim-patch:8.0.0615: using % with :hardcopy wrongly escapes spaces
Problem:    Using % with :hardcopy wrongly escapes spaces. (Alexey Muranov)
Solution:   Expand % differently. (Christian Brabandt, closes vim/vim#1682)
bf15b8d78b
2018-06-19 15:08:43 -04:00
74d19f685f Merge #8576 from justinmk/startup-empty-stdin 2018-06-19 21:04:08 +02:00
a10938ae31 vim-patch:8.0.0537: illegal memory access with :z and large count (#8592)
Problem:    Illegal memory access with :z and large count.
Solution:   Check for number overflow, using long instead of int. (Dominique
            Pelle, closes vim/vim#1612)
fa0ad0bb0b
2018-06-19 20:35:37 +02:00
943e607442 Merge pull request #8593 from jamessan/vim-patch-printf-fix
vim-patch: Replace shell variables in printf with formatted args
2018-06-19 11:05:28 -04:00
c8af12d0fa vim-patch: Replace shell variables in printf with formatted args
This ensures that special characters in the variables are not
interpreted as escapes/format characters in the printf string, as was
seen with upstream patch 8.0.0615.

    $ ./scripts/vim-patch.sh -p 8.0.0615
    Updating Vim sources: /$HOME/src/neovim/.vim-src
    ✔ Updated Vim sources.
    ✔ Found Vim revision 'bf15b8d78b22661db8b19d662b62bb9a061cdd37'.
    Creating patch...
    Pre-processing patch...
    ✔ Saved patch to '/$HOME/src/neovim/vim-8.0.0615.patch'.

    Fetching 'origin/master'.
    ✔ From https://github.com/neovim/neovim
     * branch                master     -> FETCH_HEAD

    Creating new branch 'vim-8.0.0615' based on 'origin/master'.
    ✔ Switched to a new branch 'vim-8.0.0615'
    Branch 'vim-8.0.0615' set up to track remote branch 'master' from 'origin'.

    Creating empty commit with correct commit message.
    ./scripts/vim-patch.sh: line 40: printf: `w': invalid format character
    ✔ [vim-8.0.0615 db7fbb016] vim-patch:8.0.0615: using ./scripts/vim-patch.sh: line 44: printf: `w': invalid format character
    ✘ [vim-8.0.0615 db7fbb016] vim-patch:8.0.0615: using

[ci-skip]
2018-06-19 10:20:48 -04:00
63b5f05d47 vim-patch:8.0.0455: the mode test may hang (#8577)
Problem:    The mode test may hang in Test_mode(). (Michael Soyka)
Solution:   Set 'complete' to only search the current buffer (as suggested by
            Michael)
ffea8c99d9
2018-06-19 10:51:51 +02:00
3c24a6c317 vim-patch:8.0.0542: getpos() can return a negative line number (#8580)
Problem:    getpos() can return a negative line number. (haya14busa)
Solution:   Handle a zero topline and botline. (closes vim/vim#1613)
a1d5fa65bc
2018-06-19 10:50:52 +02:00
b148213366 vim-patch:8.0.0598: building with gcc 7.1 yields new warnings (#8585)
Problem:    Building with gcc 7.1 yields new warnings.
Solution:   Initialize result. (John Marriott)
9e0f6ec076
2018-06-19 10:48:25 +02:00
9500448220 Merge #8584 from janlazo/vim-8.0.0467 2018-06-19 10:46:47 +02:00
9625e9da75 startup: delete empty stdin buffer if other files were opened
DWIM: avoid empty buffer 1 when stdin was empty. If other files were
specified at startup, we assume that stdin is only accidentally
not-a-TTY: user did not intend to send text from it.

ref #8560
ref #8561
2018-06-18 21:51:42 +02:00
37675c6a87 Merge #8558 from jamessan/gnucxx-compiler-for-gnu-source
cmake: Check for GNU compiler, not Linux, to set -D_GNU_SOURCE
2018-06-18 20:37:39 +02:00
09cd4d0a43 use wchar_t instead of WCHAR #6998
wchar_t has better cross-platform support and seems to fix an issue
on MinGW when building with `-std=c99`.
2018-06-18 19:24:34 +02:00
d44ed79ccc startup: go to buffer 2 if stdin is empty
If stdin is not a TTY we read it into buffer 1, as text. But if the
stdin pipe is empty, Nvim was most likely invoked for some other reason.
DWIM: select buffer 2 (if it exists). Example:

    echo file1 | xargs nvim

closes #8560
closes #8561
ref https://github.com/equalsraf/neovim-qt/issues/417
2018-06-18 17:51:38 +02:00
84970bafd4 vim-patch:8.0.0547: extra line break in verbosefile
Problem:    Extra line break in verbosefile when using ":echomsg". (Ingo
            Karkat)
Solution:   Don't call msg_start(). (closes vim/vim#1618)
52604f2454
2018-06-18 08:38:29 -04:00
5d8594f636 vim-patch:8.0.0467: using g< after :for does not show the right output
Problem:    Using g< after :for does not show the right output. (Marcin
            Szamotulski)
Solution:   Call msg_sb_eol() in :echomsg.
57002ad70c
2018-06-18 08:37:05 -04:00
a26fd8a888 cmake: Prefer add_definitions() for setting preprocessor defines 2018-06-18 08:01:16 -04:00
863a87d5f3 cmake: Comply with new CMP0054 policy 2018-06-18 08:01:16 -04:00
23c9e3ec1e Raise minimum CMake version to 2.8.12 and remove compat code
2.8.12 is supported by our main CI targets and [repology] confirms that
this is broadly supported.

[repology]: https://repology.org/metapackage/cmake/information
2018-06-18 08:00:30 -04:00
25435a4bad cmake: Consolidate enabling of "undefined symbol" errors 2018-06-18 07:58:18 -04:00
33952c48bc cmake: Explicitly declare C as the project language
There's a mix of CXX and C related variables being set/referenced in our
CMake files.  Since we only use C, use an explicit language list of "C"
instead of the implicit "C CXX" and replace all uses of CXX variables
with their C counterparts
2018-06-18 07:58:18 -04:00
4938ee08e8 cmake: Check for GNU compiler, not Linux, to set -D_GNU_SOURCE
The Debian hurd-i386 [build] failed (partly) due to -D_GNU_SOURCE not be
defined:

    [215/286] /usr/bin/cc -DINCLUDE_GENERATED_DECLARATIONS -Iconfig -I../src -Isrc/nvim/auto -Iinclude -I/usr/include/luajit-2.1 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=2 -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -O2 -g  -DMIN_LOG_LEVEL=3 -Og -g   -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -MD -MT src/nvim/CMakeFiles/nvim.dir/os/pty_process_unix.c.o -MF src/nvim/CMakeFiles/nvim.dir/os/pty_process_unix.c.o.d -o src/nvim/CMakeFiles/nvim.dir/os/pty_process_unix.c.o   -c ../src/nvim/os/pty_process_unix.c
    ../src/nvim/os/pty_process_unix.c: In function 'pty_process_tty_name':
    ../src/nvim/os/pty_process_unix.c:121:10: warning: implicit declaration of function 'ptsname'; did you mean 'ttyname'? [-Wimplicit-function-declaration]
       return ptsname(ptyproc->tty_fd);

Hurd is obviously not Linux, but it is using a GNU compiler and glibc so
it needs -D_GNU_SOURCE for the ptsname() definition to be visible.

[build]: https://buildd.debian.org/status/fetch.php?pkg=neovim&arch=hurd-i386&ver=0.3.0-2&stamp=1528981349&raw=0
2018-06-18 07:58:18 -04:00
66a39fce6c Merge #8502 from janlazo/vim-8.0.0481 2018-06-17 23:52:55 +02:00
c1c14faad9 Merge #8520 'Ex mode: always "improved" (gQ)' 2018-06-17 23:19:59 +02:00
7097aba6be cmake: Organize targets into folders
Enabling CMake's USE_FOLDERS option and adding the FOLDER property to
targets allows some IDEs to list the targets in an organized
hierarchy of folders.
2018-06-17 07:54:39 -05:00
487cf98c0b startup: fix -E/-Es without -u NONE
Before this change, -E/-Es without `-u NONE` reads stdin as Ex commands.
It should always read stdin as text (into buffer 1), like this:

    echo foo | nvim -Es +'%p'
    foo
    echo foo | nvim -Es -u NORC +'%p'
    foo
2018-06-17 14:50:53 +02:00
9c2099d585 Ex mode: use getexline() instead of getexmodeline()
This changes Ex mode (Q, -e) to work like Vim's "improved Ex mode"
(gQ, -E).  That brings some small behavior differences, but should not
impact most Ex scripts (unless, for example, they depend on mappings
being disabled--but that can be solved for -e by skipping user config).

Before this change:
* the screen test hangs.

After this change:
* Q acts like gQ.
* -e/-es differs from -E/-Es only in its treatment of stdin.

This moves towards potentially removing getexmodeline().
(HINT: That does NOT mean "removing Ex mode", it means removing the
Vi-compatible Ex mode, which differs from Vim's "improved Ex mode" only
in some minor details (e.g. mappings are disabled).)

ref #1089 :-)~
2018-06-17 14:50:53 +02:00
3cc3506965 checkhealth: node.js: also search yarn #8528
- "neovim" package may be installed with yarn. Check yarn if npm fails.
- Use filereadable() instead of glob(). closes #8552
2018-06-17 13:05:55 +02:00
8192267dea vim-patch:8.0.0609: some people still don't know how to quit (#8571)
Problem:    For some people the hint about quitting is not sufficient.
Solution:   Put <Enter> separately.  Also use ":qa!" to get out even when
            there are changes.
28a8193e31
2018-06-17 12:51:03 +02:00
367343ae6e vim-patch:8.0.0625: shellescape() always escapes a newline (#8573)
Problem:    shellescape() always escapes a newline, which does not work with
            some shells. (Harm te Hennepe)
Solution:   Only escape a newline when the "special" argument is non-zero.
            (Christian Brabandt, closes vim/vim#1590)
206155280d
2018-06-17 12:20:42 +02:00
b006771cba Merge #8570 'gen_events.lua: define NUM_EVENTS as enum' 2018-06-16 19:57:28 +02:00
a503349e20 Merge #8569 from janlazo/vim-8.0.0602 2018-06-16 18:24:54 +02:00
26dc628ab3 Merge #8567 from ckelsel/vim-8.0.0530 2018-06-16 18:21:14 +02:00
de022d2570 vim-patch:8.0.0604: gF test fails still on MS-Windows
Problem:    gF test fails still on MS-Windows.
Solution:   Use : before the line number and remove it from 'isfname'.
712598f210
2018-06-16 11:37:13 -04:00
0d3557ad72 vim-patch:8.0.0603: gF test fails on MS-Windows
Problem:    gF test fails on MS-Windows.
Solution:   Use @ instead of : before the line number
d7aca7a71c
2018-06-16 11:37:13 -04:00
440c33343d vim-patch:8.0.0602: when gF fails to edit the file the cursor still moves
Problem:    When gF fails to edit the file the cursor still moves to the found
            line number.
Solution:   Check the return value of do_ecmd(). (Michael Hwang)
2a79ed293c
2018-06-16 11:37:12 -04:00
dd2e1e9445 syntax: refactor syn_finish_line to return bool 2018-06-16 10:22:20 -04:00
2add88eedc vim-patch:8.0.0481: unnecessary if statement
Problem:    Unnecessary if statement.
Solution:   Remove the statement.  Fix "it's" vs "its" mistakes. (Dominique
            Pelle, closes vim/vim#1568)
aab93b12cb
2018-06-16 10:20:18 -04:00
33596d5d07 fix lint 2018-06-16 19:46:41 +08:00
bbf00120f7 vim-patch:8.0.0545: edit test may fail on some systems
Problem:    Edit test may fail on some systems.
Solution:   If creating a directory with a very long path fails, bail out.
15ecbd6f3d
2018-06-16 19:43:01 +08:00
3ff1907593 vim-patch:8.0.0543: test_edit causes older xfce4-terminal to close
Problem:    Test_edit causes older xfce4-terminal to close. (Dominique Pelle)
Solution:   Reduce number of columns to 2000.  Try to restore the window
            position.
ba6ec18297
2018-06-16 19:41:58 +08:00
264725c25f vim-patch:8.0.0532: test with long directory name fails on Mac
Problem:    Test with long directory name fails on Mac.
Solution:   Skip the test on Mac systems.
c77d675747
2018-06-16 19:41:18 +08:00
9a1234e57f vim-patch:8.0.0531: test with long directory name fails on non-unix systems
Problem:    Test with long directory name fails on non-unix systems.
Solution:   Skip the test on non-unix systems.
9b81079ddd
2018-06-16 19:40:46 +08:00
ebc7f69d92 vim-patch:8.0.0530: buffer overflow when 'columns' is very big
Problem:    Buffer overflow when 'columns' is very big. (Nikolai Pavlov)
Solution:   Correctly compute where to truncate.  Fix translation.
            (closes vim/vim#1600)
658a3a2caf
2018-06-16 19:39:40 +08:00
eeeaf04c5e Merge #8565 from janlazo/vim-8.0.0575 2018-06-16 12:42:05 +02:00
4bb039e225 Merge #8543 from janlazo/vim-8.0.0596 2018-06-16 12:01:09 +02:00
4c3c04d03c Merge #8526 from janlazo/vim-8.0.0451 2018-06-16 11:55:40 +02:00
f4dffe7181 vim-patch:8.0.0577: warning for uninitialized variable
Problem:    Warning for uninitialized variable. (John Marriott)
Solution:   Initialize "indent".
97db5541a6
2018-06-16 00:37:37 -04:00
9ab6fe4fed vim-patch:8.0.0575: using freed memory when resetting 'indentexpr'
Problem:    Using freed memory when resetting 'indentexpr' while evaluating
            it. (Dominique Pelle)
Solution:   Make a copy of 'indentexpr'.
a701b3b6f0
2018-06-16 00:37:37 -04:00
1cc3b32f4c build/test: skip empty TEST_TAG, TEST_FILTER
- Empty "--tags=", "--filter=" prevents TEST_FILE from running.
- Fix another bug: TEST_FILTER overwrote TEST_TAG.
2018-06-16 02:12:35 +02:00
2a274cbe30 gen_events.lua: define NUM_EVENTS as an enum value
Fix PVS warnings:

    fileio.c:7293   Medium  V547    Expression is always true.
    fileio.c:7351   Medium  V547    Expression 'event == 100' is always false.

event_name2nr returns event_T, so PVS infers that nothing outside of
that range could possibly be returned.
2018-06-16 01:57:30 +02:00
c990d65c37 get_maphash: fix off-by-one
Patch-by: oni-link <knil.ino@gmail.com>

ref: https://github.com/neovim/neovim/pull/6236#discussion_r195113807
2018-06-14 19:00:37 +02:00
c46997aa87 Merge pull request #8546 from bfredl/eob
Add fillchar for EndOfBuffer and check for invalid UTF-8
2018-06-14 18:00:59 +02:00
f39a0f5dd0 build/win: Add workaround for Windows command length limit
When building with the Ninja generator on Windows, it was possible for
the external_blobs target to fail when the generated command exceeds the
command length limit (8191 characters). To workaround the problem, a
CMake script is used to copy the files instead of a shell command.

Visual Studio bug report:
https://developercommunity.visualstudio.com/content/problem/212207/file-open-cmake-the-command-line-is-too-long.html
2018-06-14 09:34:18 -05:00
f27a665e05 Merge pull request #8549 from jamessan/output_spec-printf
functionaltest: Use octal escapes for printf
2018-06-14 08:06:38 -04:00
5442f0b622 fillchars: make checks more strict and improve tests 2018-06-14 14:00:09 +02:00
6c0f1903e6 functionaltest: Use octal escapes for printf
According to POSIX[0], only octal escapes are supported by the printf
command.  GNU coreutils' printf and some shells' builtin printf versions
which support hex escapes, but dash and non-GNU printf do not.

[0]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html
2018-06-13 23:03:37 -04:00
a7bb63c55d Add ‘eob’ option to fillchars
This option allows configuring what character is shown on the empty
lines at the end of a buffer, previously hardcoded to ‘~’
2018-06-13 17:54:16 +02:00
3462acbbff lint 2018-06-13 07:10:17 -04:00
463da84806 Merge pull request #7992 from bfredl/mbscreen
Represent Screen state as UTF-8
2018-06-13 11:11:12 +02:00
f4ba20d1c0 Fix implicit conversion warning (#8536) 2018-06-13 10:48:29 +02:00
050f3975f6 options: remove 'maxcombine` option (always use 6) 2018-06-13 10:11:35 +02:00
d8e18c96a9 screen: use UTF-8 representation
Store text in ScreenLines as UTF-8, so it can be sent as-is to the UI
layer. `utfc_char2bytes(off,buf)` is removed, as `ScreenLines[off]` now
already contains this representation.

To recover the codepoints that the screen arrays previously contained, use
utfc_ptr2char (or utf_ptr2char to ignore composing chars).

NB: This commit does NOT change how screen.c processes incoming UTF-8 data
from buffers, cmdline, messages etc. Any algorithm that operates on UCS-4
(like arabic shaping, treatment of non-printable chars)
is left unchanged for now.
2018-06-13 10:11:11 +02:00
3e0188e92d vim-patch:8.0.0596: crash when complete() called after complete_add()
Problem:    Crash when complete() is called after complete_add() in
            'completefunc'. (Lifepillar)
Solution:   Bail out if compl_pattern is NULL. (closes vim/vim#1668)
            Also avoid using freed memory.
4475b62396
2018-06-13 00:18:50 -04:00
315b7f8632 test/ui: doublewidth rendering. multibyte and cmdwin chars in folded lines (#8534) 2018-06-12 17:57:47 +02:00
40a257e11f Revert "makedeps.bat" 2018-06-12 08:47:16 -05:00
f419f914fc charset: include option_defs.h for breakat_flags 2018-06-12 09:34:10 -04:00
f52ace459a doc 2018-06-12 09:18:25 +02:00
3c7ea8d619 vim-patch:8.0.0451: some macros are in lower case
Problem:    Some macros are in lower case.
Solution:   Make a few more macros upper case. Avoid lower case macros use an
            argument twice.
91acfffc1e
2018-06-12 02:00:50 -04:00
fa2ad305e3 version bump 2018-06-11 10:58:54 +02:00
61890382eb deps: Build bundled dependencies automatically for IDEs
Environment variables are used to detect when the project is being built
from within Clion or Visual Studio, so that the build process can be
simplified by automatically building the bundled dependencies for them.
2018-06-10 09:57:12 -05:00
684 changed files with 66582 additions and 19821 deletions

View File

@ -8,6 +8,7 @@ IndentCaseLabels: true
BreakBeforeBraces: Linux
AlignEscapedNewlinesLeft: false
AllowShortFunctionsOnASingleLine: false
AlignTrailingComments: true
SpacesBeforeTrailingComments: 2
PenaltyReturnTypeOnItsOwnLine: 200
AllowAllParametersOfDeclarationOnNextLine: false
@ -15,4 +16,5 @@ AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
BinPackParameters: false
BreakBeforeBinaryOperators: true
BreakBeforeTernaryOperators: true
ContinuationIndentWidth: 4

View File

@ -5,12 +5,8 @@ indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
charset = utf_8
charset = utf-8
[runtime/doc/*.txt]
[{Makefile,**/Makefile,runtime/doc/*.txt}]
indent_style = tab
indent_size = 8
[Makefile]
indent_style = tab
tab_width = 4

View File

@ -1,5 +1,5 @@
dist: trusty
sudo: false
dist: xenial
language: c
env:
@ -25,7 +25,7 @@ env:
-DBUSTED_OUTPUT_TYPE=nvim
-DDEPS_PREFIX=$DEPS_BUILD_DIR/usr
-DMIN_LOG_LEVEL=3"
- DEPS_CMAKE_FLAGS="-DDEPS_DOWNLOAD_DIR:PATH=$DEPS_DOWNLOAD_DIR"
- DEPS_CMAKE_FLAGS="-DDEPS_DOWNLOAD_DIR:PATH=$DEPS_DOWNLOAD_DIR -DUSE_BUNDLED_GPERF=OFF"
# Additional CMake flags for 32-bit builds.
- CMAKE_FLAGS_32BIT="-DCMAKE_SYSTEM_LIBRARY_PATH=/lib32:/usr/lib32:/usr/local/lib32
-DCMAKE_IGNORE_PATH=/lib:/usr/lib:/usr/local/lib
@ -34,6 +34,7 @@ env:
- ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan"
- TSAN_OPTIONS="log_path=$LOG_DIR/tsan"
- UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan"
- ASAN_SYMBOLIZE=asan_symbolize
# Environment variables for Valgrind.
- VALGRIND_LOG="$LOG_DIR/valgrind-%p.log"
# If this file exists, the cache is valid (compile was successful).
@ -50,12 +51,12 @@ jobs:
include:
- stage: normal builds
os: linux
compiler: clang
compiler: clang-4.0
# Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6
env: >
CLANG_SANITIZER=ASAN_UBSAN
# Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6
CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
sudo: true
ASAN_SYMBOLIZE=asan_symbolize-4.0
- os: linux
compiler: gcc
env: >
@ -69,10 +70,10 @@ jobs:
env: BUILD_32BIT=ON
- os: osx
compiler: clang
osx_image: xcode7.3 # macOS 10.11
osx_image: xcode9.4 # macOS 10.13
- os: osx
compiler: gcc
osx_image: xcode7.3 # macOS 10.11
osx_image: xcode9.4 # macOS 10.13
- os: linux
env: CI_TARGET=lint
- stage: Flaky builds
@ -96,29 +97,35 @@ before_cache: ci/before_cache.sh
addons:
apt:
packages:
- apport
- autoconf
- automake
- apport
- build-essential
- clang
- clang-4.0
- cmake
- cscope
- g++-multilib
- gcc-multilib
- gdb
- gperf
- language-pack-tr
- libc6-dev-i386
- libtool
- libtool-bin
- locales
- ninja-build
- pkg-config
- unzip
- valgrind
- xclip
homebrew:
update: true
packages:
- ccache
- ninja
branches:
except:
- nightly
only:
- master
cache:
apt: true

View File

@ -2,11 +2,14 @@
# intro: https://codingnest.com/basic-cmake/
# best practices (3.0+): https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1
cmake_minimum_required(VERSION 2.8.7)
project(nvim)
cmake_minimum_required(VERSION 2.8.12)
project(nvim C)
if(POLICY CMP0059)
cmake_policy(SET CMP0059 OLD) # Needed until cmake 2.8.12. #4389
# Needed for use of DEFINITIONS variable, which is used to collect the
# compilation flags for reporting in "nvim --version"
# https://github.com/neovim/neovim/pull/8558#issuecomment-398033140
cmake_policy(SET CMP0059 OLD)
endif()
# Point CMake at any custom modules we may ship
@ -15,12 +18,41 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
# We don't support building in-tree.
include(PreventInTreeBuilds)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Prefer our bundled versions of dependencies.
if(DEFINED ENV{DEPS_BUILD_DIR})
set(DEPS_PREFIX "$ENV{DEPS_BUILD_DIR}/usr" CACHE PATH "Path prefix for finding dependencies")
else()
set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies")
# When running from within CLion or Visual Studio,
# build bundled dependencies automatically.
if(NOT EXISTS ${DEPS_PREFIX}
AND (DEFINED ENV{CLION_IDE}
OR DEFINED ENV{VisualStudioEdition}))
message(STATUS "Building dependencies...")
set(DEPS_BUILD_DIR ${PROJECT_BINARY_DIR}/.deps)
file(MAKE_DIRECTORY ${DEPS_BUILD_DIR})
execute_process(
COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}
-DCMAKE_C_FLAGS_MINSIZEREL=${CMAKE_C_FLAGS_MINSIZEREL}
-DCMAKE_C_FLAGS_RELWITHDEBINFO=${CMAKE_C_FLAGS_RELWITHDEBINFO}
-DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
${PROJECT_SOURCE_DIR}/third-party
WORKING_DIRECTORY ${DEPS_BUILD_DIR})
execute_process(
COMMAND ${CMAKE_COMMAND} --build ${DEPS_BUILD_DIR}
--config ${CMAKE_BUILD_TYPE})
set(DEPS_PREFIX ${DEPS_BUILD_DIR}/usr)
endif()
endif()
if(CMAKE_CROSSCOMPILING AND NOT UNIX)
list(INSERT CMAKE_FIND_ROOT_PATH 0 ${DEPS_PREFIX})
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}/../host/bin)
@ -47,9 +79,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
endif()
endif()
if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
@ -59,11 +88,19 @@ endif()
option(ENABLE_LIBINTL "enable libintl" ON)
option(ENABLE_LIBICONV "enable libiconv" ON)
if (MINGW)
# Disable LTO by default as it may not compile
# See https://github.com/Alexpux/MINGW-packages/issues/3516
# and https://github.com/neovim/neovim/pull/8654#issuecomment-402316672
option(ENABLE_LTO "enable link time optimization" OFF)
else()
option(ENABLE_LTO "enable link time optimization" ON)
endif()
# Set default build type.
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "CMAKE_BUILD_TYPE not given, defaulting to 'Debug'.")
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build." FORCE)
message(STATUS "CMAKE_BUILD_TYPE not given, defaulting to 'Debug'")
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build" FORCE)
endif()
# Set available build types for CMake GUIs.
@ -75,11 +112,11 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
# version string, else they are combined with the result of `git describe`.
set(NVIM_VERSION_MAJOR 0)
set(NVIM_VERSION_MINOR 3)
set(NVIM_VERSION_PATCH 0)
set(NVIM_VERSION_PATCH 2)
set(NVIM_VERSION_PRERELEASE "") # for package maintainers
# API level
set(NVIM_API_LEVEL 4) # Bump this after any API change.
set(NVIM_API_LEVEL 5) # Bump this after any API change.
set(NVIM_API_LEVEL_COMPAT 0) # Adjust this after a _breaking_ API change.
set(NVIM_API_PRERELEASE false)
@ -103,7 +140,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Default to -O2 on release builds.
if(CMAKE_C_FLAGS_RELEASE MATCHES "-O3")
message(STATUS "Replacing -O3 in CMAKE_C_FLAGS_RELEASE with -O2.")
message(STATUS "Replacing -O3 in CMAKE_C_FLAGS_RELEASE with -O2")
string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
endif()
@ -171,17 +208,16 @@ main(void)
" HAS_ACCEPTABLE_FORTIFY)
if(NOT HAS_ACCEPTABLE_FORTIFY)
message(STATUS "Unsupported _FORTIFY_SOURCE found, forcing _FORTIFY_SOURCE=1.")
message(STATUS "Unsupported _FORTIFY_SOURCE found, forcing _FORTIFY_SOURCE=1")
# Extract possible prefix to _FORTIFY_SOURCE (e.g. -Wp,-D_FORTIFY_SOURCE).
STRING(REGEX MATCH "[^\ ]+-D_FORTIFY_SOURCE" _FORTIFY_SOURCE_PREFIX "${CMAKE_C_FLAGS}")
STRING(REPLACE "-D_FORTIFY_SOURCE" "" _FORTIFY_SOURCE_PREFIX "${_FORTIFY_SOURCE_PREFIX}" )
if(NOT _FORTIFY_SOURCE_PREFIX STREQUAL "")
message(STATUS "Detected _FORTIFY_SOURCE Prefix=${_FORTIFY_SOURCE_PREFIX}.")
message(STATUS "Detected _FORTIFY_SOURCE Prefix=${_FORTIFY_SOURCE_PREFIX}")
endif()
# -U in add_definitions doesn't end up in the correct spot, so we add it to
# the flags variable instead.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_FORTIFY_SOURCE_PREFIX}-U_FORTIFY_SOURCE ${_FORTIFY_SOURCE_PREFIX}-D_FORTIFY_SOURCE=1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_FORTIFY_SOURCE_PREFIX}-U_FORTIFY_SOURCE ${_FORTIFY_SOURCE_PREFIX}-D_FORTIFY_SOURCE=1")
endif()
# Remove --sort-common from linker flags, as this seems to cause bugs (see #2641, #3374).
@ -189,7 +225,7 @@ endif()
if(CMAKE_EXE_LINKER_FLAGS MATCHES "--sort-common" OR
CMAKE_SHARED_LINKER_FLAGS MATCHES "--sort-common" OR
CMAKE_MODULE_LINKER_FLAGS MATCHES "--sort-common")
message(STATUS "Removing --sort-common from linker flags.")
message(STATUS "Removing --sort-common from linker flags")
string(REGEX REPLACE ",--sort-common(=[^,]+)?" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
string(REGEX REPLACE ",--sort-common(=[^,]+)?" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
string(REGEX REPLACE ",--sort-common(=[^,]+)?" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
@ -264,7 +300,7 @@ if(HAS_DIAG_COLOR_FLAG)
add_definitions(-fdiagnostics-color=auto)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
# 1. Array-bounds testing is broken in some GCC versions before 4.8.5.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273
# 2. But _Pragma("...ignored") is broken (unresolved) in GCC 5+:
@ -276,10 +312,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
endif()
endif()
option(TRAVIS_CI_BUILD "Travis/QuickBuild CI. Extra flags will be set." OFF)
option(TRAVIS_CI_BUILD "Travis/QuickBuild CI, extra flags will be set" OFF)
if(TRAVIS_CI_BUILD)
message(STATUS "Travis/QuickBuild CI build enabled.")
message(STATUS "Travis/QuickBuild CI build enabled")
add_definitions(-Werror)
if(DEFINED ENV{BUILD_32BIT})
# Get some test coverage for unsigned char
@ -297,10 +333,14 @@ option(LOG_LIST_ACTIONS "Add list actions logging" OFF)
add_definitions(-DINCLUDE_GENERATED_DECLARATIONS)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
set(NO_UNDEFINED "-Wl,--no-undefined -lsocket")
elseif(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(NO_UNDEFINED "-Wl,--no-undefined")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${NO_UNDEFINED}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${NO_UNDEFINED}")
# For O_CLOEXEC, O_DIRECTORY, and O_NOFOLLOW flags on older systems
# (pre POSIX.1-2008: glibc 2.11 and earlier). #4042
@ -308,10 +348,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_definitions(-D_GNU_SOURCE)
endif()
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME STREQUAL "SunOS")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined -lsocket")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
# Required for luajit.
set(CMAKE_EXE_LINKER_FLAGS
@ -335,7 +371,7 @@ include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS})
option(PREFER_LUA "Prefer Lua over LuaJIT in the nvim executable." OFF)
if(PREFER_LUA)
find_package(Lua REQUIRED)
find_package(Lua 5.1 REQUIRED)
set(LUA_PREFERRED_INCLUDE_DIRS ${LUA_INCLUDE_DIR})
set(LUA_PREFERRED_LIBRARIES ${LUA_LIBRARIES})
# Passive (not REQUIRED): if LUAJIT_FOUND is not set, nvim-test is skipped.
@ -356,8 +392,9 @@ main(void)
return MSGPACK_OBJECT_FLOAT32;
}
" MSGPACK_HAS_FLOAT32)
unset(CMAKE_REQUIRED_LIBRARIES)
if(MSGPACK_HAS_FLOAT32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVIM_MSGPACK_HAS_FLOAT32")
add_definitions(-DNVIM_MSGPACK_HAS_FLOAT32)
endif()
option(FEAT_TUI "Enable the Terminal UI" ON)
@ -377,11 +414,13 @@ if(FEAT_TUI)
return unibi_num_from_var(unibi_var_from_num(0));
}
" UNIBI_HAS_VAR_FROM)
unset(CMAKE_REQUIRED_INCLUDES)
unset(CMAKE_REQUIRED_LIBRARIES)
if(UNIBI_HAS_VAR_FROM)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVIM_UNIBI_HAS_VAR_FROM")
add_definitions(-DNVIM_UNIBI_HAS_VAR_FROM)
endif()
find_package(LibTermkey REQUIRED)
find_package(LibTermkey 0.18 REQUIRED)
include_directories(SYSTEM ${LIBTERMKEY_INCLUDE_DIRS})
endif()
@ -389,7 +428,7 @@ find_package(LibVterm REQUIRED)
include_directories(SYSTEM ${LIBVTERM_INCLUDE_DIRS})
if(WIN32)
find_package(Winpty REQUIRED)
find_package(Winpty 0.4.3 REQUIRED)
include_directories(SYSTEM ${WINPTY_INCLUDE_DIRS})
endif()
@ -400,11 +439,11 @@ option(CLANG_TSAN "Enable Clang thread sanitizer for nvim binary." OFF)
if((CLANG_ASAN_UBSAN AND CLANG_MSAN)
OR (CLANG_ASAN_UBSAN AND CLANG_TSAN)
OR (CLANG_MSAN AND CLANG_TSAN))
message(FATAL_ERROR "Sanitizers cannot be enabled simultaneously.")
message(FATAL_ERROR "Sanitizers cannot be enabled simultaneously")
endif()
if((CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) AND NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
message(FATAL_ERROR "Sanitizers are only supported for Clang.")
message(FATAL_ERROR "Sanitizers are only supported for Clang")
endif()
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD|FreeBSD|Windows") # see #5318
@ -416,7 +455,7 @@ endif()
if(ENABLE_JEMALLOC)
if(CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN)
message(STATUS "Sanitizers have been enabled; don't use jemalloc.")
message(STATUS "Sanitizers enabled; disabling jemalloc")
else()
find_package(JeMalloc REQUIRED)
include_directories(SYSTEM ${JEMALLOC_INCLUDE_DIRS})
@ -472,10 +511,10 @@ else()
endif()
if(NOT LUA_PRG_WORKS)
message(FATAL_ERROR "A suitable Lua interpreter was not found.")
message(FATAL_ERROR "Failed to find a Lua 5.1-compatible interpreter")
endif()
message(STATUS "Using the Lua interpreter ${LUA_PRG}.")
message(STATUS "Using Lua interpreter: ${LUA_PRG}")
# Setup busted.
find_program(BUSTED_PRG NAMES busted busted.bat)
@ -547,6 +586,7 @@ if(BUSTED_PRG)
# Useful for automated build systems, if they want to manually run the tests.
add_custom_target(unittest-prereqs
DEPENDS ${UNITTEST_PREREQS})
set_target_properties(unittest-prereqs PROPERTIES FOLDER test)
add_custom_target(functionaltest-prereqs
DEPENDS ${FUNCTIONALTEST_PREREQS})
@ -569,35 +609,22 @@ if(BUSTED_PRG)
-P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake
DEPENDS ${UNITTEST_PREREQS}
${TEST_TARGET_ARGS})
set_target_properties(unittest PROPERTIES FOLDER test)
else()
message(WARNING "disabling unit tests: no Luajit FFI in ${LUA_PRG}")
endif()
if(${CMAKE_VERSION} VERSION_LESS 2.8.12)
if(CMAKE_GENERATOR MATCHES "Visual Studio")
set(TEST_LIBNVIM_PATH ${CMAKE_BINARY_DIR}/lib/nvim-test.dll)
else()
get_target_property(TEST_LIBNVIM_PATH nvim-test LOCATION)
endif()
configure_file(
${CMAKE_SOURCE_DIR}/test/config/paths.lua.in
${CMAKE_BINARY_DIR}/test/config/paths.lua)
if(LUA_HAS_FFI)
set(TEST_LIBNVIM_PATH $<TARGET_FILE:nvim-test>)
else()
# To avoid duplicating paths.lua.in while we still support CMake < 2.8.12,
# use configure_file() to add the generator expression and then generate
# the final file
if(LUA_HAS_FFI)
set(TEST_LIBNVIM_PATH $<TARGET_FILE:nvim-test>)
else()
set(TEST_LIBNVIM_PATH "")
endif()
configure_file(
${CMAKE_SOURCE_DIR}/test/config/paths.lua.in
${CMAKE_BINARY_DIR}/test/config/paths.lua.gen)
file(GENERATE
OUTPUT ${CMAKE_BINARY_DIR}/test/config/paths.lua
INPUT ${CMAKE_BINARY_DIR}/test/config/paths.lua.gen)
set(TEST_LIBNVIM_PATH "")
endif()
configure_file(
${CMAKE_SOURCE_DIR}/test/config/paths.lua.in
${CMAKE_BINARY_DIR}/test/config/paths.lua.gen)
file(GENERATE
OUTPUT ${CMAKE_BINARY_DIR}/test/config/paths.lua
INPUT ${CMAKE_BINARY_DIR}/test/config/paths.lua.gen)
add_custom_target(functionaltest
COMMAND ${CMAKE_COMMAND}
@ -613,6 +640,8 @@ if(BUSTED_PRG)
-P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake
DEPENDS ${FUNCTIONALTEST_PREREQS}
${TEST_TARGET_ARGS})
set_target_properties(functionaltest functionaltest-prereqs
PROPERTIES FOLDER test)
add_custom_target(benchmark
COMMAND ${CMAKE_COMMAND}
@ -628,6 +657,7 @@ if(BUSTED_PRG)
-P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake
DEPENDS ${BENCHMARK_PREREQS}
${TEST_TARGET_ARGS})
set_target_properties(benchmark benchmark-prereqs PROPERTIES FOLDER test)
endif()
if(BUSTED_LUA_PRG)
@ -645,6 +675,7 @@ if(BUSTED_LUA_PRG)
-P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake
DEPENDS ${FUNCTIONALTEST_PREREQS}
${TEST_TARGET_ARGS})
set_target_properties(functionaltest-lua PROPERTIES FOLDER test)
endif()
if(LUACHECK_PRG)
@ -657,7 +688,7 @@ if(LUACHECK_PRG)
-P ${PROJECT_SOURCE_DIR}/cmake/RunLuacheck.cmake)
add_custom_target(
blobcodelint
lintbuiltinlua
COMMAND
${CMAKE_COMMAND}
-DLUACHECK_PRG=${LUACHECK_PRG}
@ -666,10 +697,21 @@ if(LUACHECK_PRG)
-DREAD_GLOBALS=vim
-P ${PROJECT_SOURCE_DIR}/cmake/RunLuacheck.cmake
)
add_custom_target(
lintruntimelua
COMMAND
${CMAKE_COMMAND}
-DLUACHECK_PRG=${LUACHECK_PRG}
-DLUAFILES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/runtime/lua
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-DREAD_GLOBALS=vim
-P ${PROJECT_SOURCE_DIR}/cmake/RunLuacheck.cmake
)
# TODO(ZyX-I): Run linter for all lua code in src
add_custom_target(
lualint
DEPENDS blobcodelint
DEPENDS lintruntimelua
DEPENDS lintbuiltinlua
)
endif()

48
MAINTAIN.md Normal file
View File

@ -0,0 +1,48 @@
Maintaining the Neovim project
==============================
Notes on maintaining the Neovim project.
See also: https://github.com/git/git/blob/master/Documentation/howto/maintain-git.txt
Ticket Triage
-------------
In practice we haven't found a meaningful way to forecast more precisely than
"next" and "after next". That means there are usually one or two (at most)
planned milestones:
- Next bugfix-release (1.0.x)
- Next feature-release (1.x.0)
The forecasting problem might be solved with an explicit priority system (like
Bram's todo.txt). Meanwhile the Neovim priority system is defined by:
- PRs nearing completion (RDY).
- Issue labels. E.g. the +plan label increases the ticket's priority merely for
having a plan written down: it is _closer to completion_ than tickets without
a plan.
- Comment activity or new information.
Anything that isn't in the next milestone, and doesn't have a RDY PR ... is
just not something you care very much about, by construction. Post-release you
can review open issues, but chances are your next milestone is already getting
full :)
Release Policy
--------------
The goal is "early and often".
Up to now we use only one branch, the `master` branch.
- If `master` is unstable we don't release.
- If the last release has a major bug, we:
1. Fix the bug on `master`.
2. Disable or remove any known risks present on `master`.
3. Cut a release from `master`.
This is a bit silly, but it works ok. And it keeps `master` from biting off
more feature-creep than it can chew.
See also: https://github.com/neovim/neovim/issues/862

View File

@ -44,10 +44,11 @@ BUILD_CMD = $(BUILD_TOOL) $(VERBOSE_FLAG)
# Extra CMake flags which extend the default set
CMAKE_EXTRA_FLAGS ?=
DEPS_CMAKE_FLAGS ?=
USE_BUNDLED_DEPS ?=
# Back-compat: USE_BUNDLED_DEPS was the old name.
USE_BUNDLED ?= $(USE_BUNDLED_DEPS)
ifneq (,$(USE_BUNDLED_DEPS))
BUNDLED_CMAKE_FLAG := -DUSE_BUNDLED=$(USE_BUNDLED_DEPS)
ifneq (,$(USE_BUNDLED))
BUNDLED_CMAKE_FLAG := -DUSE_BUNDLED=$(USE_BUNDLED)
endif
ifneq (,$(findstring functionaltest-lua,$(MAKECMDGOALS)))
@ -76,12 +77,12 @@ build/.ran-cmake: | deps
touch $@
deps: | build/.ran-third-party-cmake
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
ifeq ($(call filter-true,$(USE_BUNDLED)),)
+$(BUILD_CMD) -C $(DEPS_BUILD_DIR)
endif
build/.ran-third-party-cmake:
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
ifeq ($(call filter-true,$(USE_BUNDLED)),)
mkdir -p $(DEPS_BUILD_DIR)
cd $(DEPS_BUILD_DIR) && \
$(CMAKE_PRG) -G '$(BUILD_TYPE)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \
@ -102,6 +103,10 @@ endif
helptags: | nvim
+$(BUILD_CMD) -C build helptags
# Builds help HTML _and_ checks for invalid help tags.
helphtml: | nvim helptags
+$(BUILD_CMD) -C build doc_html
functionaltest: | nvim
+$(BUILD_CMD) -C build functionaltest
@ -142,6 +147,9 @@ clint-full: build/.ran-cmake
check-single-includes: build/.ran-cmake
+$(BUILD_CMD) -C build check-single-includes
generated-sources: build/.ran-cmake
+$(BUILD_CMD) -C build generated-sources
appimage:
bash scripts/genappimage.sh

View File

@ -6,12 +6,12 @@
[Community](https://neovim.io/community/) |
[Gitter **Chat**](https://gitter.im/neovim/neovim)
[![Travis Build Status](https://travis-ci.org/neovim/neovim.svg?branch=master)](https://travis-ci.org/neovim/neovim)
[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/urdqjrik5u521fac/branch/master?svg=true)](https://ci.appveyor.com/project/neovim/neovim/branch/master)
[![codecov](https://img.shields.io/codecov/c/github/neovim/neovim.svg)](https://codecov.io/gh/neovim/neovim)
[![Coverity Scan Build](https://scan.coverity.com/projects/2227/badge.svg)](https://scan.coverity.com/projects/2227)
[![Clang Scan Build](https://neovim.io/doc/reports/clang/badge.svg)](https://neovim.io/doc/reports/clang)
[![PVS-studio Check](https://neovim.io/doc/reports/pvs/badge.svg)](https://neovim.io/doc/reports/pvs/PVS-studio.html.d)
[![Travis build status](https://travis-ci.org/neovim/neovim.svg?branch=master)](https://travis-ci.org/neovim/neovim)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/urdqjrik5u521fac/branch/master?svg=true)](https://ci.appveyor.com/project/neovim/neovim/branch/master)
[![Codecov coverage](https://img.shields.io/codecov/c/github/neovim/neovim.svg)](https://codecov.io/gh/neovim/neovim)
[![Coverity Scan analysis](https://scan.coverity.com/projects/2227/badge.svg)](https://scan.coverity.com/projects/2227)
[![Clang analysis](https://neovim.io/doc/reports/clang/badge.svg)](https://neovim.io/doc/reports/clang)
[![PVS-Studio analysis](https://neovim.io/doc/reports/pvs/badge.svg)](https://neovim.io/doc/reports/pvs/PVS-studio.html.d)
[![Packages](https://repology.org/badge/tiny-repos/neovim.svg)](https://repology.org/metapackage/neovim)
[![Debian CI](https://badges.debian.net/badges/debian/testing/neovim/version.svg)](https://buildd.debian.org/neovim)
@ -24,11 +24,35 @@ Neovim is a project that seeks to aggressively refactor Vim in order to:
- Enable [advanced UIs] without modifications to the core
- Maximize [extensibility](https://github.com/neovim/neovim/wiki/Plugin-UI-architecture)
See [the wiki](https://github.com/neovim/neovim/wiki/Introduction) and [Roadmap]
See the [Introduction](https://github.com/neovim/neovim/wiki/Introduction) wiki page and [Roadmap]
for more information.
[![Throughput Graph](https://graphs.waffle.io/neovim/neovim/throughput.svg)](https://waffle.io/neovim/neovim/metrics)
Features
--------
- Modern [GUIs](https://github.com/neovim/neovim/wiki/Related-projects#gui)
- [API](https://github.com/neovim/neovim/wiki/Related-projects#api-clients)
access from any language including Clojure, Lisp, Go, Haskell, Lua,
JavaScript, Perl, Python, Ruby, and Rust
- Embedded, scriptable [terminal emulator](https://neovim.io/doc/user/nvim_terminal_emulator.html)
- Asynchronous [job control](https://github.com/neovim/neovim/pull/2247)
- [Shared data (shada)](https://github.com/neovim/neovim/pull/2506) among multiple editor instances
- [XDG base directories](https://github.com/neovim/neovim/pull/3470) support
- Compatible with most Vim plugins, including Ruby and Python plugins
See [`:help nvim-features`][nvim-features] for the full list!
Install from package
--------------------
Pre-built packages for Windows, macOS, and Linux are found on the
[Releases](https://github.com/neovim/neovim/releases/) page.
Managed packages are in [Homebrew], [Debian], [Ubuntu], [Fedora], [Arch Linux], [Gentoo],
and [more](https://github.com/neovim/neovim/wiki/Installing-Neovim)!
Install from source
-------------------
@ -40,22 +64,40 @@ To install to a non-default location, set `CMAKE_INSTALL_PREFIX`:
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=/full/path/"
make install
To list all targets:
To skip bundled (`third-party/*`) dependencies:
cmake --build build --target help
1. Install the dependencies using a package manager.
```
sudo apt install gperf luajit luarocks libuv1-dev libluajit-5.1-dev libunibilium-dev libmsgpack-dev libtermkey-dev libvterm-dev libjemalloc-dev
sudo luarocks build mpack
sudo luarocks build lpeg
sudo luarocks build inspect
```
2. Build with `USE_BUNDLED=OFF`:
```
make CMAKE_BUILD_TYPE=RelWithDebInfo USE_BUNDLED=OFF
sudo make install
```
To skip "bundled" dependencies define `USE_BUNDLED_DEPS=NO` (CMake option: `USE_BUNDLED=NO`).
CMake features:
See [the wiki](https://github.com/neovim/neovim/wiki/Building-Neovim) for details.
- List all build targets:
```
cmake --build build --target help
```
- Print all variable definitions:
```
cmake -LAH
```
- `build/CMakeCache.txt` contains the resolved values of all CMake variables.
- `build/compile_commands.json` shows the full compiler invocations for each translation unit.
Install from package
See the [Building Neovim](https://github.com/neovim/neovim/wiki/Building-Neovim) wiki page for details.
Transitioning from Vim
--------------------
Pre-built packages for Windows, macOS, and Linux are found at the
[Releases](https://github.com/neovim/neovim/releases/) page.
Managed packages are in [Homebrew], [Debian], [Ubuntu], [Fedora], [Arch Linux], [Gentoo],
and [more](https://github.com/neovim/neovim/wiki/Installing-Neovim)!
See [`:help nvim-from-vim`](https://neovim.io/doc/user/nvim.html#nvim-from-vim) for instructions.
Project layout
--------------
@ -63,34 +105,19 @@ Project layout
├─ ci/ build automation
├─ cmake/ build scripts
├─ runtime/ user plugins/docs
├─ src/ application source code (see src/nvim/README.md)
├─ src/nvim/ application source code (see src/nvim/README.md)
│ ├─ api/ API subsystem
│ ├─ eval/ VimL subsystem
│ ├─ event/ event-loop subsystem
│ ├─ generators/ code generation (pre-compilation)
│ ├─ lib/ generic data structures
│ ├─ lua/ lua subsystem
│ ├─ lua/ Lua subsystem
│ ├─ msgpack_rpc/ RPC subsystem
│ ├─ os/ low-level platform code
│ └─ tui/ built-in UI
├─ third-party/ cmake subproject to build dependencies
├─ third-party/ CMake subproject to build dependencies
└─ test/ tests (see test/README.md)
Features
--------
- Modern [GUIs](https://github.com/neovim/neovim/wiki/Related-projects#gui)
- [API](https://github.com/neovim/neovim/wiki/Related-projects#api-clients)
access from any language including clojure, lisp, go, haskell, lua,
javascript, perl, python, ruby, rust.
- Embedded, scriptable [terminal emulator](https://neovim.io/doc/user/nvim_terminal_emulator.html)
- Asynchronous [job control](https://github.com/neovim/neovim/pull/2247)
- [Shared data (shada)](https://github.com/neovim/neovim/pull/2506) among multiple editor instances
- [XDG base directories](https://github.com/neovim/neovim/pull/3470) support
- Compatible with most Vim plugins, including Ruby and Python plugins.
See [`:help nvim-features`][nvim-features] for the full list!
License
-------
@ -124,7 +151,7 @@ See `LICENSE` for details.
[Homebrew]: https://github.com/neovim/homebrew-neovim#installation
[Debian]: https://packages.debian.org/testing/neovim
[Ubuntu]: http://packages.ubuntu.com/search?keywords=neovim
[Fedora]: https://admin.fedoraproject.org/pkgdb/package/rpms/neovim
[Fedora]: https://apps.fedoraproject.org/packages/neovim
[Arch Linux]: https://www.archlinux.org/packages/?q=neovim
[Gentoo]: https://packages.gentoo.org/packages/app-editors/neovim

View File

@ -18,6 +18,7 @@ build_script:
- powershell ci\build.ps1
cache:
- C:\msys64\var\cache\pacman\pkg -> ci\build.ps1
- .deps -> ci\build.ps1
- .deps -> third-party\**
artifacts:
- path: build/Neovim.zip

View File

@ -1,7 +1,8 @@
-- TODO(jkeyes): remove this and use the upstream version as soon as it is
-- available in a release of busted.
-- TODO(jkeyes): Use the upstream version when busted releases it. (But how to
-- inject our call to global_helpers.read_nvim_log() ?)
local pretty = require 'pl.pretty'
local global_helpers = require('test.helpers')
return function(options)
local busted = require 'busted'
@ -18,6 +19,7 @@ return function(options)
end
handler.suiteEnd = function()
io.write(global_helpers.read_nvim_log())
print('1..' .. counter)
io.flush()
return nil, true

View File

@ -1,6 +1,7 @@
local s = require 'say'
local pretty = require 'pl.pretty'
local term = require 'term'
local global_helpers = require('test.helpers')
local colors
@ -200,6 +201,7 @@ return function(options)
local tests = (testCount == 1 and 'test' or 'tests')
local files = (fileCount == 1 and 'file' or 'files')
io.write(globalTeardown)
io.write(global_helpers.read_nvim_log())
io.write(suiteEndString:format(testCount, tests, fileCount, files, elapsedTime_ms))
io.write(getSummaryString())
io.flush()

View File

@ -7,10 +7,6 @@ if [[ "${CI_TARGET}" == lint ]]; then
exit
fi
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
brew update
fi
echo 'python info:'
(
2>&1 python --version || true
@ -24,17 +20,15 @@ echo 'python info:'
) | sed 's/^/ /'
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
echo "Upgrade Python 3."
brew upgrade python
echo "Upgrade Python 3 pip."
pip3 -q install --user --upgrade pip
echo "Upgrade Python 3 pip"
python3 -m pip -q install --user --upgrade pip
else
echo "Upgrade Python 2 pip."
pip2.7 -q install --user --upgrade pip
echo "Upgrade Python 3 pip."
echo "Upgrade Python 2 pip"
python2.7 -m pip -q install --user --upgrade pip
echo "Upgrade Python 3 pip"
# Allow failure. pyenv pip3 on travis is broken:
# https://github.com/travis-ci/travis-ci/issues/8363
pip3 -q install --user --upgrade pip || true
python3 -m pip -q install --user --upgrade pip || true
fi
echo "Install node (LTS)"

View File

@ -1,4 +1,5 @@
Set-PSDebug -Trace 1
$ErrorActionPreference = 'stop'
Set-PSDebug -Strict -Trace 1
$env:CONFIGURATION -match '^(?<compiler>\w+)_(?<bits>32|64)(?:-(?<option>\w+))?$'
$compiler = $Matches.compiler
@ -12,14 +13,16 @@ $nvimCmakeVars = @{
CMAKE_BUILD_TYPE = $cmakeBuildType;
BUSTED_OUTPUT_TYPE = 'nvim';
}
$uploadToCodeCov = $false
# For pull requests, skip some build configurations to save time.
if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -and $env:CONFIGURATION -match '^(MSVC_64|MINGW_32)$') {
if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -and $env:CONFIGURATION -match '^(MSVC_64|MINGW_32|MINGW_64-gcov)$') {
exit 0
}
function exitIfFailed() {
if ($LastExitCode -ne 0) {
Set-PSDebug -Off
exit $LastExitCode
}
}
@ -38,15 +41,21 @@ if ($compiler -eq 'MINGW') {
# These are native MinGW builds, but they use the toolchain inside
# MSYS2, this allows using all the dependencies and tools available
# in MSYS2, but we cannot build inside the MSYS2 shell.
$cmakeGenerator = 'MinGW Makefiles'
$cmakeGeneratorArgs = 'VERBOSE=1'
$cmakeGenerator = 'Ninja'
$cmakeGeneratorArgs = '-v'
$mingwPackages = @('ninja', 'cmake', 'perl', 'diffutils', 'unibilium').ForEach({
"mingw-w64-$arch-$_"
})
# Add MinGW to the PATH
$env:PATH = "C:\msys64\mingw$bits\bin;$env:PATH"
# Avoid pacman "warning" which causes non-zero return code. https://github.com/open62541/open62541/issues/2068
& C:\msys64\usr\bin\mkdir -p /var/cache/pacman/pkg
# Build third-party dependencies
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" ; exitIfFailed
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-$arch-cmake mingw-w64-$arch-perl mingw-w64-$arch-diffutils mingw-w64-$arch-unibilium" ; exitIfFailed
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S $mingwPackages" ; exitIfFailed
}
elseif ($compiler -eq 'MSVC') {
$cmakeGeneratorArgs = '/verbosity:normal'
@ -58,32 +67,31 @@ elseif ($compiler -eq 'MSVC') {
}
}
# Remove Git Unix utilities from the PATH
$env:PATH = $env:PATH.Replace('C:\Program Files\Git\usr\bin', '')
# Setup python (use AppVeyor system python)
C:\Python27\python.exe -m pip install neovim ; exitIfFailed
C:\Python35\python.exe -m pip install neovim ; exitIfFailed
C:\Python27\python.exe -m pip install pynvim ; exitIfFailed
C:\Python35\python.exe -m pip install pynvim ; exitIfFailed
# Disambiguate python3
move c:\Python35\python.exe c:\Python35\python3.exe
$env:PATH = "C:\Python35;C:\Python27;$env:PATH"
# Sanity check
python -c "import neovim; print(str(neovim))" ; exitIfFailed
python3 -c "import neovim; print(str(neovim))" ; exitIfFailed
python -c "import pynvim; print(str(pynvim))" ; exitIfFailed
python3 -c "import pynvim; print(str(pynvim))" ; exitIfFailed
$env:PATH = "C:\Ruby24\bin;$env:PATH"
cmd /c gem.cmd install neovim ; exitIfFailed
where.exe neovim-ruby-host.bat ; exitIfFailed
gem.cmd install neovim
Get-Command -CommandType Application neovim-ruby-host.bat
cmd /c npm.cmd install -g neovim ; exitIfFailed
where.exe neovim-node-host.cmd ; exitIfFailed
cmd /c npm link neovim
npm.cmd install -g neovim
Get-Command -CommandType Application neovim-node-host.cmd
npm.cmd link neovim
function convertToCmakeArgs($vars) {
return $vars.GetEnumerator() | foreach { "-D$($_.Key)=$($_.Value)" }
}
mkdir .deps
if (-Not (Test-Path -PathType container .deps)) {
mkdir .deps
}
cd .deps
cmake -G $cmakeGenerator $(convertToCmakeArgs($depsCmakeVars)) ..\third-party\ ; exitIfFailed
cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed
@ -103,11 +111,11 @@ $failed = $false
Set-PSDebug -Off
cmake --build . --config $cmakeBuildType --target functionaltest -- $cmakeGeneratorArgs 2>&1 |
foreach { $failed = $failed -or
$_ -match 'Running functional tests failed with error'; $_ }
Set-PSDebug -Trace 1
$_ -match 'functional tests failed with error'; $_ }
if ($failed) {
exit $LastExitCode
}
Set-PSDebug -Strict -Trace 1
if ($uploadToCodecov) {

View File

@ -7,7 +7,7 @@ _stat() {
}
top_make() {
echo '================================================================================'
printf '%78s\n' | tr ' ' '='
# Travis has 1.5 virtual cores according to:
# http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
ninja "$@"
@ -35,7 +35,7 @@ build_deps() {
elif test -f "${CACHE_MARKER}" ; then
echo "Using third-party dependencies from Travis cache (last update: $(_stat "${CACHE_MARKER}"))."
cp -r "${HOME}/.cache/nvim-deps"/. "${DEPS_BUILD_DIR}"
cp -r "${HOME}/.cache/nvim-deps-downloads" "${DEPS_DOWNLOAD_DIR}"
cp -r "${HOME}/.cache/nvim-deps-downloads"/. "${DEPS_DOWNLOAD_DIR}"
fi
# Even if we're using cached dependencies, run CMake and make to

View File

@ -39,13 +39,6 @@ enter_suite() {
exit_suite() {
set +x
if test -f "$NVIM_LOG_FILE" ; then
printf "===============================================================================\n"
printf "NVIM_LOG_FILE: $NVIM_LOG_FILE\n"
cat "$NVIM_LOG_FILE" 2>/dev/null || printf '(empty)'
printf "\n"
rm -rf "$NVIM_LOG_FILE"
fi
travis_fold end "${NVIM_TEST_CURRENT_SUITE}"
if test $FAILED -ne 0 ; then
echo "Suite ${NVIM_TEST_CURRENT_SUITE} failed, summary:"

View File

@ -34,8 +34,10 @@ check_core_dumps() {
local app="${1:-${BUILD_DIR}/bin/nvim}"
if test "${TRAVIS_OS_NAME}" = osx ; then
local cores="$(find /cores/ -type f -print)"
local _sudo='sudo'
else
local cores="$(find ./ -type f -name 'core.*' -print)"
local _sudo=
fi
if test -z "${cores}" ; then
@ -45,7 +47,7 @@ check_core_dumps() {
for core in $cores; do
if test "$del" = "1" ; then
print_core "$app" "$core" >&2
rm "$core"
"$_sudo" rm "$core"
else
print_core "$app" "$core"
fi
@ -81,7 +83,7 @@ valgrind_check() {
asan_check() {
if test "${CLANG_SANITIZER}" = "ASAN_UBSAN" ; then
check_logs "${1}" "*san.*" | asan_symbolize
check_logs "${1}" "*san.*" | $ASAN_SYMBOLIZE
fi
}

View File

@ -8,29 +8,25 @@ if [[ "${CI_TARGET}" == lint ]]; then
fi
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
brew install ninja
brew install gettext
brew reinstall -s libtool
brew install ccache
export PATH="/usr/local/opt/ccache/libexec:$PATH"
fi
echo "Install neovim module for Python 3."
# Allow failure. pyenv pip3 on travis is broken:
# https://github.com/travis-ci/travis-ci/issues/8363
CC=cc pip3 -q install --user --upgrade neovim || true
CC=cc python3 -m pip -q install --user --upgrade neovim || true
if ! [ "${TRAVIS_OS_NAME}" = osx ] ; then
# Update PATH for pip.
export PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:$PATH"
# Use default CC to avoid compilation problems when installing Python modules.
echo "Install neovim module for Python 2."
CC=cc pip2.7 -q install --user --upgrade neovim
echo "Install neovim RubyGem."
gem install --no-document --version ">= 0.2.0" neovim
CC=cc python2.7 -m pip -q install --user --upgrade neovim
fi
echo "Install neovim RubyGem."
gem install --no-document --version ">= 0.8.0" neovim
echo "Install neovim npm package"
npm install -g neovim
npm link neovim

View File

@ -8,7 +8,7 @@ else()
HELPTAGS_WORKING_DIRECTORY)
endif()
message(STATUS "Generating helptags in ${HELPTAGS_WORKING_DIRECTORY}.")
message(STATUS "Generating helptags in ${HELPTAGS_WORKING_DIRECTORY}")
if(EXISTS ${HELPTAGS_WORKING_DIRECTORY}/)
message(STATUS "${HELPTAGS_WORKING_DIRECTORY} already exists")
# If the doc directory already exists, helptags could fail due to duplicate

View File

@ -17,7 +17,7 @@ endfunction()
function(check_lua_deps LUA_PRG_PATH MODULES RESULT_VAR)
# Check if the lua interpreter at the given path
# satisfies all Neovim dependencies
message(STATUS "Checking Lua interpreter ${LUA_PRG_PATH}")
message(STATUS "Checking Lua interpreter: ${LUA_PRG_PATH}")
if(NOT EXISTS ${LUA_PRG_PATH})
message(STATUS
"[${LUA_PRG_PATH}] file not found")

View File

@ -18,5 +18,5 @@ execute_process(
if(NOT res EQUAL 0)
message(STATUS "Output to stderr:\n${err}")
message(FATAL_ERROR "Linting tests failed with error: ${res}.")
message(FATAL_ERROR "Linting tests failed with error: ${res}")
endif()

View File

@ -24,12 +24,12 @@ if(BUSTED_OUTPUT_TYPE STREQUAL junit)
set(EXTRA_ARGS OUTPUT_FILE ${BUILD_DIR}/${TEST_TYPE}test-junit.xml)
endif()
if(DEFINED ENV{TEST_TAG})
if(DEFINED ENV{TEST_TAG} AND NOT "$ENV{TEST_TAG}" STREQUAL "")
set(TEST_TAG "--tags=$ENV{TEST_TAG}")
endif()
if(DEFINED ENV{TEST_FILTER})
set(TEST_TAG "--filter=$ENV{TEST_FILTER}")
if(DEFINED ENV{TEST_FILTER} AND NOT "$ENV{TEST_FILTER}" STREQUAL "")
set(TEST_FILTER "--filter=$ENV{TEST_FILTER}")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKING_DIR}/Xtest-tmpdir)
@ -38,7 +38,10 @@ set(ENV{SYSTEM_NAME} ${SYSTEM_NAME})
execute_process(
COMMAND ${BUSTED_PRG} ${TEST_TAG} ${TEST_FILTER} -v -o ${BUSTED_OUTPUT_TYPE}
--lua=${LUA_PRG} --lazy --helper=${TEST_DIR}/${TEST_TYPE}/preload.lua
--lpath=${BUILD_DIR}/?.lua --lpath=?.lua ${TEST_PATH}
--lpath=${BUILD_DIR}/?.lua
--lpath=${WORKING_DIR}/runtime/lua/?.lua
--lpath=?.lua
${TEST_PATH}
WORKING_DIRECTORY ${WORKING_DIR}
ERROR_VARIABLE err
RESULT_VARIABLE res
@ -50,5 +53,5 @@ file(REMOVE_RECURSE ${WORKING_DIR}/Xtest-tmpdir)
if(NOT res EQUAL 0)
message(STATUS "Output to stderr:\n${err}")
message(FATAL_ERROR "Running ${TEST_TYPE} tests failed with error: ${res}.")
message(FATAL_ERROR "${TEST_TYPE} tests failed with error: ${res}")
endif()

View File

@ -13,7 +13,9 @@ coverage:
status:
project: yes
patch: yes
patch:
default:
threshold: 1
changes: no
parsers:

View File

@ -1,18 +0,0 @@
echo off
if not defined VS150COMNTOOLS (
echo error: missing VS150COMNTOOLS environment variable.
echo Run this script from the 'Developer Command Prompt'.
exit /b 1
)
echo on
set CMAKE=%VS150COMNTOOLS%\..\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe
mkdir .deps
cd .deps
"%CMAKE%" -G "Visual Studio 15 2017" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" ..\third-party\
"%CMAKE%" --build . --config RelWithDebInfo -- "/verbosity:normal"
cd ..

View File

@ -20,41 +20,51 @@
.Sh DESCRIPTION
.Nm
is a text editor based on Vim.
To enter commands in
.Nm ,
type a colon
.Pq Sq \&:
which is also used in this manual to denote commands.
For more information, consult the online help with the
.Ic :help
command.
Start
.Nm
followed by any number of options and/or files:
.Pp
.Dl nvim [options] [file ...]
.Pp
Commands in
.Nm
begin with colon
.Pq Sq \&: .
Type ":help subject" to get help on a specific subject.
Use <Tab> and CTRL-D to complete subjects (":help cmdline\-completion").
.Pp
The "quickref" help section is a condensed reference of editor features:
.Dl :help quickref
.Pp
If you are new to Vim/Nvim, start with the 30-minute tutorial:
.Dl :Tutor
.Pp
After installing/updating Nvim, it's a good idea to run the self-check:
.Dl :checkhealth
.Pp
.Bl -tag -width Fl
.It Ar file ...
File(s) to edit.
If none are specified, open an empty buffer.
If multiple files are specified, open one buffer for each file.
Opens one buffer per file.
To switch between buffers, use the
.Ic :next
and
.Ic :previous
commands.
.It Fl
Read text from standard input until
Reads text from standard input until
.Dv EOF ,
then open a buffer with that text.
Commands are read from standard error, which should be a terminal.
then opens a buffer with that text.
User input is read from standard error, which should be a terminal.
.Sh OPTIONS
.Bl -tag -width Fl
.It Fl t Ar tag
The file to edit and the initial cursor position depends on a
tag, a sort of goto label.
Finds
.Ar tag
is looked up in the tags file, the associated file becomes the current
in the tags file, the associated file becomes the current
file and the associated command is executed.
If
.Ar tag
is a function name, the file containing that function is opened
with the cursor positioned at the start of the function.
See
.Ic ":help tag-commands" .
Cursor is positioned at the tag location in the file.
.Ic ":help tag-commands"
.It Fl q Op Ar errorfile
QuickFix mode.
Display the first error in
@ -66,31 +76,28 @@ is omitted, the value of the 'errorfile' option is used (defaults to
Further errors can be jumped to with the
.Ic :cnext
command.
See
.Ic ":help quickfix" .
.It There are a number of other options:
.Ic ":help quickfix"
.It Fl -
Interpret all further arguments as files.
Can be used to edit files starting with a hyphen
End of options.
Remaining arguments are treated as literal file names, including filenames starting with hyphen
.Pq Sq - .
.It Fl e
Ex mode. Reads stdin as Ex commands.
See
.Ic ":help Ex-mode" .
Ex mode, reading stdin as Ex commands.
.Ic ":help Ex-mode"
.It Fl E
Ex mode, improved. Reads stdin as text.
See
.Ic :help gQ .
Ex mode, reading stdin as text.
.Ic :help Ex-mode
.It Fl es
Silent (batch) mode. Reads stdin as Ex commands.
Silent/batch mode, reading stdin as Ex commands.
.Ic :help silent-mode
.It Fl \&Es
Silent (batch) mode. Reads stdin as text.
Silent/batch mode, reading stdin as text.
.Ic :help silent-mode
.It Fl d
Diff mode.
Show the difference between two to four files, similar to
.Xr sdiff 1 .
See
.Ic ":help diff" .
.Ic ":help diff"
.It Fl R
Read-only mode.
Sets the 'readonly' option.
@ -100,8 +107,7 @@ Buffers can still be edited, but cannot be written to disk if already
associated with a file.
To overwrite a file, add an exclamation mark to the relevant Ex command, such as
.Ic :w! .
See
.Ic ":help 'readonly'" .
.Ic ":help 'readonly'"
.It Fl Z
Restricted mode.
Disable commands that make use of an external shell.
@ -113,8 +119,7 @@ Resets the 'write' and 'modifiable' options, to disable file and buffer
modifications.
.It Fl b
Binary mode.
See
.Ic ":help edit-binary" .
.Ic ":help edit-binary"
.It Fl l
Lisp mode.
Sets the 'lisp' and 'showmatch' options.
@ -126,19 +131,20 @@ Hebrew mode.
Sets the 'hkmap' and 'rightleft' options.
.It Fl V Ns Oo Ar N Oc Ns Op Ar file
Verbose mode.
Print messages about which files are being sourced and for reading and
writing a ShaDa file.
Prints debug messages.
.Ar N
is the 'verbose' level; defaults to
.Cm 10.
is the 'verbose' level, defaults to
.Cm 10 .
If
.Ar file
is specified, append messages to
.Ar file
instead of printing them.
.Ic ":help 'verbose'"
.It Fl D
Debugging mode.
Debug mode for VimL (Vim script).
Started when executing the first command from a script.
:help debug-mode
.It Fl n
Disable the use of swap files.
Sets the 'updatecount' option to
@ -156,8 +162,7 @@ is used to recover a crashed session.
The swap file has the same name as the file it's associated with, but with
.Sq .swp
appended.
See
.Ic ":help recovery" .
.Ic ":help recovery"
.It Fl L Op Ar file
Alias for
.Fl r .
@ -177,8 +182,7 @@ If
is
.Cm NONE ,
loading plugins is also skipped.
See
.Ic ":help initialization" .
.Ic ":help initialization"
.It Fl i Ar shada
Use
.Ar shada
@ -189,8 +193,7 @@ If
is
.Cm NONE ,
do not read or write a ShaDa file.
See
.Ic ":help shada" .
.Ic ":help shada"
.It Fl -noplugin
Skip loading plugins.
Implied by
@ -243,17 +246,12 @@ and
.Ic :/foo
inside
.Nm .
See
.Ic ":help search-pattern" .
.It Fl c Ar command
.Ic ":help search-pattern"
.It \fB\+\fR\fI\,command\/\fR , Fl c Ar command
Execute
.Ar command
after reading the first file.
Up to 10 instances of
.Fl c
or
.Cm +
can be used.
Up to 10 instances allowed.
.Qq Cm +foo
and
.Cm -c \(dqfoo\(dq
@ -280,8 +278,7 @@ If
is omitted then
.Pa Session.vim
is used, if found.
See
.Ic ":help session-file" .
.Ic ":help session-file"
.It Fl s Ar scriptin
Read normal mode commands from
.Ar scriptin .
@ -310,10 +307,12 @@ Can be used to diagnose slow startup times.
Dump API metadata serialized to msgpack and exit.
.It Fl -embed
Use standard input and standard output as a msgpack-rpc channel.
Implies
.Fl -headless .
:help --embed
.It Fl -headless
Do not start a user interface.
Do not start a UI.
When supplied with --embed this implies that the embedding application does not intend to (immediately) start a UI.
Also useful for "scraping" messages in a pipe.
:help --headless
.It Fl -listen Ar address
Start RPC server on this pipe or TCP socket.
.It Fl h , -help
@ -324,11 +323,12 @@ Print version information and exit.
.Sh ENVIRONMENT
.Bl -tag -width Fl
.It Ev NVIM_LOG_FILE
Low-level log file, usually found at ~/.local/share/nvim/log. See :help
$NVIM_LOG_FILE.
Low-level log file, usually found at ~/.local/share/nvim/log.
:help $NVIM_LOG_FILE
.It Ev VIM
Used to locate user files, such as init.vim.
System-dependent, see :help $VIM.
System-dependent.
:help $VIM
.It Ev VIMRUNTIME
Used to locate runtime files (documentation, syntax highlighting, etc.).
.It Ev XDG_CONFIG_HOME
@ -336,7 +336,7 @@ Path to the user-local configuration directory, see
.Sx FILES .
Defaults to
.Pa ~/.config .
See :help xdg.
:help xdg
.It Ev XDG_DATA_HOME
Like
.Ev XDG_CONFIG_HOME ,
@ -344,19 +344,10 @@ but used to store data not generally edited by the user,
namely swap, backup, and ShaDa files.
Defaults to
.Pa ~/.local/share .
See :help xdg.
:help xdg
.It Ev VIMINIT
Ex commands to be executed at startup.
For example, the command to quit is
.Ic :q ,
so to have
.Nm
quit immediately after starting, set
.Ev VIMINIT
to
.Cm q .
See
.Ic ":help VIMINIT" .
.Ic ":help VIMINIT"
.It Ev SHELL
Used to initialize the 'shell' option, which decides the default shell used by
features like
@ -391,10 +382,9 @@ Nvim was started by
Most of Vim was written by
.An -nosplit
.An Bram Moolenaar .
See
.Ic ":help credits" .
Vim is based on Stevie, worked on by
.An Tim Thompson ,
.An Tony Andrews ,
and
.An G.R. (Fred) Walter .
.Ic ":help credits"

View File

@ -21,17 +21,13 @@ add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
${FUNCS_DATA}
)
if(POLICY CMP0054)
cmake_policy(SET CMP0054 OLD)
endif()
file(GLOB PACKAGES ${PROJECT_SOURCE_DIR}/runtime/pack/dist/opt/*)
set(GENERATED_PACKAGE_TAGS)
foreach(PACKAGE ${PACKAGES})
get_filename_component(PACKNAME ${PACKAGE} NAME)
file(GLOB "${PACKNAME}_DOC_FILES" ${PACKAGE}/doc/*.txt)
if("${PACKNAME}_DOC_FILES")
if(${PACKNAME}_DOC_FILES)
file(MAKE_DIRECTORY ${GENERATED_PACKAGE_DIR}/${PACKNAME})
add_custom_target("${PACKNAME}-tags"
COMMAND ${CMAKE_COMMAND} -E copy_directory
@ -72,9 +68,9 @@ foreach(DF ${DOCFILES})
endforeach()
add_custom_target(helptags
COMMAND ${CMAKE_COMMAND} -E remove ${GENERATED_RUNTIME_DIR}/doc/*
COMMAND ${CMAKE_COMMAND} -E remove doc/*
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc
${PROJECT_SOURCE_DIR}/runtime/doc doc
COMMAND "${PROJECT_BINARY_DIR}/bin/nvim"
-u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit
DEPENDS
@ -91,7 +87,7 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
add_custom_target(doc_html
COMMAND make html
DEPENDS
${GENERATED_HELP_TAGS}
helptags
WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}/doc"
)

View File

@ -0,0 +1,48 @@
" Author: Antony Lee <anntzer.lee@gmail.com>
" Description: Helper functions for reStructuredText syntax folding
" Last Modified: 2018-01-07
function s:CacheRstFold()
let closure = {'header_types': {}, 'max_level': 0, 'levels': {}}
function closure.Process(match) dict
let curline = getcurpos()[1]
if has_key(self.levels, curline - 1)
" For over+under-lined headers, the regex will match both at the
" overline and at the title itself; in that case, skip the second match.
return
endif
let lines = split(a:match, '\n')
let key = repeat(lines[-1][0], len(lines))
if !has_key(self.header_types, key)
let self.max_level += 1
let self.header_types[key] = self.max_level
endif
let self.levels[curline] = self.header_types[key]
endfunction
let save_cursor = getcurpos()
silent keeppatterns %s/\v^%(%(([=`:.'"~^_*+#-])\1+\n)?.{1,2}\n([=`:.'"~^_*+#-])\2+)|%(%(([=`:.''"~^_*+#-])\3{2,}\n)?.{3,}\n([=`:.''"~^_*+#-])\4{2,})$/\=closure.Process(submatch(0))/gn
call setpos('.', save_cursor)
let b:RstFoldCache = closure.levels
endfunction
function RstFold#GetRstFold()
if !has_key(b:, 'RstFoldCache')
call s:CacheRstFold()
endif
if has_key(b:RstFoldCache, v:lnum)
return '>' . b:RstFoldCache[v:lnum]
else
return '='
endif
endfunction
function RstFold#GetRstFoldText()
if !has_key(b:, 'RstFoldCache')
call s:CacheRstFold()
endif
let indent = repeat(' ', b:RstFoldCache[v:foldstart] - 1)
let thisline = getline(v:foldstart)
" For over+under-lined headers, skip the overline.
let text = thisline =~ '^\([=`:.''"~^_*+#-]\)\1\+$' ? getline(v:foldstart + 1) : thisline
return indent . text
endfunction

View File

@ -1,7 +1,7 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2012 Jun 20
" Last Change: 2018 Aug 20
let s:cpo_save = &cpo
set cpo&vim
@ -72,8 +72,10 @@ function! ccomplete#Complete(findstart, base)
" Split item in words, keep empty word after "." or "->".
" "aa" -> ['aa'], "aa." -> ['aa', ''], "aa.bb" -> ['aa', 'bb'], etc.
" We can't use split, because we need to skip nested [...].
" "aa[...]" -> ['aa', '[...]'], "aa.bb[...]" -> ['aa', 'bb', '[...]'], etc.
let items = []
let s = 0
let arrays = 0
while 1
let e = match(base, '\.\|->\|\[', s)
if e < 0
@ -107,6 +109,7 @@ function! ccomplete#Complete(findstart, base)
endwhile
let e += 1
call add(items, strpart(base, s, e - s))
let arrays += 1
let s = e
endif
endwhile
@ -161,15 +164,26 @@ function! ccomplete#Complete(findstart, base)
endif
endif
let res = [{'match': match, 'tagline' : '', 'kind' : kind, 'info' : line}]
elseif len(items) == arrays + 1
" Completing one word and it's a local array variable: build tagline
" from declaration line
let match = items[0]
let kind = 'v'
let tagline = "\t/^" . line . '$/'
let res = [{'match': match, 'tagline' : tagline, 'kind' : kind, 'info' : line}]
else
" Completing "var.", "var.something", etc.
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1)
endif
endif
if len(items) == 1
if len(items) == 1 || len(items) == arrays + 1
" Only one part, no "." or "->": complete from tags file.
let tags = taglist('^' . base)
if len(items) == 1
let tags = taglist('^' . base)
else
let tags = taglist('^' . items[0] . '$')
endif
" Remove members, these can't appear without something in front.
call filter(tags, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1')
@ -516,11 +530,24 @@ function! s:StructMembers(typename, items, all)
endif
endif
" Skip over [...] items
let idx = 0
while 1
if idx >= len(a:items)
let target = '' " No further items, matching all members
break
endif
if a:items[idx][0] != '['
let target = a:items[idx]
break
endif
let idx += 1
endwhile
" Put matching members in matches[].
let matches = []
for l in qflist
let memb = matchstr(l['text'], '[^\t]*')
if memb =~ '^' . a:items[0]
if memb =~ '^' . target
" Skip matches local to another file.
if match(l['text'], "\tfile:") < 0 || bufnr('%') == bufnr(matchstr(l['text'], '\t\zs[^\t]*'))
let item = {'match': memb, 'tagline': l['text']}
@ -540,8 +567,8 @@ function! s:StructMembers(typename, items, all)
endfor
if len(matches) > 0
" Skip over [...] items
let idx = 1
" Skip over next [...] items
let idx += 1
while 1
if idx >= len(a:items)
return matches " No further items, return the result.

View File

@ -4,7 +4,7 @@
" plus CSS Speech Module <http://www.w3.org/TR/css3-speech/>
" Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com )
" Original Author: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2016 Jan 11
" Last Change: 2018 Jul 02
let s:values = split("all additive-symbols align-content align-items align-self animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size block-size border border-block-end border-block-end-color border-block-end-style border-block-end-width border-block-start border-block-start-color border-block-start-style border-block-start-width border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-inline-end border-inline-end-color border-inline-end-style border-inline-end-width border-inline-start border-inline-start-color border-inline-start-style border-inline-start-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside caption-side clear clip clip-path color columns column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width content counter-increment counter-reset cue cue-before cue-after cursor direction display empty-cells fallback filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font font-family font-feature-settings font-kerning font-language-override font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-weight grid grid-area grid-auto-columns grid-auto-flow grid-auto-position grid-auto-rows grid-column grid-column-start grid-column-end grid-row grid-row-start grid-row-end grid-template grid-template-areas grid-template-rows grid-template-columns height hyphens image-rendering image-resolution image-orientation ime-mode inline-size isolation justify-content left letter-spacing line-break line-height list-style list-style-image list-style-position list-style-type margin margin-block-end margin-block-start margin-bottom margin-inline-end margin-inline-start margin-left margin-right margin-top marks mask mask-type max-block-size max-height max-inline-size max-width max-zoom min-block-size min-height min-inline-size min-width min-zoom mix-blend-mode negative object-fit object-position offset-block-end offset-block-start offset-inline-end offset-inline-start opacity order orientation orphans outline outline-color outline-offset outline-style outline-width overflow overflow-wrap overflow-x overflow-y pad padding padding-block-end padding-block-start padding-bottom padding-inline-end padding-inline-start padding-left padding-right padding-top page-break-after page-break-before page-break-inside pause-before pause-after pause perspective perspective-origin pointer-events position prefix quotes range resize rest rest-before rest-after right ruby-align ruby-merge ruby-position scroll-behavior scroll-snap-coordinate scroll-snap-destination scroll-snap-points-x scroll-snap-points-y scroll-snap-type scroll-snap-type-x scroll-snap-type-y shape-image-threshold shape-margin shape-outside speak speak-as suffix symbols system table-layout tab-size text-align text-align-last text-combine-upright text-decoration text-decoration-color text-decoration-line text-emphasis text-emphasis-color text-emphasis-position text-emphasis-style text-indent text-orientation text-overflow text-rendering text-shadow text-transform text-underline-position top touch-action transform transform-box transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi unicode-range user-zoom vertical-align visibility voice-balance voice-duration voice-family voice-pitch voice-rate voice-range voice-stress voice-volume white-space widows width will-change word-break word-spacing word-wrap writing-mode z-index zoom")
@ -19,7 +19,6 @@ function! csscomplete#CompleteCSS(findstart, base)
while start >= 0 && line[start - 1] =~ '\%(\k\|-\)'
let start -= 1
endwhile
let b:after = line[compl_begin :]
let b:compl_context = line[0:compl_begin]
return start
endif
@ -37,11 +36,14 @@ function! csscomplete#CompleteCSS(findstart, base)
" 5. if @ complete at-rule
" 6. if ! complete important
if exists("b:compl_context")
let line = getline('.')
let compl_begin = col('.') - 2
let after = line[compl_begin:]
let line = b:compl_context
let after = b:after
unlet! b:compl_context
else
let line = a:base
let after = ''
endif
let res = []

View File

@ -1,7 +1,7 @@
" Vim functions for file type detection
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2017 Nov 11
" Last Change: 2017 Dec 05
" These functions are moved here from runtime/filetype.vim to make startup
" faster.
@ -618,7 +618,11 @@ func dist#ft#FTperl()
setf perl
return 1
endif
if search('^use\s\s*\k', 'nc', 30)
let save_cursor = getpos('.')
call cursor(1,1)
let has_use = search('^use\s\s*\k', 'c', 30)
call setpos('.', save_cursor)
if has_use
setf perl
return 1
endif
@ -628,7 +632,7 @@ endfunc
" Choose context, plaintex, or tex (LaTeX) based on these rules:
" 1. Check the first line of the file for "%&<format>".
" 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords.
" 3. Default to "latex" or to g:tex_flavor, can be set in user's vimrc.
" 3. Default to "plain" or to g:tex_flavor, can be set in user's vimrc.
func dist#ft#FTtex()
let firstline = getline(1)
if firstline =~ '^%&\s*\a\+'

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,14 @@ function! s:check_config() abort
let ok = v:true
call health#report_start('Configuration')
let vimrc = empty($MYVIMRC) ? stdpath('config').'/init.vim' : $MYVIMRC
if !filereadable(vimrc)
let ok = v:false
let has_vim = filereadable(expand('~/.vimrc'))
call health#report_warn('Missing user config file: '.vimrc,
\[ has_vim ? ':help nvim-from-vim' : ':help init.vim' ])
endif
" If $VIM is empty we don't care. Else make sure it is valid.
if !empty($VIM) && !filereadable($VIM.'/runtime/doc/nvim.txt')
let ok = v:false

View File

@ -37,7 +37,12 @@ endfunction
" Handler for s:system() function.
function! s:system_handler(jobid, data, event) dict abort
if a:event ==# 'stdout' || a:event ==# 'stderr'
if a:event ==# 'stderr'
let self.stderr .= join(a:data, '')
if !self.ignore_stderr
let self.output .= join(a:data, '')
endif
elseif a:event ==# 'stdout'
let self.output .= join(a:data, '')
elseif a:event ==# 'exit'
let s:shell_error = a:data
@ -57,16 +62,15 @@ endfunction
" Run a system command and timeout after 30 seconds.
function! s:system(cmd, ...) abort
let stdin = a:0 ? a:1 : ''
let ignore_stderr = a:0 > 1 ? a:2 : 0
let ignore_error = a:0 > 2 ? a:3 : 0
let opts = {
\ 'ignore_stderr': a:0 > 1 ? a:2 : 0,
\ 'output': '',
\ 'stderr': '',
\ 'on_stdout': function('s:system_handler'),
\ 'on_stderr': function('s:system_handler'),
\ 'on_exit': function('s:system_handler'),
\ }
if !ignore_stderr
let opts.on_stderr = function('s:system_handler')
endif
let jobid = jobstart(a:cmd, opts)
if jobid < 1
@ -85,8 +89,8 @@ function! s:system(cmd, ...) abort
call health#report_error(printf('Command timed out: %s', s:shellify(a:cmd)))
call jobstop(jobid)
elseif s:shell_error != 0 && !ignore_error
call health#report_error(printf("Command error (job=%d): `%s` (in %s)\nOutput: %s",
\ jobid, s:shellify(a:cmd), string(getcwd()), opts.output))
call health#report_error(printf("Command error (job=%d, exit code %d): `%s` (in %s)\nOutput: %s\nStderr: %s",
\ jobid, s:shell_error, s:shellify(a:cmd), string(getcwd()), opts.output, opts.stderr))
endif
return opts.output
@ -148,10 +152,10 @@ function! s:check_clipboard() abort
endif
endfunction
" Get the latest Neovim Python client version from PyPI.
" Get the latest Neovim Python client (pynvim) version from PyPI.
function! s:latest_pypi_version() abort
let pypi_version = 'unable to get pypi response'
let pypi_response = s:download('https://pypi.python.org/pypi/neovim/json')
let pypi_response = s:download('https://pypi.python.org/pypi/pynvim/json')
if !empty(pypi_response)
try
let pypi_data = json_decode(pypi_response)
@ -188,9 +192,9 @@ function! s:version_info(python) abort
let nvim_path = s:trim(s:system([
\ a:python, '-c',
\ 'import sys; sys.path.remove(""); ' .
\ 'import neovim; print(neovim.__file__)']))
\ 'import pynvim; print(pynvim.__file__)']))
if s:shell_error || empty(nvim_path)
return [python_version, 'unable to load neovim Python module', pypi_version,
return [python_version, 'unable to load pynvim Python module', pypi_version,
\ nvim_path]
endif
@ -202,13 +206,13 @@ function! s:version_info(python) abort
return a == b ? 0 : a > b ? 1 : -1
endfunction
" Try to get neovim.VERSION (added in 0.1.11dev).
" Try to get pynvim.VERSION (added in 0.1.11dev).
let nvim_version = s:system([a:python, '-c',
\ 'from neovim import VERSION as v; '.
\ 'from pynvim import VERSION as v; '.
\ 'print("{}.{}.{}{}".format(v.major, v.minor, v.patch, v.prerelease))'],
\ '', 1, 1)
if empty(nvim_version)
let nvim_version = 'unable to find neovim Python module version'
let nvim_version = 'unable to find pynvim Python module version'
let base = fnamemodify(nvim_path, ':h')
let metas = glob(base.'-*/METADATA', 1, 1)
\ + glob(base.'-*/PKG-INFO', 1, 1)
@ -289,22 +293,16 @@ function! s:check_python(version) abort
let [pyname, pythonx_errs] = provider#pythonx#Detect(a:version)
if empty(pyname)
call health#report_warn('No Python interpreter was found with the neovim '
call health#report_warn('No Python interpreter was found with the pynvim '
\ . 'module. Using the first available for diagnostics.')
endif
if !empty(pyname)
if exists('g:'.host_prog_var)
let python_bin = exepath(pyname)
endif
let pyname = fnamemodify(pyname, ':t')
elseif exists('g:'.host_prog_var)
let python_bin = pyname
endif
if !empty(pythonx_errs)
call health#report_error('Python provider error', pythonx_errs)
endif
if !empty(pyname) && empty(python_bin) && empty(pythonx_errs)
elseif !empty(pyname) && empty(python_bin)
if !exists('g:'.host_prog_var)
call health#report_info(printf('`g:%s` is not set. Searching for '
\ . '%s in the environment.', host_prog_var, pyname))
@ -354,7 +352,7 @@ function! s:check_python(version) abort
call health#report_warn('pyenv is not set up optimally.', [
\ printf('Create a virtualenv specifically '
\ . 'for Neovim using pyenv, and set `g:%s`. This will avoid '
\ . 'the need to install the Neovim Python module in each '
\ . 'the need to install the pynvim module in each '
\ . 'version/virtualenv.', host_prog_var)
\ ])
elseif !empty(venv)
@ -368,7 +366,7 @@ function! s:check_python(version) abort
call health#report_warn('Your virtualenv is not set up optimally.', [
\ printf('Create a virtualenv specifically '
\ . 'for Neovim and use `g:%s`. This will avoid '
\ . 'the need to install Neovim''s Python module in each '
\ . 'the need to install the pynvim module in each '
\ . 'virtualenv.', host_prog_var)
\ ])
endif
@ -383,8 +381,10 @@ function! s:check_python(version) abort
endif
" Check if $VIRTUAL_ENV is valid.
if exists('$VIRTUAL_ENV')
if !empty(pyname) && $VIRTUAL_ENV !=# matchstr(exepath(pyname), '^\V'.$VIRTUAL_ENV)
if exists('$VIRTUAL_ENV') && !empty(python_bin)
if $VIRTUAL_ENV ==# matchstr(python_bin, '^\V'.$VIRTUAL_ENV)
call health#report_info('$VIRTUAL_ENV matches executable')
else
call health#report_warn(
\ '$VIRTUAL_ENV exists but appears to be inactive. '
\ . 'This could lead to unexpected results.',
@ -400,6 +400,8 @@ function! s:check_python(version) abort
endfor
endif
let pip = 'pip' . (a:version == 2 ? '' : '3')
if !empty(python_bin)
let [pyversion, current, latest, status] = s:version_info(python_bin)
if a:version != str2nr(pyversion)
@ -410,28 +412,35 @@ function! s:check_python(version) abort
call health#report_warn('Python 3.3+ is recommended.')
endif
call health#report_info('Python'.a:version.' version: ' . pyversion)
call health#report_info('Python version: ' . pyversion)
if s:is_bad_response(status)
call health#report_info(printf('%s-neovim version: %s (%s)', pyname, current, status))
call health#report_info(printf('pynvim version: %s (%s)', current, status))
else
call health#report_info(printf('%s-neovim version: %s', pyname, current))
call health#report_info(printf('pynvim version: %s', current))
let [module_found, _msg] = provider#pythonx#CheckForModule(python_bin,
\ 'neovim', a:version)
if !module_found
call health#report_error('Importing "neovim" failed.',
\ "Reinstall \"pynvim\" and optionally \"neovim\" packages.\n" .
\ pip ." uninstall pynvim neovim\n" .
\ pip ." install pynvim\n" .
\ pip ." install neovim # only if needed by third-party software")
endif
endif
if s:is_bad_response(current)
call health#report_error(
\ "Neovim Python client is not installed.\nError: ".current,
\ ['Run in shell: pip' . a:version . ' install neovim'])
\ "pynvim is not installed.\nError: ".current,
\ ['Run in shell: '. pip .' install pynvim'])
endif
if s:is_bad_response(latest)
call health#report_warn('Could not contact PyPI to get latest version.')
call health#report_error('HTTP request failed: '.latest)
elseif s:is_bad_response(status)
call health#report_warn(printf('Latest %s-neovim is NOT installed: %s',
\ pyname, latest))
call health#report_warn(printf('Latest pynvim is NOT installed: %s', latest))
elseif !s:is_bad_response(current)
call health#report_ok(printf('Latest %s-neovim is installed: %s',
\ pyname, latest))
call health#report_ok(printf('Latest pynvim is installed.'))
endif
endif
@ -502,10 +511,10 @@ function! s:check_node() abort
return
endif
if !executable('node') || !executable('npm')
if !executable('node') || (!executable('npm') && !executable('yarn'))
call health#report_warn(
\ '`node` and `npm` must be in $PATH.',
\ ['Install Node.js and verify that `node` and `npm` commands work.'])
\ '`node` and `npm` (or `yarn`) must be in $PATH.',
\ ['Install Node.js and verify that `node` and `npm` (or `yarn`) commands work.'])
return
endif
let node_v = get(split(s:system('node -v'), "\n"), 0, '')
@ -521,9 +530,9 @@ function! s:check_node() abort
let host = provider#node#Detect()
if empty(host)
call health#report_warn('Missing "neovim" npm package.',
call health#report_warn('Missing "neovim" npm (or yarn) package.',
\ ['Run in shell: npm install -g neovim',
\ 'Is the npm bin directory in $PATH?'])
\ 'Run in shell (if you use yarn): yarn global add neovim'])
return
endif
call health#report_info('Neovim node.js host: '. host)
@ -559,7 +568,7 @@ function! s:check_node() abort
\ current_npm, latest_npm),
\ ['Run in shell: npm install -g neovim'])
else
call health#report_ok('Latest "neovim" npm package is installed: '. current_npm)
call health#report_ok('Latest "neovim" npm/yarn package is installed: '. current_npm)
endif
endfunction

View File

@ -1,5 +1,10 @@
" Maintainer: Anmol Sethi <anmol@aubble.com>
if exists('s:loaded_man')
finish
endif
let s:loaded_man = 1
let s:find_arg = '-w'
let s:localfile_arg = v:true " Always use -l if possible. #6683
let s:section_arg = '-s'
@ -144,8 +149,9 @@ function! s:system(cmd, ...) abort
endfunction
function! s:get_page(path) abort
" Respect $MANWIDTH or default to window width.
let manwidth = empty($MANWIDTH) ? winwidth(0) : $MANWIDTH
" Disable hard-wrap by using a big $MANWIDTH (max 1000 on some systems #9065).
" We use soft wrap: ftplugin/man.vim sets wrap/breakindent/….
let manwidth = 999
" Force MANPAGER=cat to ensure Vim is not recursively invoked (by man-db).
" http://comments.gmane.org/gmane.editors.vim.devel/29085
" Set MAN_KEEP_FORMATTING so Debian man doesn't discard backspaces.
@ -161,6 +167,11 @@ function! s:put_page(page) abort
while getline(1) =~# '^\s*$'
silent keepjumps 1delete _
endwhile
" XXX: nroff justifies text by filling it with whitespace. That interacts
" badly with our use of $MANWIDTH=999. Hack around this by using a fixed
" size for those whitespace regions.
silent! keeppatterns keepjumps %s/\s\{199,}/\=repeat(' ', 10)/g
1
lua require("man").highlight_man_page()
setlocal filetype=man
endfunction
@ -212,9 +223,9 @@ function! man#extract_sect_and_name_ref(ref) abort
endfunction
function! s:get_path(sect, name) abort
" Some man implementations (OpenBSD) return all available paths from the
" search command, so we get() the first one. #8341
if empty(a:sect)
" Some man implementations (OpenBSD) return all available paths from the
" search command, so we get() the first one. #8341
return substitute(get(split(s:system(['man', s:find_arg, a:name])), 0, ''), '\n\+$', '', '')
endif
" '-s' flag handles:
@ -222,7 +233,7 @@ function! s:get_path(sect, name) abort
" - sections starting with '-'
" - 3pcap section (found on macOS)
" - commas between sections (for section priority)
return substitute(s:system(['man', s:find_arg, s:section_arg, a:sect, a:name]), '\n\+$', '', '')
return substitute(get(split(s:system(['man', s:find_arg, s:section_arg, a:sect, a:name])), 0, ''), '\n\+$', '', '')
endfunction
function! s:verify_exists(sect, name) abort
@ -381,15 +392,17 @@ function! man#init_pager() abort
keepjumps 1
endif
lua require("man").highlight_man_page()
" This is not perfect. See `man glDrawArraysInstanced`. Since the title is
" all caps it is impossible to tell what the original capitilization was.
" Guess the ref from the heading (which is usually uppercase, so we cannot
" know the correct casing, cf. `man glDrawArraysInstanced`).
let ref = substitute(matchstr(getline(1), '^[^)]\+)'), ' ', '_', 'g')
try
let b:man_sect = man#extract_sect_and_name_ref(ref)[0]
catch
let b:man_sect = ''
endtry
execute 'silent file man://'.fnameescape(ref)
if -1 == match(bufname('%'), 'man:\/\/') " Avoid duplicate buffers, E95.
execute 'silent file man://'.tolower(fnameescape(ref))
endif
endfunction
call s:init()

View File

@ -605,13 +605,10 @@ function msgpack#eval(s, special_objs) abort
call add(expr, dec)
endif
endif
elseif s =~# '-\?\%(inf\|nan\)'
if s[0] is# '-'
call add(expr, '-')
let s = s[1:]
endif
call add(expr, s:MSGPACK_SPECIAL_OBJECTS[s[0:2]])
let s = s[3:]
elseif s =~# '\v^\-%(inf|nan)'
call add(expr, '-')
call add(expr, s:MSGPACK_SPECIAL_OBJECTS[s[1:3]])
let s = s[4:]
elseif stridx('="+', s[0]) != -1
let match = matchlist(s, '\v\C^(\=|\+\((\-?\d+)\)|)(\"%(\\.|[^\\"]+)*\")')
if empty(match)

View File

@ -3,7 +3,7 @@
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" URL: https://github.com/shawncplus/phpcomplete.vim
" Last Change: 2016 Oct 10
" Last Change: 2018 Oct 10
"
" OPTIONS:
"
@ -146,6 +146,8 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
end
try
let eventignore = &eventignore
let &eventignore = 'all'
let winheight = winheight(0)
let winnr = winnr()
@ -216,6 +218,7 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
endif
finally
silent! exec winnr.'resize '.winheight
let &eventignore = eventignore
endtry
endfunction
" }}}
@ -1393,23 +1396,28 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
for classstructure in classcontents
let docblock_target_pattern = 'function\s\+&\?'.method.'\>\|\(public\|private\|protected\|var\).\+\$'.method.'\>\|@property.\+\$'.method.'\>'
let doc_str = phpcomplete#GetDocBlock(split(classstructure.content, '\n'), docblock_target_pattern)
if doc_str != ''
let return_type_hint = phpcomplete#GetFunctionReturnTypeHint(split(classstructure.content, '\n'), 'function\s\+&\?'.method.'\>')
if doc_str != '' || return_type_hint != ''
break
endif
endfor
if doc_str != ''
if doc_str != '' || return_type_hint != ''
let docblock = phpcomplete#ParseDocBlock(doc_str)
if has_key(docblock.return, 'type') || has_key(docblock.var, 'type') || len(docblock.properties) > 0
let type = has_key(docblock.return, 'type') ? docblock.return.type : has_key(docblock.var, 'type') ? docblock.var.type : ''
if has_key(docblock.return, 'type') || has_key(docblock.var, 'type') || len(docblock.properties) > 0 || return_type_hint != ''
if return_type_hint == ''
let type = has_key(docblock.return, 'type') ? docblock.return.type : has_key(docblock.var, 'type') ? docblock.var.type : ''
if type == ''
for property in docblock.properties
if property.description =~? method
let type = property.type
break
endif
endfor
endif
if type == ''
for property in docblock.properties
if property.description =~? method
let type = property.type
break
endif
endfor
endif
else
let type = return_type_hint
end
" there's a namespace in the type, threat the type as FQCN
if type =~ '\\'
@ -1483,7 +1491,7 @@ function! phpcomplete#GetMethodStack(line) " {{{
continue
endif
" if it's looks like a string
" if it looks like a string
if current_char == "'" || current_char == '"'
" and it is not escaped
if prev_char != '\' || (prev_char == '\' && prev_prev_char == '\')
@ -1587,9 +1595,11 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
elseif function_file != '' && filereadable(function_file)
let file_lines = readfile(function_file)
let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>')
let return_type_hint = phpcomplete#GetFunctionReturnTypeHint(file_lines, 'function\s*&\?'.function_name.'\>')
let docblock = phpcomplete#ParseDocBlock(docblock_str)
if has_key(docblock.return, 'type')
let classname_candidate = docblock.return.type
let type = has_key(docblock.return, 'type') ? docblock.return.type : return_type_hint
if type != ''
let classname_candidate = type
let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines)
" try to expand the classname of the returned type with the context got from the function's source file
@ -1821,9 +1831,11 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
elseif function_file != '' && filereadable(function_file)
let file_lines = readfile(function_file)
let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>')
let return_type_hint = phpcomplete#GetFunctionReturnTypeHint(file_lines, 'function\s*&\?'.function_name.'\>')
let docblock = phpcomplete#ParseDocBlock(docblock_str)
if has_key(docblock.return, 'type')
let classname_candidate = docblock.return.type
let type = has_key(docblock.return, 'type') ? docblock.return.type : return_type_hint
if type != ''
let classname_candidate = type
let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines)
" try to expand the classname of the returned type with the context got from the function's source file
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, function_imports)
@ -2413,6 +2425,44 @@ function! phpcomplete#ParseDocBlock(docblock) " {{{
endfunction
" }}}
function! phpcomplete#GetFunctionReturnTypeHint(sccontent, search)
let i = 0
let l = 0
let function_line_start = -1
let function_line_end = -1
let sccontent_len = len(a:sccontent)
let return_type = ''
while (i < sccontent_len)
let line = a:sccontent[i]
" search for a function declaration
if line =~? a:search
let l = i
let function_line_start = i
" now search for the first { where the function body starts
while l < sccontent_len
let line = a:sccontent[l]
if line =~? '\V{'
let function_line_end = l
break
endif
let l += 1
endwhile
break
endif
let i += 1
endwhile
" now grab the lines that holds the function declaration line
if function_line_start != -1 && function_line_end != -1
let function_line = join(a:sccontent[function_line_start :function_line_end], " ")
let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
let return_type = matchstr(function_line, '\c\s*:\s*\zs'.class_name_pattern.'\ze\s*{')
endif
return return_type
endfunction
function! phpcomplete#GetTypeFromDocBlockParam(docblock_type) " {{{
if a:docblock_type !~ '|'
return a:docblock_type
@ -2572,7 +2622,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
" find kind flags from tags or built in methods for the objects we extracted
" they can be either classes, interfaces or namespaces, no other thing is importable in php
for [key, import] in items(imports)
" if theres a \ in the name we have it's definetly not a built in thing, look for tags
" if theres a \ in the name we have it's definitely not a built in thing, look for tags
if import.name =~ '\\'
let patched_ctags_detected = 0
let [classname, namespace_for_classes] = phpcomplete#ExpandClassName(import.name, '\', {})

View File

@ -60,6 +60,7 @@ function! provider#clipboard#Executable() abort
let s:err = 'clipboard: invalid g:clipboard'
return ''
endif
let s:copy = get(g:clipboard, 'copy', { '+': v:null, '*': v:null })
let s:paste = get(g:clipboard, 'paste', { '+': v:null, '*': v:null })
let s:cache_enabled = get(g:clipboard, 'cache_enabled', 0)
@ -71,18 +72,24 @@ function! provider#clipboard#Executable() abort
let s:paste['*'] = s:paste['+']
let s:cache_enabled = 0
return 'pbcopy'
elseif exists('$DISPLAY') && executable('xsel') && s:cmd_ok('xsel -o -b')
let s:copy['+'] = 'xsel --nodetach -i -b'
let s:paste['+'] = 'xsel -o -b'
let s:copy['*'] = 'xsel --nodetach -i -p'
let s:paste['*'] = 'xsel -o -p'
return 'xsel'
elseif exists('$WAYLAND_DISPLAY') && executable('wl-copy') && executable('wl-paste')
let s:copy['+'] = 'wl-copy --foreground'
let s:paste['+'] = 'wl-paste --no-newline'
let s:copy['*'] = 'wl-copy --foreground --primary'
let s:paste['*'] = 'wl-paste --no-newline --primary'
return 'wl-copy'
elseif exists('$DISPLAY') && executable('xclip')
let s:copy['+'] = 'xclip -quiet -i -selection clipboard'
let s:paste['+'] = 'xclip -o -selection clipboard'
let s:copy['*'] = 'xclip -quiet -i -selection primary'
let s:paste['*'] = 'xclip -o -selection primary'
return 'xclip'
elseif exists('$DISPLAY') && executable('xsel') && s:cmd_ok('xsel -o -b')
let s:copy['+'] = 'xsel --nodetach -i -b'
let s:paste['+'] = 'xsel -o -b'
let s:copy['*'] = 'xsel --nodetach -i -p'
let s:paste['*'] = 'xsel -o -p'
return 'xsel'
elseif executable('lemonade')
let s:copy['+'] = 'lemonade copy'
let s:paste['+'] = 'lemonade paste'
@ -95,9 +102,9 @@ function! provider#clipboard#Executable() abort
let s:copy['*'] = s:copy['+']
let s:paste['*'] = s:paste['+']
return 'doitclient'
elseif executable('win32yank')
let s:copy['+'] = 'win32yank -i --crlf'
let s:paste['+'] = 'win32yank -o --lf'
elseif executable('win32yank.exe')
let s:copy['+'] = 'win32yank.exe -i --crlf'
let s:paste['+'] = 'win32yank.exe -o --lf'
let s:copy['*'] = s:copy['+']
let s:paste['*'] = s:paste['+']
return 'win32yank'
@ -121,7 +128,9 @@ if empty(provider#clipboard#Executable())
endif
function! s:clipboard.get(reg) abort
if s:selections[a:reg].owner > 0
if type(s:paste[a:reg]) == v:t_func
return s:paste[a:reg]()
elseif s:selections[a:reg].owner > 0
return s:selections[a:reg].data
end
return s:try_cmd(s:paste[a:reg])
@ -135,6 +144,12 @@ function! s:clipboard.set(lines, regtype, reg) abort
end
return 0
end
if type(s:copy[a:reg]) == v:t_func
call s:copy[a:reg](a:lines, a:regtype)
return 0
end
if s:cache_enabled == 0
call s:try_cmd(s:copy[a:reg], a:lines)
return 0

View File

@ -22,6 +22,16 @@ function! s:is_minimum_version(version, min_major, min_minor) abort
\ && str2nr(v_list[1]) >= str2nr(a:min_minor)))
endfunction
let s:NodeHandler = {
\ 'stdout_buffered': v:true,
\ 'result': ''
\ }
function! s:NodeHandler.on_exit(job_id, data, event) abort
let bin_dir = join(get(self, 'stdout', []), '')
let entry_point = bin_dir . self.entry_point
let self.result = filereadable(entry_point) ? entry_point : ''
endfunction
" Support for --inspect-brk requires node 6.12+ or 7.6+ or 8+
" Return 1 if it is supported
" Return 0 otherwise
@ -39,20 +49,51 @@ endfunction
function! provider#node#Detect() abort
if exists('g:node_host_prog')
return g:node_host_prog
endif
let global_modules = get(split(system('npm root -g'), "\n"), 0, '')
if v:shell_error || !isdirectory(global_modules)
return ''
return expand(g:node_host_prog)
endif
if !s:is_minimum_version(v:null, 6, 0)
return ''
endif
let entry_point = glob(global_modules . '/neovim/bin/cli.js')
if !filereadable(entry_point)
return ''
let npm_opts = {}
if executable('npm')
let npm_opts = deepcopy(s:NodeHandler)
let npm_opts.entry_point = '/neovim/bin/cli.js'
let npm_opts.job_id = jobstart('npm --loglevel silent root -g', npm_opts)
endif
return entry_point
let yarn_opts = {}
if executable('yarn')
let yarn_opts = deepcopy(s:NodeHandler)
let yarn_opts.entry_point = '/node_modules/neovim/bin/cli.js'
" `yarn global dir` is slow (> 250ms), try the default path first
" XXX: The following code is not portable
" https://github.com/yarnpkg/yarn/issues/2049#issuecomment-263183768
if has('unix')
let yarn_default_path = $HOME . '/.config/yarn/global/' . yarn_opts.entry_point
if filereadable(yarn_default_path)
return yarn_default_path
endif
endif
let yarn_opts.job_id = jobstart('yarn global dir', yarn_opts)
endif
" npm returns the directory faster, so let's check that first
if !empty(npm_opts)
let result = jobwait([npm_opts.job_id])
if result[0] == 0 && npm_opts.result != ''
return npm_opts.result
endif
endif
if !empty(yarn_opts)
let result = jobwait([yarn_opts.job_id])
if result[0] == 0 && yarn_opts.result != ''
return yarn_opts.result
endif
endif
return ''
endfunction
function! provider#node#Prog() abort

View File

@ -10,7 +10,7 @@ function! provider#pythonx#Require(host) abort
" Python host arguments
let prog = (ver == '2' ? provider#python#Prog() : provider#python3#Prog())
let args = [prog, '-c', 'import sys; sys.path.remove(""); import neovim; neovim.start_host()']
let args = [prog, '-c', 'import sys; sys.path.remove(""); import pynvim; pynvim.start_host()']
" Collect registered Python plugins into args
let python_plugins = remote#host#PluginsForHost(a:host.name)
@ -24,13 +24,13 @@ endfunction
function! provider#pythonx#Detect(major_ver) abort
if a:major_ver == 2
if exists('g:python_host_prog')
return [g:python_host_prog, '']
return [expand(g:python_host_prog), '']
else
let progs = ['python2', 'python2.7', 'python2.6', 'python']
endif
else
if exists('g:python3_host_prog')
return [g:python3_host_prog, '']
return [expand(g:python3_host_prog), '']
else
let progs = ['python3', 'python3.7', 'python3.6', 'python3.5',
\ 'python3.4', 'python3.3', 'python']
@ -40,7 +40,7 @@ function! provider#pythonx#Detect(major_ver) abort
let errors = []
for prog in progs
let [result, err] = s:check_interpreter(prog, a:major_ver)
let [result, err] = provider#pythonx#CheckForModule(prog, 'pynvim', a:major_ver)
if result
return [prog, err]
endif
@ -54,46 +54,53 @@ function! provider#pythonx#Detect(major_ver) abort
\ . ":\n" . join(errors, "\n")]
endfunction
function! s:check_interpreter(prog, major_ver) abort
" Returns array: [prog_exitcode, prog_version]
function! s:import_module(prog, module) abort
let prog_version = system([a:prog, '-c' , printf(
\ 'import sys; ' .
\ 'sys.path.remove(""); ' .
\ 'sys.stdout.write(str(sys.version_info[0]) + "." + str(sys.version_info[1])); ' .
\ 'import pkgutil; ' .
\ 'exit(2*int(pkgutil.get_loader("%s") is None))',
\ a:module)])
return [v:shell_error, prog_version]
endfunction
" Returns array: [was_success, error_message]
function! provider#pythonx#CheckForModule(prog, module, major_version) abort
let prog_path = exepath(a:prog)
if prog_path ==# ''
return [0, a:prog . ' not found in search path or not executable.']
endif
let min_version = (a:major_ver == 2) ? '2.6' : '3.3'
let min_version = (a:major_version == 2) ? '2.6' : '3.3'
" Try to load neovim module, and output Python version.
" Return codes:
" 0 Neovim module can be loaded.
" 2 Neovim module cannot be loaded.
" Try to load pynvim module, and output Python version.
" Exit codes:
" 0 pynvim module can be loaded.
" 2 pynvim module cannot be loaded.
" Otherwise something else went wrong (e.g. 1 or 127).
let prog_ver = system([ a:prog , '-c' ,
\ 'import sys; ' .
\ 'sys.path.remove(""); ' .
\ 'sys.stdout.write(str(sys.version_info[0]) + "." + str(sys.version_info[1])); ' .
\ 'import pkgutil; ' .
\ 'exit(2*int(pkgutil.get_loader("neovim") is None))'
\ ])
let [prog_exitcode, prog_version] = s:import_module(a:prog, 'pynvim')
if v:shell_error == 2 || v:shell_error == 0
if prog_exitcode == 2 || prog_exitcode == 0
" Check version only for expected return codes.
if prog_ver !~ '^' . a:major_ver
return [0, prog_path . ' is Python ' . prog_ver . ' and cannot provide Python '
\ . a:major_ver . '.']
elseif prog_ver =~ '^' . a:major_ver && prog_ver < min_version
return [0, prog_path . ' is Python ' . prog_ver . ' and cannot provide Python >= '
if prog_version !~ '^' . a:major_version
return [0, prog_path . ' is Python ' . prog_version . ' and cannot provide Python '
\ . a:major_version . '.']
elseif prog_version =~ '^' . a:major_version && prog_version < min_version
return [0, prog_path . ' is Python ' . prog_version . ' and cannot provide Python >= '
\ . min_version . '.']
endif
endif
if v:shell_error == 2
return [0, prog_path.' does not have the "neovim" module. :help provider-python']
elseif v:shell_error == 127
if prog_exitcode == 2
return [0, prog_path.' does not have the "pynvim" module. :help provider-python']
elseif prog_exitcode == 127
" This can happen with pyenv's shims.
return [0, prog_path . ' does not exist: ' . prog_ver]
elseif v:shell_error
return [0, prog_path . ' does not exist: ' . prog_version]
elseif prog_exitcode
return [0, 'Checking ' . prog_path . ' caused an unknown error. '
\ . '(' . v:shell_error . ', output: ' . prog_ver . ')'
\ . '(' . prog_exitcode . ', output: ' . prog_version . ')'
\ . ' Report this at https://github.com/neovim/neovim']
endif

View File

@ -5,11 +5,7 @@ endif
let g:loaded_ruby_provider = 1
function! provider#ruby#Detect() abort
if exists("g:ruby_host_prog")
return g:ruby_host_prog
else
return has('win32') ? exepath('neovim-ruby-host.bat') : exepath('neovim-ruby-host')
end
return s:prog
endfunction
function! provider#ruby#Prog() abort
@ -47,8 +43,24 @@ function! provider#ruby#Call(method, args) abort
return call('rpcrequest', insert(insert(a:args, 'ruby_'.a:method), s:host))
endfunction
function! s:detect()
if exists("g:ruby_host_prog")
return expand(g:ruby_host_prog)
elseif has('win32')
return exepath('neovim-ruby-host.bat')
else
let p = exepath('neovim-ruby-host')
if empty(p)
return ''
endif
" neovim-ruby-host could be an rbenv shim for another Ruby version.
call system(p)
return v:shell_error ? '' : p
end
endfunction
let s:err = ''
let s:prog = provider#ruby#Detect()
let s:prog = s:detect()
let s:plugin_path = expand('<sfile>:p:h') . '/script_host.rb'
if empty(s:prog)

View File

@ -114,7 +114,7 @@ function! s:RegistrationCommands(host) abort
let host_id = a:host.'-registration-clone'
call remote#host#RegisterClone(host_id, a:host)
let pattern = s:plugin_patterns[a:host]
let paths = globpath(&rtp, 'rplugin/'.a:host.'/'.pattern, 0, 1)
let paths = globpath(&rtp, 'rplugin/'.a:host.'/'.pattern, 1, 1)
let paths = map(paths, 'tr(resolve(v:val),"\\","/")') " Normalize slashes #4795
let paths = uniq(sort(paths))
if empty(paths)

View File

@ -20,6 +20,7 @@ function! spellfile#LoadFile(lang)
endif
return
endif
let lang = tolower(a:lang)
" If the URL changes we try all files again.
if s:spellfile_URL != g:spellfile_URL
@ -28,13 +29,13 @@ function! spellfile#LoadFile(lang)
endif
" I will say this only once!
if has_key(s:donedict, a:lang . &enc)
if has_key(s:donedict, lang . &enc)
if &verbose
echomsg 'spellfile#LoadFile(): Tried this language/encoding before.'
endif
return
endif
let s:donedict[a:lang . &enc] = 1
let s:donedict[lang . &enc] = 1
" Find spell directories we can write in.
let [dirlist, dirchoices] = spellfile#GetDirChoices()
@ -94,7 +95,7 @@ function! spellfile#LoadFile(lang)
let newbufnr = winbufnr(0)
endif
let fname = a:lang . '.ascii.spl'
let fname = lang . '.ascii.spl'
echo 'Could not find it, trying ' . fname . '...'
call spellfile#Nread(fname)
if getline(2) !~ 'VIMspell'

View File

@ -152,10 +152,12 @@ fun! tar#Browse(tarfile)
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
endif
let curlast= line("$")
if tarfile =~# '\.\(gz\|tgz\)$'
let gzip_command = s:get_gzip_command(tarfile)
" call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
exe "sil! r! " . gzip_command . " -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.lrp'
" call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
@ -287,12 +289,14 @@ fun! tar#Read(fname,mode)
else
let tar_secure= " "
endif
if tarfile =~# '\.bz2$'
" call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.\(gz\|tgz\)$'
let gzip_command = s:get_gzip_command(tarfile)
" call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.shellescape(fname,1))
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! " . gzip_command . " -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.lrp$'
" call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
@ -389,6 +393,8 @@ fun! tar#Write(fname)
let tarfile = substitute(b:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(b:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
let gzip_command = s:get_gzip_command(tarfile)
" handle compressed archives
if tarfile =~# '\.bz2'
call system("bzip2 -d -- ".shellescape(tarfile,0))
@ -396,12 +402,12 @@ fun! tar#Write(fname)
let compress= "bzip2 -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.gz'
call system("gzip -d -- ".shellescape(tarfile,0))
call system(gzip_command . " -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.gz','','e')
let compress= "gzip -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.tgz'
call system("gzip -d -- ".shellescape(tarfile,0))
call system(gzip_command . " -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.tgz','.tar','e')
let compress= "gzip -- ".shellescape(tarfile,0)
let tgz = 1
@ -581,7 +587,10 @@ fun! tar#Vimuntar(...)
" if necessary, decompress the tarball; then, extract it
if tartail =~ '\.tgz'
if executable("gunzip")
let gzip_command = s:get_gzip_command(tarfile)
if executable(gzip_command)
silent exe "!" . gzip_command . " -d ".shellescape(tartail)
elseif executable("gunzip")
silent exe "!gunzip ".shellescape(tartail)
elseif executable("gzip")
silent exe "!gzip -d ".shellescape(tartail)
@ -619,6 +628,28 @@ fun! tar#Vimuntar(...)
" call Dret("tar#Vimuntar")
endfun
func s:get_gzip_command(file)
" Try using the "file" command to get the actual compression type, since
" there is no standard way for the naming: ".tgz", ".tbz", ".txz", etc.
" If the "file" command doesn't work fall back to just using the file name.
if a:file =~# 'z$'
let filetype = system('file ' . a:file)
if filetype =~ 'bzip2 compressed' && executable('bzip2')
return 'bzip2'
endif
if filetype =~ 'XZ compressed' && executable('xz')
return 'xz'
endif
endif
if a:file =~# 'bz2$'
return 'bzip2'
endif
if a:file =~# 'xz$'
return 'xz'
endif
return 'gzip'
endfunc
" =====================================================================
" Modelines And Restoration: {{{1
let &cpo= s:keepcpo

View File

@ -77,15 +77,6 @@ function! tutor#TutorFolds()
endif
endfunction
function! tutor#InfoText()
let l:info_parts = []
if exists('b:tutor_infofunc')
call add(l:info_parts, eval(b:tutor_infofunc.'()'))
endif
return join(l:info_parts, " ")
endfunction
" Marks: {{{1
function! tutor#ApplyMarks()

View File

@ -0,0 +1,111 @@
" Vim plugin for formatting XML
" Last Change: Thu, 22 May 2018 21:26:55 +0100
" Version: 0.1
" Author: Christian Brabandt <cb@256bit.org>
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" License: VIM License
" Documentation: see :h xmlformat.txt (TODO!)
" ---------------------------------------------------------------------
" Load Once: {{{1
if exists("g:loaded_xmlformat") || &cp
finish
endif
let g:loaded_xmlformat = 1
let s:keepcpo = &cpo
set cpo&vim
" Main function: Format the input {{{1
func! xmlformat#Format()
" only allow reformatting through the gq command
" (e.g. Vim is in normal mode)
if mode() != 'n'
" do not fall back to internal formatting
return 0
endif
let sw = shiftwidth()
let prev = prevnonblank(v:lnum-1)
let s:indent = indent(prev)/sw
let result = []
let lastitem = prev ? getline(prev) : ''
let is_xml_decl = 0
" split on `<`, but don't split on very first opening <
for item in split(join(getline(v:lnum, (v:lnum + v:count - 1))), '.\@<=[>]\zs')
if s:EndTag(item)
let s:indent = s:DecreaseIndent()
call add(result, s:Indent(item))
elseif s:EmptyTag(lastitem)
call add(result, s:Indent(item))
elseif s:StartTag(lastitem) && s:IsTag(item)
let s:indent += 1
call add(result, s:Indent(item))
else
if !s:IsTag(item)
" Simply split on '<'
let t=split(item, '.<\@=\zs')
let s:indent+=1
call add(result, s:Indent(t[0]))
let s:indent = s:DecreaseIndent()
call add(result, s:Indent(t[1]))
else
call add(result, s:Indent(item))
endif
endif
let lastitem = item
endfor
if !empty(result)
exe v:lnum. ",". (v:lnum + v:count - 1). 'd'
call append(v:lnum - 1, result)
" Might need to remove the last line, if it became empty because of the
" append() call
let last = v:lnum + len(result)
if getline(last) is ''
exe last. 'd'
endif
endif
" do not run internal formatter!
return 0
endfunc
" Check if given tag is XML Declaration header {{{1
func! s:IsXMLDecl(tag)
return a:tag =~? '^\s*<?xml\s\?\%(version="[^"]*"\)\?\s\?\%(encoding="[^"]*"\)\? ?>\s*$'
endfunc
" Return tag indented by current level {{{1
func! s:Indent(item)
return repeat(' ', shiftwidth()*s:indent). s:Trim(a:item)
endfu
" Return item trimmed from leading whitespace {{{1
func! s:Trim(item)
if exists('*trim')
return trim(a:item)
else
return matchstr(a:item, '\S\+.*')
endif
endfunc
" Check if tag is a new opening tag <tag> {{{1
func! s:StartTag(tag)
return a:tag =~? '^\s*<[^/?]'
endfunc
" Remove one level of indentation {{{1
func! s:DecreaseIndent()
return (s:indent > 0 ? s:indent - 1 : 0)
endfunc
" Check if tag is a closing tag </tag> {{{1
func! s:EndTag(tag)
return a:tag =~? '^\s*</'
endfunc
" Check that the tag is actually a tag and not {{{1
" something like "foobar</foobar>"
func! s:IsTag(tag)
return s:Trim(a:tag)[0] == '<'
endfunc
" Check if tag is empty <tag/> {{{1
func! s:EmptyTag(tag)
return a:tag =~ '/>\s*$'
endfunc
" Restoration And Modelines: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" Modeline {{{1
" vim: fdm=marker fdl=0 ts=2 et sw=0 sts=-1

View File

@ -42,7 +42,16 @@ this autocmd might be useful:
Replace "blue_sky" with the name of the colorscheme.
In case you want to tweak a colorscheme after it was loaded, check out the
ColorScheme autocmd event.
ColorScheme autocommand event.
To clean up just before loading another colorscheme, use the ColorSchemePre
autocommand event. For example:
let g:term_ansi_colors = ...
augroup MyColorscheme
au!
au ColorSchemePre * unlet g:term_ansi_colors
au ColorSchemePre * au! MyColorscheme
augroup END
To customize a colorscheme use another name, e.g. "~/.vim/colors/mine.vim",
and use `:runtime` to load the original colorscheme:
@ -64,6 +73,7 @@ Search for "highlight_init".
If you think you have a color scheme that is good enough to be used by others,
please check the following items:
- Source the $VIMRUNTIME/tools/check_colors.vim script to check for common mistakes.
- Does it work in a color terminal as well as in the GUI?
- Is "g:colors_name" set to a meaningful value? In case of doubt you can do
it this way:

View File

@ -0,0 +1,37 @@
" Vim compiler file
" Compiler: Haskell Stack
" Maintainer: Daniel Campoverde <alx@sillybytes.net>
" Latest Revision: 2018-08-27
if exists("current_compiler")
finish
endif
let current_compiler = "stack"
let s:cpo_save = &cpo
set cpo&vim
CompilerSet errorformat=
\%-G%.%#:\ build\ %.%#,
\%-G%.%#:\ configure\ %.%#,
\%-G[%.%#]%.%#,
\%-G%.%#preprocessing\ %.%#,
\%-G%.%#configuring\ %.%#,
\%-G%.%#building\ %.%#,
\%-G%.%#linking\ %.%#,
\%-G%.%#installing\ %.%#,
\%-G%.%#registering\ %.%#,
\%-G%.%#:\ copy/register%.%#,
\%-G%.%#process\ exited\ %.%#,
\%-G%.%#--builddir=%.%#,
\%-G--%.%#,
\%-G%.%#\|%.%#,
\%E%f:%l:%c:\ error:,%+Z\ \ \ \ %m,
\%E%f:%l:%c:\ error:\ %m,%-Z,
\%W%f:%l:%c:\ warning:,%+Z\ \ \ \ %m,
\%W%f:%l:%c:\ warning:\ %m,%-Z,
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -13,7 +13,7 @@ HTMLS = $(DOCS:.txt=.html)
.SUFFIXES: .c .o .txt .html
# Awk version of .txt to .html conversion.
html: noerrors $(HTMLS)
html: noerrors vimindex.html $(HTMLS)
@if test -f errors.log; then cat errors.log; fi
noerrors:

File diff suppressed because it is too large Load Diff

View File

@ -313,4 +313,4 @@ There is one known minor bug,
No other bugs are known to exist.
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -4,7 +4,7 @@
VIM REFERENCE MANUAL by Bram Moolenaar
Automatic commands *autocommand*
Automatic commands *autocmd* *autocommand*
For a basic explanation, see section |40.3| in the user manual.
@ -20,7 +20,7 @@ files matching *.c. You can also use autocommands to implement advanced
features, such as editing compressed files (see |gzip-example|). The usual
place to put autocommands is in your vimrc file.
*E203* *E204* *E143* *E855* *E937*
*E203* *E204* *E143* *E855* *E937* *E952*
WARNING: Using autocommands is very powerful, and may lead to unexpected side
effects. Be careful not to destroy your text.
- It's a good idea to do some testing on an expendable copy of a file first.
@ -44,6 +44,8 @@ effects. Be careful not to destroy your text.
Add {cmd} to the list of commands that Vim will
execute automatically on {event} for a file matching
{pat} |autocmd-patterns|.
Note: A quote character is seen as argument to the
:autocmd and won't start a comment.
Vim always adds the {cmd} after existing autocommands,
so that the autocommands execute in the order in which
they were given. See |autocmd-nested| for [nested].
@ -79,7 +81,8 @@ will appear twice. To avoid this, define your autocommands in a group, so
that you can easily clear them: >
augroup vimrc
autocmd! " Remove all vimrc autocommands
" Remove all vimrc autocommands
autocmd!
au BufNewFile,BufRead *.html so <sfile>:h/html.vim
augroup END
@ -133,6 +136,8 @@ prompt. When one command outputs two messages this can happen anyway.
plugins, syntax highlighting, etc.
:au[tocmd]! [group] Remove ALL autocommands.
Note: a quote will be seen as argument to the :autocmd
and won't start a comment.
Warning: You should normally not do this without a
group, it breaks plugins, syntax highlighting, etc.
@ -273,14 +278,16 @@ Name triggered by ~
|VimEnter| after doing all the startup stuff
|GUIEnter| after starting the GUI successfully
|GUIFailed| after starting the GUI failed
|TermResponse| after the terminal response to |t_RV| is received
|QuitPre| when using `:quit`, before deciding whether to quit
|TermResponse| after the terminal response to t_RV is received
|QuitPre| when using `:quit`, before deciding whether to exit
|ExitPre| when using a command that may make Vim exit
|VimLeavePre| before exiting Nvim, before writing the shada file
|VimLeave| before exiting Nvim, after writing the shada file
|VimResume| after Nvim is resumed
|VimSuspend| before Nvim is suspended
Various
|DiffUpdated| after diffs have been updated
|DirChanged| after the |current-directory| was changed
|FileChangedShell| Vim notices that a file changed since editing started
@ -297,8 +304,8 @@ Name triggered by ~
|SourceCmd| before sourcing a Vim script |Cmd-event|
|VimResized| after the Vim window size changed
|FocusGained| Vim got input focus
|FocusLost| Vim lost input focus
|FocusGained| Nvim got focus
|FocusLost| Nvim lost focus
|CursorHold| the user doesn't press a key for a while
|CursorHoldI| the user doesn't press a key for a while in Insert mode
|CursorMoved| the cursor was moved in Normal mode
@ -312,6 +319,7 @@ Name triggered by ~
|TabNew| when creating a new tab page
|TabNewEntered| after entering a new tab page
|TabClosed| after closing a tab page
|CmdlineChanged| after a change was made to the command-line text
|CmdlineEnter| after entering cmdline mode
|CmdlineLeave| before leaving cmdline mode
|CmdwinEnter| after entering the command-line window
@ -331,6 +339,7 @@ Name triggered by ~
|TextChangedP| after a change was made to the text in Insert mode
when popup menu visible
|ColorSchemePre| before loading a color scheme
|ColorScheme| after loading a color scheme
|RemoteReply| a reply from a server Vim was received
@ -494,14 +503,14 @@ ChanInfo State of channel changed, for instance the
client of a RPC channel described itself.
Sets these |v:event| keys:
info
See |nvim_get_chan_info| for the format of the
info Dictionary.
See |nvim_get_chan_info()| for the format of
the info Dictionary.
*ChanOpen*
ChanOpen Just after a channel was opened.
Sets these |v:event| keys:
info
See |nvim_get_chan_info| for the format of the
info Dictionary.
See |nvim_get_chan_info()| for the format of
the info Dictionary.
*CmdUndefined*
CmdUndefined When a user command is used but it isn't
defined. Useful for defining a command only
@ -512,21 +521,24 @@ CmdUndefined When a user command is used but it isn't
command is defined. An alternative is to
always define the user command and have it
invoke an autoloaded function. See |autoload|.
*CmdlineChanged*
CmdlineChanged After a change was made to the text inside
command line. Be careful not to mess up the
command line, it may cause Vim to lock up.
<afile> is set to the |cmdline-char|.
*CmdlineEnter*
CmdlineEnter After moving the cursor to the command line,
where the user can type a command or search
string.
<afile> is set to a single character,
indicating the type of command-line.
|cmdline-char|
CmdlineEnter After entering the command-line (including
non-interactive use of ":" in a mapping: use
|<Cmd>| instead to avoid this).
<afile> is set to the |cmdline-char|.
Sets these |v:event| keys:
cmdlevel
cmdtype
*CmdlineLeave*
CmdlineLeave Before leaving the command line.
<afile> is set to a single character,
indicating the type of command-line.
|cmdline-char|
CmdlineLeave Before leaving the command-line (including
non-interactive use of ":" in a mapping: use
|<Cmd>| instead to avoid this).
<afile> is set to the |cmdline-char|.
Sets these |v:event| keys:
abort (mutable)
cmdlevel
@ -558,6 +570,10 @@ ColorScheme After loading a color scheme. |:colorscheme|
set, and <amatch> for the new colorscheme
name.
*ColorSchemePre*
ColorSchemePre Before loading a color scheme. |:colorscheme|
Useful to setup removing things added by a
color scheme, before another one is loaded.
*CompleteDone*
CompleteDone After Insert mode completion is done. Either
@ -613,6 +629,11 @@ CursorMoved After the cursor was moved in Normal or Visual
CursorMovedI After the cursor was moved in Insert mode.
Not triggered when the popup menu is visible.
Otherwise the same as CursorMoved.
*DiffUpdated*
DiffUpdated After diffs have been updated. Depending on
what kind of diff is being used (internal or
external) this can be triggered on every
change or when doing |:diffupdate|.
*DirChanged*
DirChanged After the |current-directory| was changed.
Sets these |v:event| keys:
@ -646,6 +667,14 @@ FileChangedRO Before making the first change to a read-only
*E881*
If the number of lines changes saving for undo
may fail and the change will be aborted.
*ExitPre*
ExitPre When using `:quit`, `:wq` in a way it makes
Vim exit, or using `:qall`, just after
|QuitPre|. Can be used to close any
non-essential window. Exiting may still be
cancelled if there is a modified buffer that
isn't automatically saved, use |VimLeavePre|
for really exiting.
*FileChangedShell*
FileChangedShell When Vim notices that the modification time of
a file has changed since editing started.
@ -735,14 +764,10 @@ FilterWritePre Before writing a file for a filter command or
filter command.
Not triggered when 'shelltemp' is off.
*FocusGained*
FocusGained When Vim got input focus. Only for the GUI
version and a few console versions where this
can be detected.
FocusGained Nvim got focus.
*FocusLost*
FocusLost When Vim lost input focus. Only for the GUI
version and a few console versions where this
can be detected. May also happen when a
dialog pops up.
FocusLost Nvim lost focus. Also (potentially) when
a GUI dialog pops up.
*FuncUndefined*
FuncUndefined When a user function is used but it isn't
defined. Useful for defining a function only
@ -836,6 +861,9 @@ OptionSet After setting an option. The pattern is
plugin. You can always use `:noa` to prevent
triggering this autocommand.
When using |:set| in the autocommand the event
is not triggered again.
*QuickFixCmdPre*
QuickFixCmdPre Before a quickfix command is run (|:make|,
|:lmake|, |:grep|, |:lgrep|, |:grepadd|,
@ -866,6 +894,7 @@ QuitPre When using `:quit`, `:wq` or `:qall`, before
or quits Vim. Can be used to close any
non-essential window if the current window is
the last ordinary window.
Also see |ExitPre|.
*RemoteReply*
RemoteReply When a reply from a Vim that functions as
server was received |server2client()|. The
@ -933,6 +962,7 @@ SwapExists Detected an existing swap file when starting
It is not allowed to change to another buffer,
change a buffer name or change directory
here.
{only available with the +eval feature}
*Syntax*
Syntax When the 'syntax' option has been set. The
pattern is matched against the syntax name.
@ -963,7 +993,7 @@ TermClose When a |terminal| job ends.
TermOpen When a |terminal| job is starting. Can be
used to configure the terminal buffer.
*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|
can be used to do things depending on the
terminal version. Note that this event may be
@ -993,6 +1023,10 @@ TextChangedP After a change was made to the text in the
User Never executed automatically. To be used for
autocommands that are only executed with
":doautocmd".
Note that when `:doautocmd User MyEvent` is
used while there are no matching autocommands,
you will get an error. If you don't want
that, define a dummy autocommand yourself.
*UserGettingBored*
UserGettingBored When the user presses the same key 42 times.
Just kidding! :-)
@ -1041,9 +1075,10 @@ WinEnter After entering another window. Not done for
If the window is for another buffer, Vim
executes the BufEnter autocommands after the
WinEnter autocommands.
Note: When using ":split fname" the WinEnter
event is triggered after the split but before
the file "fname" is loaded.
Note: For split and tabpage commands the
WinEnter event is triggered after the split
or tab command but before the file is loaded.
*WinLeave*
WinLeave Before leaving a window. If the window to be
entered next is for a different buffer, Vim
@ -1353,7 +1388,7 @@ Careful: '[ and '] change when using commands that change the buffer.
In commands which expect a file name, you can use "<afile>" for the file name
that is being read |:<afile>| (you can also use "%" for the current file
name). "<abuf>" can be used for the buffer number of the currently effective
buffer. This also works for buffers that doesn't have a name. But it doesn't
buffer. This also works for buffers that don't have a name. But it doesn't
work for files without a buffer (e.g., with ":r file").
*gzip-example*

View File

@ -99,7 +99,7 @@ is an error when 'cpoptions' includes the 'E' flag.
J Join [count] lines, with a minimum of two lines.
Remove the indent and insert up to two spaces (see
below). Fails when on the last line of the buffer.
If [count] is too big it is reduce to the number of
If [count] is too big it is reduced to the number of
lines available.
*v_J*
@ -416,7 +416,7 @@ This depends on the 'nrformats' option:
For decimals a leading negative sign is considered for incrementing or
decrementing, for binary, octal and hex values, it won't be considered. To
ignore the sign Visually select the number before using CTRL-A or CTRL-X.
ignore the sign Visually select the number before using CTRL-A or CTRL-X.
For numbers with leading zeros (including all octal and hexadecimal numbers),
Vim preserves the number of characters in the number when possible. CTRL-A on
@ -501,6 +501,7 @@ If the 'shiftround' option is on, the indent is rounded to a multiple of
If the 'smartindent' option is on, or 'cindent' is on and 'cinkeys' contains
'#' with a zero value, shift right does not affect lines starting with '#'
(these are supposed to be C preprocessor lines that must stay in column 1).
This can be changed with the 'cino' option, see |cino-#|.
When the 'expandtab' option is off (this is the default) Vim uses <Tab>s as
much as possible to make the indent. You can use ">><<" to replace an indent
@ -666,6 +667,7 @@ The flags that you can use for the substitute commands:
CTRL-E to scroll the screen up
CTRL-Y to scroll the screen down
*:s_e*
[e] When the search pattern fails, do not issue an error message and, in
particular, continue in maps as if no error occurred. This is most
useful to prevent the "No match" error from breaking a mapping. Vim
@ -676,29 +678,34 @@ The flags that you can use for the substitute commands:
Trailing characters
Interrupted
*:s_g*
[g] Replace all occurrences in the line. Without this argument,
replacement occurs only for the first occurrence in each line. If the
'gdefault' option is on, this flag is on by default and the [g]
argument switches it off.
*:s_i*
[i] Ignore case for the pattern. The 'ignorecase' and 'smartcase' options
are not used.
*:s_I*
[I] Don't ignore case for the pattern. The 'ignorecase' and 'smartcase'
options are not used.
*:s_n*
[n] Report the number of matches, do not actually substitute. The [c]
flag is ignored. The matches are reported as if 'report' is zero.
Useful to |count-items|.
If \= |sub-replace-expression| is used, the expression will be
evaluated in the |sandbox| at every match.
[p] Print the line containing the last substitute.
[p] Print the line containing the last substitute. *:s_p*
[#] Like [p] and prepend the line number.
[#] Like [p] and prepend the line number. *:s_#*
[l] Like [p] but print the text like |:list|.
[l] Like [p] but print the text like |:list|. *:s_l*
*:s_r*
[r] Only useful in combination with `:&` or `:s` without arguments. `:&r`
works the same way as `:~`: When the search pattern is empty, use the
previously used search pattern instead of the search pattern from the
@ -1135,7 +1142,7 @@ There are ten types of registers: *registers* *E354*
5. three read-only registers ":, "., "%
6. alternate buffer register "#
7. the expression register "=
8. The selection and drop registers "*, "+ and "~
8. The selection registers "* and "+
9. The black hole register "_
10. Last search pattern register "/
@ -1236,7 +1243,7 @@ If the "= register is used for the "p" command, the String is split up at <NL>
characters. If the String ends in a <NL>, it is regarded as a linewise
register.
8. Selection and drop registers "*, "+ and "~
8. Selection registers "* and "+
Use these registers for storing and retrieving the selected text for the GUI.
See |quotestar| and |quoteplus|. When the clipboard is not available or not
working, the unnamed register is used instead. For Unix systems and Mac OS X,
@ -1371,6 +1378,55 @@ to the name of an external program for Vim to use for text formatting. The
'textwidth' and other options have no effect on formatting by an external
program.
*format-formatexpr*
The 'formatexpr' option can be set to a Vim script function that performs
reformatting of the buffer. This should usually happen in an |ftplugin|,
since formatting is highly dependent on the type of file. It makes
sense to use an |autoload| script, so the corresponding script is only loaded
when actually needed and the script should be called <filetype>format.vim.
For example, the XML filetype plugin distributed with Vim in the $VIMRUNTIME
directory, sets the 'formatexpr' option to: >
setlocal formatexpr=xmlformat#Format()
That means, you will find the corresponding script, defining the
xmlformat#Format() function, in the directory:
`$VIMRUNTIME/autoload/xmlformat.vim`
Here is an example script that removes trailing whitespace from the selected
text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: >
func! format#Format()
" only reformat on explicit gq command
if mode() != 'n'
" fall back to Vims internal reformatting
return 1
endif
let lines = getline(v:lnum, v:lnum + v:count - 1)
call map(lines, {key, val -> substitute(val, '\s\+$', '', 'g')})
call setline('.', lines)
" do not run internal formatter!
return 0
endfunc
You can then enable the formatting by executing: >
setlocal formatexpr=format#Format()
Note: this function explicitly returns non-zero when called from insert mode
(which basically means, text is inserted beyond the 'textwidth' limit). This
causes Vim to fall back to reformat the text by using the internal formatter.
However, if the |gq| command is used to reformat the text, the function
will receive the selected lines, trim trailing whitespace from those lines and
put them back in place. If you are going to split single lines into multiple
lines, be careful not to overwrite anything.
If you want to allow reformatting of text from insert or replace mode, one has
to be very careful, because the function might be called recursively. For
debugging it helps to set the 'debug' option.
*right-justify*
There is no command in Vim to right justify text. You can do it with
an external command, like "par" (e.g.: "!}par" to format until the end of the
@ -1753,4 +1809,4 @@ The sorting can be interrupted, but if you interrupt it too late in the
process you may end up with duplicated lines. This also depends on the system
library function used.
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -32,8 +32,13 @@ Channels support multiple modes or protocols. In the most basic
mode of operation, raw bytes are read and written to the channel.
The |rpc| protocol, based on the msgpack-rpc standard, enables nvim and the
process at the other end to send remote calls and events to each other.
Additionally, the builtin |terminal-emulator|, is implemented on top of PTY
channels.
The builtin |terminal-emulator| is also implemented on top of PTY channels.
Channel Id *channel-id*
Each channel is identified by an integer id, unique for the life of the
current Nvim session. Functions like |stdioopen()| return channel ids;
functions like |chansend()| consume channel ids.
==============================================================================
2. Reading and writing raw bytes *channel-bytes*
@ -64,8 +69,8 @@ be raised.
- The arguments passed to the callback function are:
0: The channel id
1: the raw data read from the channel, formatted as a |readfile()|-style
0: |channel-id|
1: Raw data read from the channel, formatted as a |readfile()|-style
list. If EOF occured, a single empty string `['']` will be passed in.
Note that the items in this list do not directly correspond to actual
lines in the output. See |channel-lines|
@ -150,9 +155,8 @@ Nvim uses stdin/stdout to interact with the user over the terminal interface
(TUI). If Nvim is |--headless| the TUI is not started and stdin/stdout can be
used as a channel. See also |--embed|.
Call |stdioopen()| during |startup| to open the stdio channel as channel-id 1.
Nvim's stderr is always available as channel-id 2 (|v:stderr| to be explicit),
a write-only bytes channel.
Call |stdioopen()| during |startup| to open the stdio channel as |channel-id| 1.
Nvim's stderr is always available as |v:stderr|, a write-only bytes channel.
Example: >
func! OnEvent(id, data, event)

View File

@ -4,8 +4,8 @@
VIM REFERENCE MANUAL by Bram Moolenaar
*Cmdline-mode* *Command-line-mode*
Command-line mode *Cmdline* *Command-line* *mode-cmdline* *:*
*Cmdline-mode* *Command-line-mode* *Cmdline*
Command-line mode *cmdline* *Command-line* *mode-cmdline* *:*
Command-line mode is used to enter Ex commands (":"), search patterns
("/" and "?"), and filter commands ("!").
@ -163,12 +163,14 @@ CTRL-R CTRL-F *c_CTRL-R_CTRL-F* *c_<C-R>_<C-F>*
CTRL-R CTRL-P *c_CTRL-R_CTRL-P* *c_<C-R>_<C-P>*
CTRL-R CTRL-W *c_CTRL-R_CTRL-W* *c_<C-R>_<C-W>*
CTRL-R CTRL-A *c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>*
CTRL-R CTRL-L *c_CTRL-R_CTRL-L* *c_<C-R>_<C-L>*
Insert the object under the cursor:
CTRL-F the Filename under the cursor
CTRL-P the Filename under the cursor, expanded with
'path' as in |gf|
CTRL-W the Word under the cursor
CTRL-A the WORD under the cursor; see |WORD|
CTRL-L the line under the cursor
When 'incsearch' is set the cursor position at the end of the
currently displayed match is used. With CTRL-W the part of
@ -176,8 +178,8 @@ CTRL-R CTRL-A *c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>*
*c_CTRL-R_CTRL-R* *c_<C-R>_<C-R>*
*c_CTRL-R_CTRL-O* *c_<C-R>_<C-O>*
CTRL-R CTRL-R {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A}
CTRL-R CTRL-O {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A}
CTRL-R CTRL-R {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A CTRL-L}
CTRL-R CTRL-O {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A CTRL-L}
Insert register or object under the cursor. Works like
|c_CTRL-R| but inserts the text literally. For example, if
register a contains "xy^Hz" (where ^H is a backspace),
@ -210,7 +212,7 @@ CTRL-\ e {expr} *c_CTRL-\_e*
*c_CTRL-Y*
CTRL-Y When there is a modeless selection, copy the selection into
the clipboard. |modeless-selection|
the clipboard.
If there is no selection CTRL-Y is inserted as a character.
CTRL-M or CTRL-J *c_CTRL-M* *c_CTRL-J* *c_<NL>* *c_<CR>* *c_CR*
@ -376,10 +378,13 @@ CTRL-D List names that match the pattern in front of the cursor.
match is inserted. After the last match, the first is used
again (wrap around).
The behavior can be changed with the 'wildmode' option.
*c_<S-Tab>*
<S-Tab> Like 'wildchar' or <Tab>, but begin with the last match and
then go to the previous match.
*c_CTRL-N*
CTRL-N After using 'wildchar' which got multiple matches, go to next
match. Otherwise recall more recent command-line from history.
<S-Tab> *c_CTRL-P* *c_<S-Tab>*
*c_CTRL-P*
CTRL-P After using 'wildchar' which got multiple matches, go to
previous match. Otherwise recall older command-line from
history.
@ -490,8 +495,46 @@ after a command causes the rest of the line to be ignored. This can be used
to add comments. Example: >
:set ai "set 'autoindent' option
It is not possible to add a comment to a shell command ":!cmd" or to the
":map" command and a few others, because they see the '"' as part of their
argument. This is mentioned where the command is explained.
":map" command and a few others (mainly commands that expect expressions)
that see the '"' as part of their argument:
:argdo
:autocmd
:bufdo
:cexpr (and the like)
:call
:cdo (and the like)
:command
:cscope (and the like)
:debug
:display
:echo (and the like)
:elseif
:execute
:folddoopen
:folddoclosed
:for
:grep (and the like)
:help (and the like)
:if
:let
:make
:map (and the like including :abbrev commands)
:menu (and the like)
:mkspell
:normal
:ownsyntax
:popup
:promptfind (and the like)
:registers
:return
:sort
:syntax
:tabdo
:tearoff
:vimgrep (and the like)
:while
:windo
*:bar* *:\bar*
'|' can be used to separate commands, so you can give multiple commands in one
@ -786,6 +829,11 @@ Also see |`=|.
Note: these are typed literally, they are not special keys!
<cword> is replaced with the word under the cursor (like |star|)
<cWORD> is replaced with the WORD under the cursor (see |WORD|)
<cexpr> is replaced with the word under the cursor, including more
to form a C expression. E.g., when the cursor is on "arg"
of "ptr->arg" then the result is "ptr->arg"; when the
cursor is on "]" of "list[idx]" then the result is
"list[idx]". This is used for |v:beval_text|.
<cfile> is replaced with the path name under the cursor (like what
|gf| uses)
<afile> When executing autocommands, is replaced with the file name
@ -834,7 +882,8 @@ These modifiers can be given, in this order:
directory.
:. Reduce file name to be relative to current directory, if
possible. File name is unmodified if it is not below the
current directory.
current directory, but on MS-Windows the drive is removed if
it is the current drive.
For maximum shortness, use ":~:.".
:h Head of the file name (the last component and any separators
removed). Cannot be used with :e, :r or :t.
@ -1098,4 +1147,4 @@ The character used for the pattern indicates the type of command-line:
@ string for |input()|
- text for |:insert| or |:append|
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -162,12 +162,8 @@ In WinDbg: choose Open Crash Dump on the File menu. Follow the instructions in
*get-ms-debuggers*
3.5 Obtaining Microsoft Debugging Tools ~
The Debugging Tools for Windows (including WinDbg) can be downloaded from
http://www.microsoft.com/whdc/devtools/debugging/default.mspx
This includes the WinDbg debugger.
Visual C++ 2005 Express Edition can be downloaded for free from:
http://msdn.microsoft.com/vstudio/express/visualC/default.aspx
Visual Studio 2017 Community Edition can be downloaded for free from:
https://visualstudio.microsoft.com/downloads/
=========================================================================
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -37,15 +37,17 @@ Functions ~
*file_readable()* Obsolete name for |filereadable()|.
*highlight_exists()* Obsolete name for |hlexists()|.
*highlightID()* Obsolete name for |hlID()|.
*inputdialog()* Use |input()| instead.
*jobclose()* Obsolete name for |chanclose()|
*jobsend()* Obsolete name for |chansend()|
*last_buffer_nr()* Obsolete name for bufnr("$").
Modifiers ~
*cpo-<*
*:menu-<special>*
*:menu-special* <> notation is always enabled. |cpo-<|
*:menu-special* <> notation is always enabled.
*:map-<special>*
*:map-special* <> notation is always enabled. |cpo-<|
*:map-special* <> notation is always enabled.
Normal commands ~
*]f*

View File

@ -4,56 +4,37 @@
NVIM REFERENCE MANUAL
Development of Nvim. *development*
Development of Nvim *development*
Nvim is open source software. Everybody is encouraged to contribute.
This reference describes design constraints and guidelines, for developing
Nvim applications or Nvim itself.
Architecture and internal concepts are covered in src/nvim/README.md
Nvim is free and open source. Everybody is encouraged to contribute.
https://github.com/neovim/neovim/blob/master/CONTRIBUTING.md
See src/nvim/README.md for an overview of the source code.
Type |gO| to see the table of contents.
==============================================================================
Design goals *design-goals*
Most important things come first (roughly).
Note that some items conflict; this is intentional. A balance must be found.
Most important things come first (roughly). Some items conflict; this is
intentional. A balance must be found.
NVIM IS... IMPROVED *design-improved*
The IMproved bits of Vim should make it a better Vi, without becoming a
completely different editor. Extensions are done with a "Vi spirit".
- Use the keyboard as much as feasible. The mouse requires a third hand,
which we don't have. Many terminals don't have a mouse.
- When the mouse is used anyway, avoid the need to switch back to the
keyboard. Avoid mixing mouse and keyboard handling.
- Add commands and options in a consistent way. Otherwise people will have a
hard time finding and remembering them. Keep in mind that more commands and
options will be added later.
The Neo bits of Nvim should make it a better Vim, without becoming a
completely different editor.
- In matters of taste, prefer Vim/Unix tradition. If there is no relevant
Vim/Unix tradition, consider the "common case".
- A feature that people do not know about is a useless feature. Don't add
obscure features, or at least add hints in documentation that they exist.
- Minimize using CTRL and other modifiers, they are more difficult to type.
- There are many first-time and inexperienced Vim users. Make it easy for
them to start using Vim and learn more over time.
- There is no limit to the features that can be added. Selecting new features
is based on (1) what users ask for, (2) how much effort it takes to
implement and (3) someone actually implementing it.
NVIM IS... MULTI PLATFORM *design-multi-platform*
Vim tries to help as many users on as many platforms as possible.
- Support many kinds of terminals. The minimal demands are cursor positioning
and clear-screen. Commands should only use key strokes that most keyboards
have. Support all the keys on the keyboard for mapping.
- Support many platforms. A condition is that there is someone willing to do
Vim development on that platform, and it doesn't mean messing up the code.
- Support many compilers and libraries. Not everybody is able or allowed to
install another compiler or GUI library.
- People switch from one platform to another, and from GUI to terminal
version. Features should be present in all versions.
- Backwards compatibility is a feature. The RPC API in particular should
never break.
NVIM IS... WELL DOCUMENTED *design-documented*
@ -90,15 +71,6 @@ NVIM IS... MAINTAINABLE *design-maintain*
knowledge spread to other parts of the code.
NVIM IS... FLEXIBLE *design-flexible*
Vim should make it easy for users to work in their preferred styles rather
than coercing its users into particular patterns of work. This can be for
items with a large impact or for details. The defaults are carefully chosen
such that most users will enjoy using Vim as it is. Commands and options can
be used to adjust Vim to the desire of the user and its environment.
NVIM IS... NOT *design-not*
Nvim is not an operating system; instead it should be composed with other
@ -110,41 +82,6 @@ include the kitchen sink... but it's good for plumbing."
Developer guidelines *dev*
JARGON *dev-jargon*
API client ~
All external UIs and remote plugins (as opposed to regular Vim plugins) are
"clients" in general; but we call something an "API client" if its purpose is
to abstract or wrap the RPC API for the convenience of other applications
(just like a REST client or SDK such as boto3 for AWS: you can speak AWS REST
using an HTTP client like curl, but boto3 wraps that in a convenient python
interface). For example, the Nvim lua-client is an API client:
https://github.com/neovim/lua-client
Host ~
A plugin "host" is both a client (of the Nvim API) and a server (of an
external platform, e.g. python). It is a remote plugin that hosts other
plugins.
Remote plugin ~
Arbitrary code registered via |:UpdateRemotePlugins|, that runs in a separate
process and communicates with Nvim via the |api|.
Window ~
The word "window" is commonly used for several things: A window on the screen,
the xterm window, a window inside Vim to view a buffer.
To avoid confusion, other items that are sometimes called window have been
given another name. Here is an overview of the related items:
screen The whole display.
shell The Vim application. This can cover the whole screen (e.g.,
when running in a console) or part of it (xterm or GUI).
window View on a buffer. There can be several windows in Vim,
together with the command line, menubar, toolbar, etc. they
fit in the shell.
frame Windows are kept in a tree of frames. Each frame contains
a column, row, or window ("leaf" frame).
PROVIDERS *dev-provider*
A goal of Nvim is to allow extension of the editor without special knowledge
@ -200,6 +137,13 @@ DOCUMENTATION *dev-doc*
"the user host terminal".
- Use "tui-" to prefix help tags related to the host terminal, and "TUI"
in prose if possible.
- Docstrings: do not start parameter descriptions with "The" or "A" unless it
is critical to avoid ambiguity.
GOOD: >
/// @param dirname Path fragment before `pend`
< BAD: >
/// @param dirname The path fragment before `pend`
<
API *dev-api*
@ -239,7 +183,16 @@ Example: `nvim_buf_changedtick_event`.
API-CLIENT *dev-api-client*
Standard Features ~
- Clients should call |nvim_set_client_info()| after connecting, so users and
plugins can detect the client by handling the |ChanInfo| event. This
avoids the need for special variables or other client hints.
- Clients should handle |nvim_error_event| notifications, which will be sent
if an async request to nvim was rejected or caused an error.
Package Naming ~
API client packages should NOT be named something ambiguous like "neovim" or
"python-client". Use "nvim" as a prefix/suffix to some other identifier
following ecosystem conventions.
@ -255,33 +208,36 @@ Examples of API-client package names:
BAD: neovim
Implementation ~
Consider using libmpack instead of the msgpack.org C/C++ library. libmpack is
small, efficient, and C89-compatible. It can be easily inlined in your
C project source, too. https://github.com/libmpack/libmpack/
Consider using libmpack instead of the msgpack.org C/C++ library. libmpack is
small (can be inlined into your C/C++ project) and efficient (no allocations).
It also implements msgpack-RPC.
https://github.com/libmpack/libmpack/
EXTERNAL UI *dev-ui*
Compatibility ~
External UIs should be aware of the |api-contract|. In particular, future
versions of Nvim may add new items to existing events. The API is strongly
backwards-compatible, but clients must not break if new fields are added to
existing events.
backwards-compatible, but clients must not break if new (optional) fields are
added to existing events.
Standard Features ~
Common Features ~
External UIs are expected to implement these common features:
- Cursor style (shape, color) should respond to the 'guicursor' properties
- Call |nvim_set_client_info()| after connecting, so users and plugins can
detect the UI by handling the |ChanInfo| event. This avoids the need for
special variables and UI-specific config files (gvimrc, macvimrc, …).
- Cursor style (shape, color) should conform to the 'guicursor' properties
delivered with the mode_info_set UI event.
- Send the ALT/META ("Option" on macOS) key as a |<M-| chord.
- Send the "super" key (Windows key, Apple key) as a |<D-| chord.
- Avoid mappings that conflict with Nvim defaults. GUIs have many new chords
like <C-,> <C-Enter> <C-S-x> <D-x> and patterns like "shift shift", which
don't conflict with typical Nvim mappings.
Implementation ~
- UI-related options ('guifont', 'ambiwidth', …) are published in the
"option_set" |ui-global| event. The event is triggered when the UI first
connects to Nvim and whenever an option is changed by the user or a plugin.
- Avoid mappings that conflict with the Nvim keymap-space; GUIs have many new
chords (<C-,> <C-Enter> <C-S-x> <D-x>) and patterns ("shift shift") that do
not potentially conflict with Nvim defaults, plugins, etc.
- Consider the "option_set" |ui-global| event as a hint for other GUI
behaviors. UI-related options ('guifont', 'ambiwidth', …) are published in
this event.
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -5,7 +5,7 @@
*diff* *diff-mode*
This file describes the |+diff| feature: Showing differences between two to
This file describes the diff feature: Showing differences between two to
eight versions of the same file.
The basics are explained in section |08.7| of the user manual.
@ -27,7 +27,9 @@ The second and following arguments may also be a directory name. Vim will
then append the file name of the first argument to the directory name to find
the file.
This only works when a standard "diff" command is available. See 'diffexpr'.
By default an internal diff library will be used. When 'diffopt' or
'diffexpr' has been set an external "diff" command will be used. This only
works when such a diff program is available.
Diffs are local to the current tab page |tab-page|. You can't see diffs with
a window in another tab page. This does make it possible to have several
@ -332,8 +334,9 @@ between file1 and file2: >
The ">" is replaced with the value of 'shellredir'.
The output of "diff" must be a normal "ed" style diff. Do NOT use a context
diff. This example explains the format that Vim expects: >
The output of "diff" must be a normal "ed" style diff or a unified diff. Do
NOT use a context diff. This example explains the format that Vim expects for
the "ed" style diff: >
1a2
> bbb
@ -372,12 +375,16 @@ Example (this does almost the same as 'diffexpr' being empty): >
endif
silent execute "!diff -a --binary " . opt . v:fname_in . " " . v:fname_new .
\ " > " . v:fname_out
redraw!
endfunction
The "-a" argument is used to force comparing the files as text, comparing as
binaries isn't useful. The "--binary" argument makes the files read in binary
mode, so that a CTRL-Z doesn't end the text on DOS.
The `redraw!` command may not be needed, depending on whether executing a
shell command shows something on the display or not.
*E810* *E97*
Vim will do a test if the diff output looks alright. If it doesn't, you will
get an error message. Possible causes:
@ -429,4 +436,4 @@ evaluating 'patchexpr'. This hopefully avoids that files in the current
directory are accidentally patched. Vim will also delete files starting with
v:fname_in and ending in ".rej" and ".orig".
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -1484,4 +1484,4 @@ char digraph hex dec official name ~
ſt ft FB05 64261 LATIN SMALL LIGATURE LONG S T
st st FB06 64262 LATIN SMALL LIGATURE ST
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -376,6 +376,15 @@ On Unix and a few other systems you can also use backticks for the file name
argument, for example: >
:next `find . -name ver\\*.c -print`
:view `ls -t *.patch \| head -n1`
Vim will run the command in backticks using the 'shell' and use the standard
output as argument for the given Vim command (error messages from the shell
command will be discarded).
To see what shell command Vim is running, set the 'verbose' option to 4. When
the shell command returns a non-zero exit code, an error message will be
displayed and the Vim command will be aborted. To avoid this make the shell
always return zero like so: >
:next `find . -name ver\\*.c -print \|\| true`
The backslashes before the star are required to prevent the shell from
expanding "ver*.c" prior to execution of the find program. The backslash
before the shell pipe symbol "|" prevents Vim from parsing it as command
@ -824,8 +833,8 @@ flag is used for the ":substitute" command to avoid an error for files where
Note: When the 'write' option is off, you are not able to write any file.
*:w* *:write*
*E502* *E503* *E504* *E505*
*E512* *E514* *E667* *E796*
*E502* *E503* *E504* *E505*
*E512* *E514* *E667* *E796* *E949*
:w[rite] [++opt] Write the whole buffer to the current file. This is
the normal way to save changes to a file. It fails
when the 'readonly' option is set or when there is
@ -881,6 +890,9 @@ used, for example, when the write fails and you want to try again later with
":w #". This can be switched off by removing the 'A' flag from the
'cpoptions' option.
Note that the 'fsync' option matters here. If it's set it may make writes
slower (but safer).
*:sav* *:saveas*
:sav[eas][!] [++opt] {file}
Save the current buffer under the name {file} and set
@ -1225,9 +1237,6 @@ working directory, which in turn takes precedence over the global
working directory. If a local working directory (tab or window) does not
exist, the next-higher scope in the hierarchy applies.
Commands for changing the working directory can be suffixed with a bang "!"
(e.g. |:cd!|) which is ignored, for compatibility with Vim.
*:cd* *E747* *E472*
:cd[!] On non-Unix systems: Print the current directory
name. On Unix systems: Change the current directory
@ -1545,4 +1554,4 @@ There are three different types of searching:
currently work with 'path' items that contain a URL or use the double star
with depth limiter (/usr/**2) or upward search (;) notations.
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -921,6 +921,13 @@ These three can be repeated and mixed. Examples:
expr8 *expr8*
-----
This expression is either |expr9| or a sequence of the alternatives below,
in any order. E.g., these are all possible:
expr9[expr1].name
expr9.name[expr1]
expr9(expr1, ...)[expr1].name
expr8[expr1] item of String or |List| *expr-[]* *E111*
*subscript*
@ -1508,8 +1515,7 @@ v:errmsg Last given error message. It's allowed to set this variable.
:silent! next
:if v:errmsg != ""
: ... handle error
< "errmsg" also works, for backwards compatibility.
<
*v:errors* *errors-variable*
v:errors Errors found by assert functions, such as |assert_true()|.
This is a list of strings.
@ -1528,8 +1534,8 @@ v:event Dictionary of event data for the current |autocommand|. Valid
event, e.g. |DirChanged| or |TextYankPost|.
KEY DESCRIPTION ~
abort Whether the event triggered during
an aborting condition, i e |c_Esc| or
|c_CTRL-c|for |CmdlineLeave|.
an aborting condition (e.g. |c_Esc| or
|c_CTRL-C| for |CmdlineLeave|).
cmdlevel Level of cmdline.
cmdtype Type of cmdline, |cmdline-char|.
cwd Current working directory.
@ -1813,17 +1819,16 @@ v:shell_error Result of the last shell command. When non-zero, the last
:if v:shell_error
: echo 'could not rename "foo" to "bar"!'
:endif
< "shell_error" also works, for backwards compatibility.
<
*v:statusmsg* *statusmsg-variable*
v:statusmsg Last given status message. It's allowed to set this variable.
*v:stderr* *stderr-variable*
v:stderr Channel id for stderr. Unlike stdin and stdout (see
|stdioopen()|), stderr is always open for writing. This channel
ID is always 2, but this variable can be used to be explicit.
Example: >
:call chansend(v:stderr, "something bad happened\n")
v:stderr |channel-id| corresponding to stderr. The value is always 2;
use this variable to make your code more descriptive.
Unlike stdin and stdout (see |stdioopen()|), stderr is always
open for writing. Example: >
:call chansend(v:stderr, "error: toaster empty\n")
<
*v:swapname* *swapname-variable*
v:swapname Only valid when executing |SwapExists| autocommands: Name of
@ -1881,14 +1886,11 @@ v:termresponse The escape sequence returned by the terminal for the DA
*v:testing* *testing-variable*
v:testing Must be set before using `test_garbagecollect_now()`.
Also, when set certain error messages won't be shown for 2
seconds. (e.g. "'dictionary' option is empty")
*v:this_session* *this_session-variable*
v:this_session Full filename of the last loaded or saved session file. See
|:mksession|. It is allowed to set this variable. When no
session file has been saved, this variable is empty.
"this_session" also works, for backwards compatibility.
*v:throwpoint* *throwpoint-variable*
v:throwpoint The point where the exception most recently caught and not
@ -2104,6 +2106,7 @@ gettabvar({nr}, {varname} [, {def}])
gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
any {name} in {winnr} in tab page {tabnr}
getwininfo([{winid}]) List list of windows
getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window
getwinposx() Number X coord in pixels of GUI Vim window
getwinposy() Number Y coord in pixels of GUI Vim window
getwinvar({nr}, {varname} [, {def}])
@ -2132,8 +2135,6 @@ index({list}, {expr} [, {start} [, {ic}]])
Number index in {list} where {expr} appears
input({prompt} [, {text} [, {completion}]])
String get input from the user
inputdialog({prompt} [, {text} [, {completion}]])
String like input() but in a GUI dialog
inputlist({textlist}) Number let the user pick from a choice list
inputrestore() Number restore typeahead
inputsave() Number save and clear typeahead
@ -2197,6 +2198,8 @@ msgpackdump({list}) List dump a list of objects to msgpack
msgpackparse({list}) List parse msgpack to a list of objects
nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
nr2char({expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr}
option_restore({list}) none restore options saved by option_save()
option_save({list}) List save options values
nvim_...({args}...) any call nvim |api| functions
or({expr}, {expr}) Number bitwise OR
pathshorten({expr}) String shorten directory names in a path
@ -2222,6 +2225,7 @@ remote_read({serverid} [, {timeout}])
String read reply string
remote_send({server}, {string} [, {idvar}])
String send key sequence
remote_startserver({name}) none become server {name}
remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
remove({dict}, {key}) any remove entry {key} from {dict}
rename({from}, {to}) Number rename (move) file from {from} to {to}
@ -2337,6 +2341,7 @@ tolower({expr}) String the String {expr} switched to lowercase
toupper({expr}) String the String {expr} switched to uppercase
tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
to chars in {tostr}
trim({text} [, {mask}]) String trim characters in {mask} from {text}
trunc({expr}) Float truncate Float {expr}
type({name}) Number type of variable {name}
undofile({name}) String undo file name for {name}
@ -2352,6 +2357,7 @@ win_getid([{win} [, {tab}]]) Number get |window-ID| for {win} in {tab}
win_gotoid({expr}) Number go to |window-ID| {expr}
win_id2tabwin({expr}) List get tab and window nr from |window-ID|
win_id2win({expr}) Number get window nr from |window-ID|
win_screenpos({nr}) List get screen position of window {nr}
winbufnr({nr}) Number buffer number of window {nr}
wincol() Number window column of the cursor
winheight({nr}) Number height of window {nr}
@ -2412,10 +2418,10 @@ and({expr}, {expr}) *and()*
api_info() *api_info()*
Returns Dictionary of |api-metadata|.
append({lnum}, {expr}) *append()*
When {expr} is a |List|: Append each item of the |List| as a
append({lnum}, {text}) *append()*
When {text} is a |List|: Append each item of the |List| as a
text line below line {lnum} in the current buffer.
Otherwise append {expr} as one text line below line {lnum} in
Otherwise append {text} as one text line below line {lnum} in
the current buffer.
{lnum} can be zero to insert a line before the first one.
Returns 1 for failure ({lnum} out of range or out of memory),
@ -2485,7 +2491,7 @@ assert_exception({error} [, {msg}]) *assert_exception()*
call assert_exception('E492:')
endtry
assert_fails({cmd} [, {error}]) *assert_fails()*
assert_fails({cmd} [, {error} [, {msg}]]) *assert_fails()*
Run {cmd} and add an error message to |v:errors| if it does
NOT produce an error.
When {error} is given it must match in |v:errmsg|.
@ -2610,6 +2616,8 @@ bufexists({expr}) *bufexists()*
The result is a Number, which is |TRUE| if a buffer called
{expr} exists.
If the {expr} argument is a number, buffer numbers are used.
Number zero is the alternate buffer for the current window.
If the {expr} argument is a string it must match a buffer name
exactly. The name can be:
- Relative to the current directory.
@ -2771,7 +2779,7 @@ changenr() *changenr()*
redo it is the number of the redone change. After undo it is
one less than the number of the undone change.
chanclose({id}[, {stream}]) {Nvim} *chanclose()*
chanclose({id}[, {stream}]) *chanclose()*
Close a channel or a specific stream associated with it.
For a job, {stream} can be one of "stdin", "stdout",
"stderr" or "rpc" (closes stdin/stdout for a job started
@ -2781,7 +2789,7 @@ chanclose({id}[, {stream}]) {Nvim} *chanclose()*
For a socket, there is only one stream, and {stream} should be
ommited.
chansend({id}, {data}) {Nvim} *chansend()*
chansend({id}, {data}) *chansend()*
Send data to channel {id}. For a job, it writes it to the
stdin of the process. For the stdio channel |channel-stdio|,
it writes to Nvim's stdout. Returns the number of bytes
@ -2913,7 +2921,7 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
made. It returns the number of the choice. For the first
choice this is 1.
{msg} is displayed in a |dialog| with {choices} as the
{msg} is displayed in a dialog with {choices} as the
alternatives. When {choices} is missing or empty, "&OK" is
used (and translated).
{msg} is a String, use '\n' to include a newline. Only on
@ -2991,11 +2999,16 @@ cosh({expr}) *cosh()*
count({comp}, {expr} [, {ic} [, {start}]]) *count()*
Return the number of times an item with value {expr} appears
in |List| or |Dictionary| {comp}.
in |String|, |List| or |Dictionary| {comp}.
If {start} is given then start with the item with this index.
{start} can only be used with a |List|.
When {ic} is given and it's |TRUE| then case is ignored.
When {comp} is a string then the number of not overlapping
occurrences of {expr} is returned. Zero is returned when
{expr} is an empty string.
*cscope_connection()*
cscope_connection([{num} , {dbpath} [, {prepend}]])
@ -3224,12 +3237,12 @@ executable({expr}) *executable()*
On Windows it only checks if the file exists and
is not a directory, not if it's really executable.
On Windows an executable in the same directory as Vim is
always found. Since this directory is added to $PATH it
should also work to execute it |win32-PATH|.
always found (it is added to $PATH at |startup|).
The result is a Number:
1 exists
0 does not exist
-1 not implemented on this system
|exepath()| can be used to get the full path of an executable.
execute({command} [, {silent}]) *execute()*
Execute {command} and capture its output.
@ -3364,9 +3377,7 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
If {list} is given and it is |TRUE|, a List will be returned.
Otherwise the result is a String and when there are several
matches, they are separated by <NL> characters. [Note: in
version 5.0 a space was used, which caused problems when a
file name contains a space]
matches, they are separated by <NL> characters.
If the expansion fails, the result is an empty string. A name
for a non-existing file is not included, unless {expr} does
@ -3427,7 +3438,7 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
all "README" files in the current directory and below: >
:echo expand("**/README")
<
Expand() can also be used to expand variables and environment
expand() can also be used to expand variables and environment
variables that are only known in a shell. But this can be
slow, because a shell may be used to do the expansion. See
|expr-env-expand|.
@ -3809,8 +3820,7 @@ garbagecollect([{atexit}]) *garbagecollect()*
The garbage collection is not done immediately but only when
it's safe to perform. This is when waiting for the user to
type a character. To force garbage collection immediately use
|test_garbagecollect_now()|.
type a character.
get({list}, {idx} [, {default}]) *get()*
Get item {idx} from |List| {list}. When this item is not
@ -3879,7 +3889,7 @@ getbufinfo([{dict}])
endfor
<
To get buffer-local options use: >
getbufvar({bufnr}, '&')
getbufvar({bufnr}, '&option_name')
<
*getbufline()*
@ -4040,6 +4050,8 @@ getcmdline() *getcmdline()*
Example: >
:cmap <F7> <C-\>eescape(getcmdline(), ' \')<CR>
< Also see |getcmdtype()|, |getcmdpos()| and |setcmdpos()|.
Returns an empty string when entering a password or using
|inputsecret()|.
getcmdpos() *getcmdpos()*
Return the position of the cursor in the command line as a
@ -4074,6 +4086,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
specifies what for. The following completion types are
supported:
arglist file names in argument list
augroup autocmd groups
buffer buffer names
behave :behave suboptions
@ -4094,6 +4107,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
highlight highlight groups
history :history suboptions
locale locale names (as output of locale -a)
mapclear buffer argument
mapping mapping name
menu menus
messages |:messages| suboptions
@ -4303,6 +4317,7 @@ getqflist([{what}]) *getqflist()*
list item is a dictionary with these entries:
bufnr number of buffer that has the file name, use
bufname() to get the name
module module name
lnum line number in the buffer (first line is 1)
col column number (first column is 1)
vcol |TRUE|: "col" is visual column
@ -4327,34 +4342,63 @@ getqflist([{what}]) *getqflist()*
If the optional {what} dictionary argument is supplied, then
returns only the items listed in {what} as a dictionary. The
following string items are supported in {what}:
context get the context stored with |setqflist()|
changedtick get the total number of changes made
to the list |quickfix-changedtick|
context get the |quickfix-context|
efm errorformat to use when parsing "lines". If
not present, then the 'errorformat' option
value is used.
id get information for the quickfix list with
|quickfix-ID|; zero means the id for the
current list or the list specified by "nr"
idx index of the current entry in the list
items quickfix list entries
lines parse a list of lines using 'efm' and return
the resulting entries. Only a |List| type is
accepted. The current quickfix list is not
modified. See |quickfix-parse|.
nr get information for this quickfix list; zero
means the current quickfix list and '$' means
means the current quickfix list and "$" means
the last quickfix list
title get the list title
winid get the |window-ID| (if opened)
size number of entries in the quickfix list
title get the list title |quickfix-title|
winid get the quickfix |window-ID|
all all of the above quickfix properties
Non-string items in {what} are ignored.
Non-string items in {what} are ignored. To get the value of a
particular item, set it to zero.
If "nr" is not present then the current quickfix list is used.
To get the number of lists in the quickfix stack, set 'nr' to
'$' in {what}. The 'nr' value in the returned dictionary
If both "nr" and a non-zero "id" are specified, then the list
specified by "id" is used.
To get the number of lists in the quickfix stack, set "nr" to
"$" in {what}. The "nr" value in the returned dictionary
contains the quickfix stack size.
In case of error processing {what}, an empty dictionary is
returned.
When "lines" is specified, all the other items except "efm"
are ignored. The returned dictionary contains the entry
"items" with the list of entries.
The returned dictionary contains the following entries:
context context information stored with |setqflist()|
items quickfix list entries
nr quickfix list number
title quickfix list title text
winid quickfix |window-ID| (if opened)
changedtick total number of changes made to the
list |quickfix-changedtick|
context quickfix list context. See |quickfix-context|
If not present, set to "".
id quickfix list ID |quickfix-ID|. If not
present, set to 0.
idx index of the current entry in the list. If not
present, set to 0.
items quickfix list entries. If not present, set to
an empty list.
nr quickfix list number. If not present, set to 0
size number of entries in the quickfix list. If not
present, set to 0.
title quickfix list title text. If not present, set
to "".
winid quickfix |window-ID|. If not present, set to 0
Examples: >
Examples (See also |getqflist-examples|): >
:echo getqflist({'all': 1})
:echo getqflist({'nr': 2, 'title': 1})
:echo getqflist({'lines' : ["F1:10:L10"]})
<
getreg([{regname} [, 1 [, {list}]]]) *getreg()*
The result is a String, which is the contents of register
{regname}. Example: >
@ -4433,6 +4477,9 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
:let list_is_on = gettabwinvar(1, 2, '&list')
:echo "myvar = " . gettabwinvar(3, 1, 'myvar')
<
To obtain all window-local variables use: >
gettabwinvar({tabnr}, {winnr}, '&')
*getwinposx()*
getwinposx() The result is a Number, which is the X coordinate in pixels of
the left hand side of the GUI Vim window. The result will be
@ -4458,19 +4505,18 @@ getwininfo([{winid}]) *getwininfo()*
Each List item is a Dictionary with the following entries:
bufnr number of buffer in the window
height window height (excluding winbar)
winbar 1 if the window has a toolbar, 0
otherwise
loclist 1 if showing a location list
quickfix 1 if quickfix or location list window
tabnr tab page number
variables a reference to the dictionary with
window-local variables
width window width
winbar 1 if the window has a toolbar, 0
otherwise
wincol leftmost screen column of the window
winid |window-ID|
winnr window number
To obtain all window-local variables use: >
gettabwinvar({tabnr}, {winnr}, '&')
winrow topmost screen column of the window
getwinvar({winnr}, {varname} [, {def}]) *getwinvar()*
Like |gettabwinvar()| for the current tabpage.
@ -4799,7 +4845,7 @@ input({opts})
where
hl_start_col is the first highlighted column,
hl_end_col is the last highlighted column (+ 1!),
hl_group is |:hl| group used for highlighting.
hl_group is |:hi| group used for highlighting.
*E5403* *E5404* *E5405* *E5406*
Both hl_start_col and hl_end_col + 1 must point to the start
of the multibyte character (highlighting must not break
@ -4862,20 +4908,6 @@ input({opts})
: call inputrestore()
:endfunction
inputdialog({prompt} [, {text} [, {cancelreturn}]]) *inputdialog()*
inputdialog({opts})
Like |input()|, but when the GUI is running and text dialogs
are supported, a dialog window pops up to input the text.
Example: >
:let n = inputdialog("value for shiftwidth", shiftwidth())
:if n != ""
: let &sw = n
:endif
< When the dialog is cancelled {cancelreturn} is returned. When
omitted an empty string is returned.
Hitting <Enter> works like pressing the OK button. Hitting
<Esc> works like pressing the Cancel button.
inputlist({textlist}) *inputlist()*
{textlist} must be a |List| of strings. This |List| is
displayed, one string per line. The user will be prompted to
@ -4993,15 +5025,17 @@ jobstart({cmd}[, {opts}]) *jobstart()*
:call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}'])
< (See |shell-unquoting| for details.)
Example: >
:call jobstart('nvim -h', {'on_stdout':{j,d,e->append(line('.'),d)}})
<
Returns |job-id| on success, 0 on invalid arguments (or job
table is full), -1 if {cmd}[0] or 'shell' is not executable.
For communication over the job's stdio, it is represented as a
|channel|, and a channel ID is returned on success. Use
|chansend()| (or |rpcnotify()| and |rpcrequest()| if "rpc" option
was used) to send data to stdin and |chanclose()| to close stdio
streams without stopping the job explicitly.
The returned job-id is a valid |channel-id| representing the
job's stdio streams. Use |chansend()| (or |rpcnotify()| and
|rpcrequest()| if "rpc" was enabled) to send data to stdin and
|chanclose()| to close the streams without stopping the job.
See |job-control| and |rpc|.
See |job-control| and |RPC|.
NOTE: on Windows if {cmd} is a List:
- cmd[0] must be an executable (not a "built-in"). If it is
@ -5043,7 +5077,7 @@ jobstart({cmd}[, {opts}]) *jobstart()*
- The channel ID on success
- 0 on invalid arguments
- -1 if {cmd}[0] is not executable.
See |job-control|, |channels|, and |msgpack-rpc| for more information.
See also |job-control|, |channel|, |msgpack-rpc|.
jobstop({id}) *jobstop()*
Stop |job-id| {id} by sending SIGTERM to the job process. If
@ -5053,18 +5087,24 @@ jobstop({id}) *jobstop()*
See |job-control|.
jobwait({ids}[, {timeout}]) *jobwait()*
Wait for a set of jobs to finish. The {ids} argument is a list
of |job-id|s to wait for. {timeout} is the maximum number of
milliseconds to wait. During jobwait(), callbacks for jobs not
in the {ids} list may be invoked. The screen will not redraw
unless |:redraw| is invoked by a callback.
Wait for a set of jobs to complete.
{ids} is a list of |job-id|s to wait for.
{timeout} is the maximum number of milliseconds to wait.
{timeout} of zero can be used to check if a job-id is valid,
without waiting.
During jobwait() callbacks for jobs not in the {ids} list may
be invoked. The screen will not redraw unless |:redraw| is
invoked by a callback.
Returns a list of len({ids}) integers, where each integer is
the wait-result of the corresponding job. Each wait-result is:
Job exit-code, if the job exited
-1 if the wait timed out for the job
-2 if the job was interrupted
-3 if the |job-id| is invalid.
the wait-result of the corresponding job. Each wait-result is
one of the following:
* Exit-code, if the job exited
* -1 if the timeout was exceeded
* -2 if the job was interrupted
* -3 if the |job-id| is invalid
join({list} [, {sep}]) *join()*
Join the items in {list} together into one String.
@ -5182,8 +5222,10 @@ line({expr}) The result is a Number, which is the line number of the file
$ the last line in the current buffer
'x position of mark x (if the mark is not set, 0 is
returned)
w0 first line visible in current window
w$ last line visible in current window
w0 first line visible in current window (one if the
display isn't updated, e.g. in silent Ex mode)
w$ last line visible in current window (this is one
less than "w0" if no lines are visible)
v In Visual mode: the start of the Visual area (the
cursor is the end). When not in Visual mode
returns the cursor position. Differs from |'<| in
@ -5200,9 +5242,9 @@ line({expr}) The result is a Number, which is the line number of the file
This autocommand jumps to the last known position in a file
just after opening it, if the '" mark is set: >
:au BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | exe "normal! g`\""
\ | endif
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | exe "normal! g`\""
\ | endif
line2byte({lnum}) *line2byte()*
Return the byte count from the start of the buffer for line
@ -5304,7 +5346,8 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()*
listing.
When there is no mapping for {name}, an empty String is
returned.
returned. When the mapping for {name} is empty, then "<Nop>"
is returned.
The {name} can have special key names, like in the ":map"
command.
@ -5371,9 +5414,10 @@ mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()*
mapping that matches with {name}, while maparg() only finds a
mapping for {name} exactly.
When there is no mapping that starts with {name}, an empty
String is returned. If there is one, the rhs of that mapping
String is returned. If there is one, the RHS of that mapping
is returned. If there are several mappings that start with
{name}, the rhs of one of them is returned.
{name}, the RHS of one of them is returned. This will be
"<Nop>" if the RHS is empty.
The mappings local to the current buffer are checked first,
then the global mappings.
This function can be used to check if a mapping can be added
@ -5388,11 +5432,14 @@ match({expr}, {pat} [, {start} [, {count}]]) *match()*
When {expr} is a |List| then this returns the index of the
first item where {pat} matches. Each item is used as a
String, |Lists| and |Dictionaries| are used as echoed.
Otherwise, {expr} is used as a String. The result is a
Number, which gives the index (byte offset) in {expr} where
{pat} matches.
A match at the first character or |List| item returns zero.
If there is no match -1 is returned.
For getting submatches see |matchlist()|.
Example: >
:echo match("testing", "ing") " results in 4
@ -5529,8 +5576,6 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
< Matches added by |matchaddpos()| are returned by
|getmatches()| with an entry "pos1", "pos2", etc., with the
value a list like the {pos} item.
These matches cannot be set via |setmatches()|, however they
can still be deleted by |clearmatches()|.
matcharg({nr}) *matcharg()*
Selects the {nr} match item, as set with a |:match|,
@ -5669,7 +5714,7 @@ min({expr}) Return the minimum value of all items in {expr}.
it returns the minimum of all values in the dictionary.
If {expr} is neither a list nor a dictionary, or one of the
items in {expr} cannot be used as a Number this results in
an error. An empty |List| or |Dictionary| results in zero.
an error. An empty |List| or |Dictionary| results in zero.
*mkdir()* *E739*
mkdir({name} [, {path} [, {prot}]])
@ -5680,7 +5725,7 @@ mkdir({name} [, {path} [, {prot}]])
the new directory. The default is 0755 (rwxr-xr-x: r/w for
the user readable for others). Use 0700 to make it unreadable
for others.
{Nvim}
{prot} is applied for all parts of {name}. Thus if you create
/tmp/foo/bar then /tmp/foo will be created with 0700. Example: >
:call mkdir($HOME . "/tmp/foo/bar", "p", 0700)
@ -5723,7 +5768,7 @@ mode([expr]) Return a string that indicates the current mode.
"c" or "n".
Also see |visualmode()|.
msgpackdump({list}) {Nvim} *msgpackdump()*
msgpackdump({list}) *msgpackdump()*
Convert a list of VimL objects to msgpack. Returned value is
|readfile()|-style list. Example: >
call writefile(msgpackdump([{}]), 'fname.mpack', 'b')
@ -5738,7 +5783,7 @@ msgpackdump({list}) {Nvim} *msgpackdump()*
4. Other strings are always dumped as BIN strings.
5. Points 3. and 4. do not apply to |msgpack-special-dict|s.
msgpackparse({list}) {Nvim} *msgpackparse()*
msgpackparse({list}) *msgpackparse()*
Convert a |readfile()|-style list to a list of VimL objects.
Example: >
let fname = expand('~/.config/nvim/shada/main.shada')
@ -6194,15 +6239,17 @@ reltimestr({time}) *reltimestr()*
< Also see |profiling|.
*remote_expr()* *E449*
remote_expr({server}, {string} [, {idvar}])
remote_expr({server}, {string} [, {idvar} [, {timeout}]])
Send the {string} to {server}. The string is sent as an
expression and the result is returned after evaluation.
The result must be a String or a |List|. A |List| is turned
into a String by joining the items with a line break in
between (not at the end), like with join(expr, "\n").
If {idvar} is present, it is taken as the name of a
variable and a {serverid} for later use with
If {idvar} is present and not empty, it is taken as the name
of a variable and a {serverid} for later use with
remote_read() is stored there.
If {timeout} is given the read times out after this many
seconds. Otherwise a timeout of 600 seconds is used.
See also |clientserver| |RemoteReply|.
This function is not available in the |sandbox|.
{only available when compiled with the |+clientserver| feature}
@ -6246,9 +6293,10 @@ remote_peek({serverid} [, {retvar}]) *remote_peek()*
:let repl = ""
:echo "PEEK: ".remote_peek(id, "repl").": ".repl
remote_read({serverid}) *remote_read()*
remote_read({serverid}, [{timeout}]) *remote_read()*
Return the oldest available reply from {serverid} and consume
it. It blocks until a reply is available.
it. Unless a {timeout} in seconds is given, it blocks until a
reply is available.
See also |clientserver|.
This function is not available in the |sandbox|.
{only available when compiled with the |+clientserver| feature}
@ -6266,6 +6314,7 @@ remote_send({server}, {string} [, {idvar}])
See also |clientserver| |RemoteReply|.
This function is not available in the |sandbox|.
{only available when compiled with the |+clientserver| feature}
Note: Any errors will be reported in the server and may mess
up the display.
Examples: >
@ -6277,6 +6326,12 @@ remote_send({server}, {string} [, {idvar}])
:echo remote_send("gvim", ":sleep 10 | echo ".
\ 'server2client(expand("<client>"), "HELLO")<CR>')
<
*remote_startserver()* *E941* *E942*
remote_startserver({name})
Become the server {name}. This fails if already running as a
server, when |v:servername| is not empty.
{only available when compiled with the |+clientserver| feature}
remove({list}, {idx} [, {end}]) *remove()*
Without {end}: Remove the item at {idx} from |List| {list} and
return the item.
@ -6346,30 +6401,28 @@ round({expr}) *round()*
echo round(-4.5)
< -5.0
rpcnotify({channel}, {event}[, {args}...]) {Nvim} *rpcnotify()*
rpcnotify({channel}, {event}[, {args}...]) *rpcnotify()*
Sends {event} to {channel} via |RPC| and returns immediately.
If {channel} is 0, the event is broadcast to all channels.
Example: >
:au VimLeave call rpcnotify(0, "leaving")
rpcrequest({channel}, {method}[, {args}...]) {Nvim} *rpcrequest()*
rpcrequest({channel}, {method}[, {args}...]) *rpcrequest()*
Sends a request to {channel} to invoke {method} via
|RPC| and blocks until a response is received.
Example: >
:let result = rpcrequest(rpc_chan, "func", 1, 2, 3)
rpcstart({prog}[, {argv}]) {Nvim} *rpcstart()*
rpcstart({prog}[, {argv}]) *rpcstart()*
Deprecated. Replace >
:let id = rpcstart('prog', ['arg1', 'arg2'])
< with >
:let id = jobstart(['prog', 'arg1', 'arg2'], {'rpc': v:true})
rpcstop({channel}) {Nvim} *rpcstop()*
Deprecated. This function was used to stop a job with |rpc|
channel, and additionally closed rpc sockets. Instead use
|jobstop()| to stop any job, and |chanclose|(id, "rpc") to close
rpc communication without stopping the job. Use |chanclose|(id)
to close any socket.
rpcstop({channel}) *rpcstop()*
Deprecated. Instead use |jobstop()| to stop any job, and
chanclose(id, "rpc") to close RPC communication without
stopping the job. Use chanclose(id) to close any socket.
screenattr({row}, {col}) *screenattr()*
Like |screenchar()|, but return the attribute. This is a rather
@ -6550,6 +6603,8 @@ searchpair({start}, {middle}, {end} [, {flags} [, {skip}
When {skip} is omitted or empty, every match is accepted.
When evaluating {skip} causes an error the search is aborted
and -1 returned.
{skip} can be a string, a lambda, a funcref or a partial.
Anything else makes the function fail.
For {stopline} and {timeout} see |search()|.
@ -6829,10 +6884,12 @@ setpos({expr}, {list})
setqflist({list} [, {action}[, {what}]]) *setqflist()*
Create or replace or add to the quickfix list using the items
in {list}. Each item in {list} is a dictionary.
Non-dictionary items in {list} are ignored. Each dictionary
item can contain the following entries:
Create or replace or add to the quickfix list.
When {what} is not present, use the items in {list}. Each
item must be a dictionary. Non-dictionary items in {list} are
ignored. Each dictionary item can contain the following
entries:
bufnr buffer number; must be the number of a valid
buffer
@ -6877,7 +6934,10 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
freed.
If {action} is not present or is set to ' ', then a new list
is created.
is created. The new quickfix list is added after the current
quickfix list in the stack and all the following lists are
freed. To add a new quickfix list at the end of the stack,
set "nr" in {what} to "$".
If {title} is given, it will be used to set |w:quickfix_title|
after opening the quickfix window.
@ -6886,20 +6946,32 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
only the items listed in {what} are set. The first {list}
argument is ignored. The following items can be specified in
{what}:
context any Vim type can be stored as a context
context quickfix list context. See |quickfix-context|
efm errorformat to use when parsing text from
"lines". If this is not present, then the
'errorformat' option value is used.
id quickfix list identifier |quickfix-ID|
items list of quickfix entries. Same as the {list}
argument.
lines use 'errorformat' to parse a list of lines and
add the resulting entries to the quickfix list
{nr} or {id}. Only a |List| value is supported.
nr list number in the quickfix stack; zero
means the current quickfix list and '$' means
means the current quickfix list and "$" means
the last quickfix list
title quickfix list title text
Unsupported keys in {what} are ignored.
If the "nr" item is not present, then the current quickfix list
is modified.
is modified. When creating a new quickfix list, "nr" can be
set to a value one greater than the quickfix stack size.
When modifying a quickfix list, to guarantee that the correct
list is modified, "id" should be used instead of "nr" to
specify the list.
Examples: >
:call setqflist([], 'r', {'title': 'My search'})
:call setqflist([], 'r', {'nr': 2, 'title': 'Errors'})
Examples (See also |setqflist-examples|): >
:call setqflist([], 'r', {'title': 'My search'})
:call setqflist([], 'r', {'nr': 2, 'title': 'Errors'})
:call setqflist([], 'a', {'id':qfid, 'lines':["F1:10:L10"]})
<
Returns zero for success, -1 for failure.
@ -7269,8 +7341,8 @@ stdpath({what}) *stdpath()* *E6100*
directories.
{what} Type Description ~
cache String Cache directory. Useful for plugins
that need temporary files to work.
cache String Cache directory. Arbitrary temporary
storage for plugins, etc.
config String User configuration directory. The
|init.vim| is stored here.
config_dirs List Additional configuration directories.
@ -7278,6 +7350,9 @@ stdpath({what}) *stdpath()* *E6100*
is stored here.
data_dirs List Additional data directories.
Example: >
:echo stdpath("config")
str2float({expr}) *str2float()*
Convert String {expr} to a Float. This mostly works the same
@ -7499,8 +7574,9 @@ submatch({nr} [, {list}]) *submatch()* *E935*
When substitute() is used recursively only the submatches in
the current (deepest) call can be obtained.
Example: >
Examples: >
:s/\d\+/\=submatch(0) + 1/
:echo substitute(text, '\d\+', '\=submatch(0) + 1', '')
< This finds the first number in the line and adds one to it.
A line break is included as a newline character.
@ -7625,7 +7701,7 @@ synconcealed({lnum}, {col}) *synconcealed()*
concealable region if there are two consecutive regions
with the same replacement character. For an example, if
the text is "123456" and both "23" and "45" are concealed
and replace by the character "X", then:
and replaced by the character "X", then:
call returns ~
synconcealed(lnum, 1) [0, '', 0]
synconcealed(lnum, 2) [1, 'X', 1]
@ -7810,7 +7886,7 @@ tempname() *tempname()* *temp-file-name*
For MS-Windows forward slashes are used when the 'shellslash'
option is set or when 'shellcmdflag' starts with '-'.
termopen({cmd}[, {opts}]) {Nvim} *termopen()*
termopen({cmd}[, {opts}]) *termopen()*
Spawns {cmd} in a new pseudo-terminal session connected
to the current buffer. {cmd} is the same as the one passed to
|jobstart()|. This function fails if the current buffer is
@ -7825,7 +7901,7 @@ termopen({cmd}[, {opts}]) {Nvim} *termopen()*
See |terminal| for more information.
test_garbagecollect_now() *test_garbagecollect_now()*
Like garbagecollect(), but executed right away. This must
Like |garbagecollect()|, but executed right away. This must
only be called directly to avoid any structure to exist
internally, and |v:testing| must have been set before calling
any function.
@ -7942,6 +8018,22 @@ tr({src}, {fromstr}, {tostr}) *tr()*
echo tr("<blob>", "<>", "{}")
< returns "{blob}"
trim({text} [, {mask}]) *trim()*
Return {text} as a String where any character in {mask} is
removed from the beginning and end of {text}.
If {mask} is not given, {mask} is all characters up to 0x20,
which includes Tab, space, NL and CR, plus the non-breaking
space character 0xa0.
This code deals with multibyte characters properly.
Examples: >
echo trim(" some text ")
< returns "some text" >
echo trim(" \r\t\t\r RESERVE \t\n\x0B\xA0") . "_TAIL"
< returns "RESERVE_TAIL" >
echo trim("rm<Xrm<>X>rrm", "rm<>")
< returns "Xrm<>X" (characters in the middle are not removed)
trunc({expr}) *trunc()*
Return the largest integral value with magnitude less than or
equal to {expr} as a |Float| (truncate towards zero).
@ -8144,6 +8236,14 @@ win_id2win({expr}) *win_id2win()*
Return the window number of window with ID {expr}.
Return 0 if the window cannot be found in the current tabpage.
win_screenpos({nr}) *win_screenpos()*
Return the screen position of window {nr} as a list with two
numbers: [row, col]. The first window always has position
[1, 1].
{nr} can be the window number or the |window-ID|.
Return [0, 0] if the window cannot be found in the current
tabpage.
*winbufnr()*
winbufnr({nr}) The result is a Number, which is the number of the buffer
associated with window {nr}. {nr} can be the window number or
@ -8251,8 +8351,8 @@ winwidth({nr}) *winwidth()*
:if winwidth(0) <= 50
: exe "normal 50\<C-W>|"
:endif
< For getting the terminal or screen size, see the 'columns'
option.
< For getting the terminal or screen size, see the 'columns'
option.
wordcount() *wordcount()*
@ -8270,11 +8370,11 @@ wordcount() *wordcount()*
cursor_words Number of words before cursor position
(not in Visual mode)
visual_bytes Number of bytes visually selected
(only in Visual mode)
(only in Visual mode)
visual_chars Number of chars visually selected
(only in Visual mode)
(only in Visual mode)
visual_words Number of chars visually selected
(only in Visual mode)
(only in Visual mode)
*writefile()*
@ -8439,7 +8539,7 @@ tag_old_static Compiled with support for old static tags
|tag-old-static|.
tag_any_white Compiled with support for any white characters in tags
files |tag-any-white|.
termresponse Compiled with support for |t_RV| and |v:termresponse|.
termresponse Compiled with support for t_RV and |v:termresponse|.
textobjects Compiled with support for |text-objects|.
timers Compiled with |timer_start()| support.
title Compiled with window title support |'title'|.
@ -8456,6 +8556,8 @@ visual Compiled with Visual mode.
visualextra Compiled with extra Visual mode commands.
|blockwise-operators|.
vreplace Compiled with |gR| and |gr| commands.
vtp Compiled for vcon support |+vtp| (check vcon to find
out if it works in the current console)).
wildignore Compiled with 'wildignore' option.
wildmenu Compiled with 'wildmenu' option.
win32 Windows version of Vim (32 or 64 bit).
@ -8558,6 +8660,9 @@ See |:verbose-cmd| for more information.
not used an error message is given. When [!] is used,
an existing function is silently replaced. Unless it
is currently being executed, that is an error.
NOTE: Use ! wisely. If used without care it can cause
an existing function to be replaced unexpectedly,
which is hard to debug.
For the {arguments} see |function-argument|.
@ -8677,8 +8782,7 @@ may be larger.
It is also possible to define a function without any arguments. You must
still supply the () then.
It is allowed to define another function inside a function
body.
It is allowed to define another function inside a function body.
*local-variables*
Inside a function local variables can be used. These will disappear when the
@ -8835,9 +8939,6 @@ Also note that if you have two script files, and one calls a function in the
other and vice versa, before the used function is defined, it won't work.
Avoid using the autoload functionality at the toplevel.
Hint: If you distribute a bunch of scripts you can pack them together with the
|vimball| utility. Also read the user manual |distribute-script|.
==============================================================================
6. Curly braces names *curly-braces-names*
@ -9056,6 +9157,14 @@ This does NOT work: >
variables are automatically deleted when the function
ends.
:unl[et] ${env-name} ... *:unlet-environment* *:unlet-$*
Remove environment variable {env-name}.
Can mix {name} and ${env-name} in one :unlet command.
No error message is given for a non-existing
variable, also without !.
If the system does not support deleting an environment
variable, it is made emtpy.
:lockv[ar][!] [depth] {name} ... *:lockvar* *:lockv*
Lock the internal variable {name}. Locking means that
it can no longer be changed (until it is unlocked).
@ -10594,7 +10703,7 @@ The sandbox is also used for the |:sandbox| command.
These items are not allowed in the sandbox:
- changing the buffer text
- defining or changing mapping, autocommands, functions, user commands
- defining or changing mapping, autocommands, user commands
- setting certain options (see |option-summary|)
- setting certain v: variables (see |v:var|) *E794*
- executing a shell command
@ -10616,6 +10725,7 @@ location. Insecure in this context are:
- sourcing a .nvimrc or .exrc in the current directory
- while executing in the sandbox
- value coming from a modeline
- executing a function that was defined in the sandbox
Note that when in the sandbox and saving an option value and restoring it, the
option will still be marked as it was set in the sandbox.
@ -10709,7 +10819,7 @@ Group Default link Colored expression ~
|expr-entry|
*hl-NvimColon* Delimiter `:` in |dict| literal
*hl-NvimComma* Delimiter `,` in |dict|/|list|
*hl-NvimComma* Delimiter `,` in |dict| or |list|
literal or
|expr-function|
*hl-NvimArrow* Delimiter `->` in |lambda|

View File

@ -205,4 +205,4 @@ changes made in the current line.
For more information about the bugs refer to rileft.txt.
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -152,8 +152,8 @@ file. It will be overwritten when installing a new version of Vim.
A. If you want to overrule all default file type checks.
This works by writing one file for each filetype. The disadvantage is that
means there can be many files. The advantage is that you can simply drop
this file in the right directory to make it work.
there can be many files. The advantage is that you can simply drop this
file in the right directory to make it work.
*ftdetect*
1. Create your user runtime directory. You would normally use the first
item of the 'runtimepath' option. Then create the directory "ftdetect"
@ -273,6 +273,10 @@ then Vim will load all plugins in these directories and below:
Note that the last one is the value of $VIMRUNTIME which has been expanded.
Note that when using a plugin manager or |packages| many directories will be
added to 'runtimepath'. These plugins each require their own directory, don't
put them directly in ~/.vim/plugin.
What if it looks like your plugin is not being loaded? You can find out what
happens when Vim starts up by using the |-V| argument: >
@ -512,7 +516,7 @@ View manpages in Nvim. Supports highlighting, completion, locales, and
navigation. Also see |find-manpage|.
To use Nvim as a manpager: >
export MANPAGER="nvim -c 'set ft=man' -"
export MANPAGER='nvim +Man!'
man.vim will always attempt to reuse the closest man window (above/left) but
otherwise create a split.
@ -522,13 +526,14 @@ The case sensitivity of completion is controlled by 'fileignorecase'.
Commands:
Man {name} Display the manpage for {name}.
Man {sect} {name} Display the manpage for {name} and section {sect}.
Man {name}({sect}) Alternate syntax which completes the section.
Man {name}({sect}) Same as above.
Man {sect} {name}({sect}) Used during completion to show the real section of
when the provided section is a prefix, e.g. 1m vs 1.
Man {path} Open the manpage specified by path. Prepend "./" if
page is in the current directory.
Man {path} Open the manpage at {path}. Prepend "./" if {path}
is relative to the current directory.
Man Open the manpage for the <cWORD> (man buffers)
or <cword> (non-man buffers) under the cursor.
Man! Display the current buffer contents as a manpage.
|:Man| accepts command modifiers. For example, to use a vertical split: >
:vertical Man printf
@ -568,11 +573,31 @@ By default the following options are set, in accordance with PEP8: >
setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
To disable this behaviour, set the following variable in your vimrc: >
To disable this behavior, set the following variable in your vimrc: >
let g:python_recommended_style = 0
R MARKDOWN *ft-rmd-plugin*
By default ftplugin/html.vim is not sourced. If you want it sourced, add to
your |vimrc|: >
let rmd_include_html = 1
The 'formatexpr' option is set dynamically with different values for R code
and for Markdown code. If you prefer that 'formatexpr' is not set, add to your
|vimrc|: >
let rmd_dynamic_comments = 0
R RESTRUCTURED TEXT *ft-rrst-plugin*
The 'formatexpr' option is set dynamically with different values for R code
and for ReStructured text. If you prefer that 'formatexpr' is not set, add to
your |vimrc|: >
let rrst_dynamic_comments = 0
RPM SPEC *ft-spec-plugin*
Since the text for this plugin is rather long it has been put in a separate
@ -749,4 +774,23 @@ You can change the default by defining the variable g:tex_flavor to the format
Currently no other formats are recognized.
vim:tw=78:ts=8:ft=help:norl:
VIM *ft-vim-plugin*
The Vim filetype plugin defines mappings to move to the start and end of
functions with [[ and ]]. Move around comments with ]" and [".
The mappings can be disabled with: >
let g:no_vim_maps = 1
ZIMBU *ft-zimbu-plugin*
The Zimbu filetype plugin defines mappings to move to the start and end of
functions with [[ and ]].
The mappings can be disabled with: >
let g:no_zimbu_maps = 1
<
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -595,4 +595,4 @@ used. Otherwise the values from the window where the buffer was edited last
are used.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -249,7 +249,7 @@ g:decada.Make_Command string
External command used for |g:decada.Make()| (|'makeprg'|).
*g:decada.Error_Format*
g:decada.Error_Format| string
g:decada.Error_Format string
Error format (|'errorformat'|).
==============================================================================

View File

@ -1,4 +1,6 @@
*ft_rust.txt* Filetype plugin for Rust
*ft_rust.txt* For Vim version 8.1. Last change: 2017 Nov 02
This is documentation for the Rust filetype plugin.
==============================================================================
CONTENTS *rust*
@ -234,4 +236,4 @@ It also has a few other mappings:
Note: This binding is only available in MacVim.
==============================================================================
vim:tw=78:sw=4:noet:ts=8:ft=help:norl:
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:

View File

@ -773,4 +773,4 @@ Setting the filetype back to Perl sets all the usual "perl" related items back
as they were.
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -9,7 +9,7 @@ Vim's Graphical User Interface *gui* *GUI*
Type |gO| to see the table of contents.
==============================================================================
1. Starting the GUI *gui-start* *E229* *E233*
Starting the GUI *gui-start* *E229* *E233*
*ginit.vim* *gui-init* *gvimrc* *$MYGVIMRC*
The gvimrc file is where GUI-specific startup commands should be placed. It
@ -71,7 +71,7 @@ and only the first one that is found is read.
:winp[os]
Display current position of the top left corner of the GUI vim
window in pixels. Does not work in all versions.
Also see |getwinposx()| and |getwinposy()|.
Also see |getwinpos()|, |getwinposx()| and |getwinposy()|.
:winp[os] {X} {Y} *E466*
Put the GUI vim window at the given {X} and {Y} coordinates.
@ -87,7 +87,7 @@ and only the first one that is found is read.
Obsolete, use ":set lines=11 columns=22".
==============================================================================
2. Scrollbars *gui-scrollbars*
Scrollbars *gui-scrollbars*
There are vertical scrollbars and a horizontal scrollbar. You may
configure which ones appear with the 'guioptions' option.
@ -155,167 +155,7 @@ include the 'h' flag in 'guioptions'. Then the scrolling is limited by the
text of the current cursor line.
==============================================================================
3. Mouse Control *gui-mouse*
The mouse only works if the appropriate flag in the 'mouse' option is set.
When the GUI is switched on, and 'mouse' wasn't set yet, the 'mouse' option is
automatically set to "a", enabling it for all modes except for the
|hit-enter| prompt. If you don't want this, a good place to change the
'mouse' option is the "gvimrc" file.
Other options that are relevant:
'mousefocus' window focus follows mouse pointer |gui-mouse-focus|
'mousemodel' what mouse button does which action
'mousehide' hide mouse pointer while typing text
'selectmode' whether to start Select mode or Visual mode
A quick way to set these is with the ":behave" command.
*:behave* *:be*
:be[have] {model} Set behavior for mouse and selection. Valid
arguments are:
mswin MS-Windows behavior
xterm Xterm behavior
Using ":behave" changes these options:
option mswin xterm ~
'selectmode' "mouse,key" ""
'mousemodel' "popup" "extend"
'keymodel' "startsel,stopsel" ""
'selection' "exclusive" "inclusive"
In the $VIMRUNTIME directory, there is a script called |mswin.vim|, which will
also map a few keys to the MS-Windows cut/copy/paste commands. This is NOT
compatible, since it uses the CTRL-V, CTRL-X and CTRL-C keys. If you don't
mind, use this command: >
:so $VIMRUNTIME/mswin.vim
For scrolling with a wheel on a mouse, see |scroll-mouse-wheel|.
3.1 Moving Cursor with Mouse *gui-mouse-move*
Click the left mouse button somewhere in a text buffer where you want the
cursor to go, and it does!
This works in when 'mouse' contains ~
Normal mode 'n' or 'a'
Visual mode 'v' or 'a'
Insert mode 'i' or 'a'
Select mode is handled like Visual mode.
You may use this with an operator such as 'd' to delete text from the current
cursor position to the position you point to with the mouse. That is, you hit
'd' and then click the mouse somewhere.
*gui-mouse-focus*
The 'mousefocus' option can be set to make the keyboard focus follow the
mouse pointer. This means that the window where the mouse pointer is, is the
active window. Warning: this doesn't work very well when using a menu,
because the menu command will always be applied to the top window.
If you are on the ':' line (or '/' or '?'), then clicking the left or right
mouse button will position the cursor on the ':' line (if 'mouse' contains
'c', 'a' or 'A').
In any situation the middle mouse button may be clicked to paste the current
selection.
3.2 Selection with Mouse *gui-mouse-select*
The mouse can be used to start a selection. How depends on the 'mousemodel'
option:
'mousemodel' is "extend": use the right mouse button
'mousemodel' is "popup": use the left mouse button, while keeping the Shift
key pressed.
If there was no selection yet, this starts a selection from the old cursor
position to the position pointed to with the mouse. If there already is a
selection then the closest end will be extended.
If 'selectmode' contains "mouse", then the selection will be in Select mode.
This means that typing normal text will replace the selection. See
|Select-mode|. Otherwise, the selection will be in Visual mode.
Double clicking may be done to make the selection word-wise, triple clicking
makes it line-wise, and quadruple clicking makes it rectangular block-wise.
See |gui-selections| on how the selection is used.
3.3 Other Text Selection with Mouse *gui-mouse-modeless*
*modeless-selection*
A different kind of selection is used when:
- in Command-line mode
- in the Command-line window and pointing in another window
- at the |hit-enter| prompt
- whenever the current mode is not in the 'mouse' option
- when holding the CTRL and SHIFT keys in the GUI
Since Vim continues like the selection isn't there, and there is no mode
associated with the selection, this is called modeless selection. Any text in
the Vim window can be selected. Select the text by pressing the left mouse
button at the start, drag to the end and release. To extend the selection,
use the right mouse button when 'mousemodel' is "extend", or the left mouse
button with the shift key pressed when 'mousemodel' is "popup".
The selection is removed when the selected text is scrolled or changed.
On the command line CTRL-Y can be used to copy the selection into the
clipboard. To do this from Insert mode, use CTRL-O : CTRL-Y <CR>. When
'guioptions' contains a or A (default on X11), the selection is automatically
copied to the "* register.
The middle mouse button can then paste the text. On non-X11 systems, you can
use CTRL-R +.
3.4 Using Mouse on Status Lines *gui-mouse-status*
Clicking the left or right mouse button on the status line below a Vim
window makes that window the current window. This actually happens on button
release (to be able to distinguish a click from a drag action).
With the left mouse button a status line can be dragged up and down, thus
resizing the windows above and below it. This does not change window focus.
The same can be used on the vertical separator: click to give the window left
of it focus, drag left and right to make windows wider and narrower.
3.5 Various Mouse Clicks *gui-mouse-various*
<S-LeftMouse> Search forward for the word under the mouse click.
When 'mousemodel' is "popup" this starts or extends a
selection.
<S-RightMouse> Search backward for the word under the mouse click.
<C-LeftMouse> Jump to the tag name under the mouse click.
<C-RightMouse> Jump back to position before the previous tag jump
(same as "CTRL-T")
3.6 Mouse Mappings *gui-mouse-mapping*
The mouse events, complete with modifiers, may be mapped. Eg: >
:map <S-LeftMouse> <RightMouse>
:map <S-LeftDrag> <RightDrag>
:map <S-LeftRelease> <RightRelease>
:map <2-S-LeftMouse> <2-RightMouse>
:map <2-S-LeftDrag> <2-RightDrag>
:map <2-S-LeftRelease> <2-RightRelease>
:map <3-S-LeftMouse> <3-RightMouse>
:map <3-S-LeftDrag> <3-RightDrag>
:map <3-S-LeftRelease> <3-RightRelease>
:map <4-S-LeftMouse> <4-RightMouse>
:map <4-S-LeftDrag> <4-RightDrag>
:map <4-S-LeftRelease> <4-RightRelease>
These mappings make selection work the way it probably should in a Motif
application, with shift-left mouse allowing for extending the visual area
rather than the right mouse button.
Mouse mapping with modifiers does not work for modeless selection.
3.7 Drag and drop *drag-n-drop*
Drag and drop *drag-n-drop*
You can drag and drop one or more files into the Vim window, where they will
be opened as if a |:drop| command was used.
@ -334,47 +174,12 @@ names with any Ex command. Special characters (space, tab, double quote and
'|'; backslash on non-MS-Windows systems) will be escaped.
==============================================================================
4. Making GUI Selections *gui-selections*
*quotestar*
You may make selections with the mouse (see |gui-mouse-select|), or by using
Vim's Visual mode (see |v|). If 'a' is present in 'guioptions', then
whenever a selection is started (Visual or Select mode), or when the selection
is changed, Vim becomes the owner of the windowing system's primary selection
(on MS-Windows the |clipboard| is used).
*primary-selection*
There is a special register for storing this selection, it is the "*
register. Nothing is put in here unless the information about what text is
selected is about to change (e.g. with a left mouse click somewhere), or when
another application wants to paste the selected text. Then the text is put
in the "* register. For example, to cut a line and make it the current
selection/put it on the clipboard: >
"*dd
Similarly, when you want to paste a selection from another application, e.g.,
by clicking the middle mouse button, the selection is put in the "* register
first, and then 'put' like any other register. For example, to put the
selection (contents of the clipboard): >
"*p
Note that when pasting text from one Vim into another separate Vim, the type
of selection (character, line, or block) will also be copied. For other
applications the type is always character.
When the "unnamed" string is included in the 'clipboard' option, the unnamed
register is the same as the "* register. Thus you can yank to and paste the
selection without prepending "* to commands.
==============================================================================
5. Menus *menus*
Menus *menus*
For an introduction see |usr_42.txt| in the user manual.
5.1 Using Menus *using-menus*
Using Menus *using-menus*
Basically, menus can be used just like mappings. You can define your own
menus, as many as you like.
@ -420,7 +225,7 @@ Pressing <F4> will start the menu. You can now use the cursor keys to select
a menu entry. Hit <Enter> to execute it. Hit <Esc> if you want to cancel.
This does require the |+menu| feature enabled at compile time.
5.2 Creating New Menus *creating-menus*
Creating New Menus *creating-menus*
*:me* *:menu* *:noreme* *:noremenu*
*:am* *:amenu* *:an* *:anoremenu*
@ -662,7 +467,7 @@ when the right mouse button is pressed, if 'mousemodel' is set to popup or
popup_setpos.
5.3 Showing What Menus Are Mapped To *showing-menus*
Showing What Menus Are Mapped To *showing-menus*
To see what an existing menu is mapped to, use just one argument after the
menu commands (just like you would with the ":map" commands). If the menu
@ -680,7 +485,7 @@ Note that hitting <Tab> while entering a menu name after a menu command may
be used to complete the name of the menu item.
5.4 Executing Menus *execute-menus*
Executing Menus *execute-menus*
*:em* *:emenu* *E334* *E335*
:[range]em[enu] {menu} Execute {menu} from the command line.
@ -700,7 +505,7 @@ When using a range, if the lines match with '<,'>, then the menu is executed
using the last visual selection.
5.5 Deleting Menus *delete-menus*
Deleting Menus *delete-menus*
*:unme* *:unmenu*
*:aun* *:aunmenu*
@ -730,7 +535,7 @@ If you want to get rid of the menu bar: >
:set guioptions-=m
5.6 Disabling Menus *disable-menus*
Disabling Menus *disable-menus*
*:menu-disable* *:menu-enable*
If you do not want to remove a menu, but disable it for a moment, this can be
@ -746,7 +551,7 @@ When the argument is "*", all menus are affected. Otherwise the given menu
name and all existing submenus below it are affected.
5.7 Examples for Menus *menu-examples*
Examples for Menus *menu-examples*
Here is an example on how to add menu items with menu's! You can add a menu
item for the keyword under the cursor. The register "z" is used. >
@ -763,7 +568,7 @@ mappings, or put these lines in your gvimrc; "<C-R>" is CTRL-R, "<CR>" is
the <CR> key. |<>|)
5.8 Tooltips & Menu tips
Tooltips & Menu tips
See section |42.4| in the user manual.
@ -833,22 +638,5 @@ This creates a popup menu that doesn't exist on the main menu-bar.
Note that a menu that starts with ']' will not be displayed.
==============================================================================
6. Extras *gui-extras*
This section describes other features which are related to the GUI.
- With the GUI, there is no wait for one second after hitting escape, because
the key codes don't start with <Esc>.
- Typing ^V followed by a special key in the GUI will insert "<Key>", since
the internal string used is meaningless. Modifiers may also be held down to
get "<Modifiers-Key>".
- In the GUI, the modifiers SHIFT, CTRL, and ALT (or META) may be used within
mappings of special keys and mouse events. E.g.: :map <M-LeftDrag> <LeftDrag>
- In the GUI, several normal keys may have modifiers in mappings etc, these
are <Space>, <Tab>, <NL>, <CR>, <Esc>.
vim:tw=78:sw=4:ts=8:ft=help:norl:
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:

View File

@ -134,4 +134,4 @@ The result is that all Hebrew characters are displayed as ~x. To solve this
problem, set isprint=@,128-255.
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -150,6 +150,7 @@ GUI ~
Interfaces ~
|if_cscop.txt| using Cscope with Vim
|if_lua.txt| Lua interface
|if_pyth.txt| Python interface
|if_ruby.txt| Ruby interface
|sign.txt| debugging signs
@ -160,6 +161,9 @@ Versions ~
*standard-plugin-list*
Standard plugins ~
|pi_gzip.txt| Reading and writing compressed files
|pi_health.txt| Healthcheck framework
|pi_matchit.txt| Extended "%" matching
|pi_msgpack.txt| msgpack utilities
|pi_netrw.txt| Reading and writing files over a network
|pi_paren.txt| Highlight matching parens
|pi_spec.txt| Filetype plugin to work with rpm spec files
@ -182,4 +186,4 @@ will try to find help for it. Especially for options in single quotes, e.g.
'hlsearch'.
------------------------------------------------------------------------------
vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl:
vim:tw=78:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl:

View File

@ -364,4 +364,4 @@ highlighting. So do these:
You can find the details in $VIMRUNTIME/syntax/help.vim
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -371,4 +371,4 @@ Cscope Home Page (http://cscope.sourceforge.net/): >
\:vert scs find a <C-R>=expand("<cword>")<CR><CR>
<
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -229,8 +229,7 @@ shared between command calls. All Lua default libraries are available. In
addition, Lua "print" function has its output redirected to the Nvim message
area, with arguments separated by a white space instead of a tab.
Lua uses the "vim" module (see |lua-vim|) to issue commands to Nvim
and manage buffers (|lua-buffer|) and windows (|lua-window|). However,
Lua uses the "vim" module (see |lua-vim|) to issue commands to Nvim. However,
procedures that alter buffer content, open new buffers, and change cursor
position are restricted when the command is executed in the |sandbox|.
@ -261,7 +260,7 @@ vim.stricmp(a, b) *lua-vim.stricmp*
greater then b or a is lesser then b respectively.
vim.type_idx *lua-vim.type_idx*
Type index for use in |lua-special-tables|. Specifying one of the
Type index for use in |lua-special-tbl|. Specifying one of the
values from |lua-vim.types| allows typing the empty table (it is
unclear whether empty lua table represents empty list or empty array)
and forcing integral numbers to be |Float|. See |lua-special-tbl| for
@ -310,14 +309,22 @@ semantically equivalent in Lua to:
return chunk(arg) -- return typval
end
Note that "_A" receives the argument to "luaeval". Lua nils, numbers, strings,
tables and booleans are converted to their respective VimL types. An error is
thrown if conversion of any of the remaining Lua types is attempted.
Lua nils, numbers, strings, tables and booleans are converted to their
respective VimL types. An error is thrown if conversion of any other Lua types
is attempted.
Note 2: lua tables are used as both dictionaries and lists, thus making it
impossible to determine whether empty table is meant to be empty list or empty
dictionary. Additionally lua does not have integer numbers. To distinguish
between these cases there is the following agreement:
The magic global "_A" contains the second argument to luaeval().
Example: >
:echo luaeval('_A[1] + _A[2]', [40, 2])
42
:echo luaeval('string.match(_A, "[a-z]+")', 'XYXfoo123')
foo
Lua tables are used as both dictionaries and lists, so it is impossible to
determine whether empty table is meant to be empty list or empty dictionary.
Additionally lua does not have integer numbers. To distinguish between these
cases there is the following agreement:
0. Empty table is empty list.
1. Table with N incrementally growing integral numbers, starting from 1 and

View File

@ -4,9 +4,9 @@
VIM REFERENCE MANUAL by Paul Moore
The Python Interface to Vim *python* *Python*
The Python Interface to Vim *if_pyth* *python* *Python*
See |provider-python| for more information. {Nvim}
See |provider-python| for more information.
Type |gO| to see the table of contents.
@ -42,9 +42,10 @@ Example: >
endfunction
To see what version of Python you have: >
:python import sys
:python print(sys.version)
There is no need to import sys, it's done by default.
Note: Python is very sensitive to the indenting. Make sure the "class" line
and "EOF" do not have any indent.
@ -62,6 +63,18 @@ Examples:
>
:pydo return "%s\t%d" % (line[::-1], len(line))
:pydo if line: return "%4d: %s" % (linenr, line)
<
One can use `:pydo` in possible conjunction with `:py` to filter a range using
python. For example: >
:py3 << EOF
needle = vim.eval('@a')
replacement = vim.eval('@b')
def py_vim_string_replace(str):
return str.replace(needle, replacement)
EOF
:'<,'>py3do return py_vim_string_replace(line)
<
*:pyfile* *:pyf*
:[range]pyf[ile] {file}
@ -79,7 +92,6 @@ Python commands cannot be used in the |sandbox|.
To pass arguments you need to set sys.argv[] explicitly. Example: >
:python import sys
:python sys.argv = ["foo", "bar"]
:pyfile myscript.py
@ -118,7 +130,7 @@ Instead, put the Python command in a function and call that function:
Note that "EOF" must be at the start of the line.
==============================================================================
2. The vim module *python-vim*
2. The vim module *python-vim* *python2*
Python code gets all of its access to vim (with one exception - see
|python-output| below) via the "vim" module. The vim module implements two
@ -705,12 +717,10 @@ Raising SystemExit exception in python isn't endorsed way to quit vim, use: >
You can test what Python version is available with: >
if has('python')
echo 'there is Python 2.x'
elseif has('python3')
endif
if has('python3')
echo 'there is Python 3.x'
endif
Note however, that if Python 2 and 3 are both available, but not loaded,
these has() calls will try to load them.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -3,7 +3,7 @@
VIM REFERENCE MANUAL by Shugo Maeda
The Ruby Interface to Vim *ruby* *Ruby*
The Ruby Interface to Vim *if_ruby* *ruby* *Ruby*
*E266* *E267* *E268* *E269* *E270* *E271* *E272* *E273*
@ -180,4 +180,4 @@ $curwin The current window object.
$curbuf The current buffer object.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -410,10 +410,10 @@ The examples below assume a 'shiftwidth' of 4.
*cino-(*
(N When in unclosed parentheses, indent N characters from the line
with the unclosed parentheses. Add a 'shiftwidth' for every
unclosed parentheses. When N is 0 or the unclosed parentheses
is the first non-white character in its line, line up with the
next non-white character after the unclosed parentheses.
(default 'shiftwidth' * 2).
extra unclosed parentheses. When N is 0 or the unclosed
parentheses is the first non-white character in its line, line
up with the next non-white character after the unclosed
parentheses. (default 'shiftwidth' * 2).
cino= cino=(0 >
if (c1 && (c2 || if (c1 && (c2 ||
@ -424,7 +424,8 @@ The examples below assume a 'shiftwidth' of 4.
{ {
<
*cino-u*
uN Same as (N, but for one level deeper. (default 'shiftwidth').
uN Same as (N, but for one nesting level deeper.
(default 'shiftwidth').
cino= cino=u2 >
if (c123456789 if (c123456789
@ -902,6 +903,25 @@ In PHP braces are not required inside 'case/default' blocks therefore 'case:'
and 'default:' are indented at the same level than the 'switch()' to avoid
meaningless indentation. You can use the above option to return to the
traditional way.
-------------
*PHP_noArrowMatching*
By default the indent script will indent multi-line chained calls by matching
the position of the '->': >
$user_name_very_long->name()
->age()
->info();
You can revert to the classic way of indenting by setting this option to 1: >
:let g:PHP_noArrowMatching = 1
You will obtain the following result: >
$user_name_very_long->name()
->age()
->info();
PYTHON *ft-python-indent*
@ -917,6 +937,11 @@ Indent after a nested paren: >
Indent for a continuation line: >
let g:pyindent_continue = '&sw * 2'
The method uses searchpair() to look back for unclosed parenthesis. This can
sometimes be slow, thus it timeouts after 150 msec. If you notice the
indenting isn't correct, you can set a larger timeout in msec: >
let g:pyindent_searchpair_timeout = 500
R *ft-r-indent*
@ -954,6 +979,11 @@ Below is an example of indentation with and without this option enabled:
paste(x) paste(x)
} }
<
The code will be indented after lines that match the pattern
`'\(&\||\|+\|-\|\*\|/\|=\|\~\|%\|->\)\s*$'`. If you want indentation after
lines that match a different pattern, you should set the appropriate value of
`r_indent_op_pattern` in your |vimrc|.
SHELL *ft-sh-indent*
@ -1132,4 +1162,4 @@ indent for a continuation line, a line that starts with a backslash: >
Three times shiftwidth is the default value.
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -944,7 +944,7 @@ tag command note action in Visual mode ~
|v_i{| i{ same as iB
|v_i}| i} same as iB
|v_o| o move cursor to other corner of area
|v_r| r 2 delete highlighted area and start insert
|v_r| r 2 replace highlighted area with a character
|v_s| s 2 delete highlighted area and start insert
|v_u| u 2 make highlighted area lowercase
|v_v| v make Visual mode characterwise or stop
@ -1472,7 +1472,6 @@ tag command action ~
|:sfind| :sf[ind] split current window and edit file in 'path'
|:sfirst| :sfir[st] split window and go to first file in the
argument list
|:simalt| :sim[alt] Win32 GUI: simulate Windows ALT key
|:sign| :sig[n] manipulate signs
|:silent| :sil[ent] run a command silently
|:sleep| :sl[eep] do nothing for a few seconds
@ -1615,4 +1614,4 @@ tag command action ~
|:~| :~ repeat last ":substitute"
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -410,12 +410,12 @@ An example for using CTRL-G U: >
inoremap ( ()<C-G>U<Left>
This makes it possible to use the cursor keys in Insert mode, without breaking
the undo sequence and therefore using |.| (redo) will work as expected.
Also entering a text like (with the "(" mapping from above): >
the undo sequence and therefore using |.| (redo) will work as expected.
Also entering a text like (with the "(" mapping from above):
Lorem ipsum (dolor
will be repeatable by the |.|to the expected
will be repeatable by using |.| to the expected
Lorem ipsum (dolor)
@ -1026,13 +1026,13 @@ The function must return the column where the completion starts. It must be a
number between zero and the cursor column "col('.')". This involves looking
at the characters just before the cursor and including those characters that
could be part of the completed item. The text between this column and the
cursor column will be replaced with the matches.
cursor column will be replaced with the matches. If the returned value is
larger than the cursor column, the cursor column is used.
Special return values:
-1 If no completion can be done, the completion will be cancelled with an
error message.
-2 To cancel silently and stay in completion mode.
-3 To cancel silently and leave completion mode.
Negative return values:
-2 To cancel silently and stay in completion mode.
-3 To cancel silently and leave completion mode.
Another negative value: completion starts at the cursor column
On the second invocation the arguments are:
a:findstart 0
@ -1275,7 +1275,8 @@ it here: http://ctags.sourceforge.net/ Version 5.6 or later is recommended.
For version 5.5.4 you should add a patch that adds the "typename:" field:
ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch
A compiled .exe for MS-Windows can be found at:
http://georgevreilly.com/vim/ctags.html
http://ctags.sourceforge.net/
https://github.com/universal-ctags/ctags-win32
If you want to complete system functions you can do something like this. Use
ctags to generate a tags file for all the system header files: >
@ -1428,7 +1429,7 @@ automatically switch to HTML/CSS/JavaScript completion. Note: contrary to
original HTML files completion of tags (and only tags) isn't context aware.
RUBY *ft-ruby-omni* {Nvim}
RUBY *ft-ruby-omni*
NOTE: |compl-omni| for Ruby code requires |provider-ruby| to be installed.
@ -1507,15 +1508,15 @@ that begin with the filetype, "php", in this case. For example these syntax
groups are included by default with the PHP: phpEnvVar, phpIntVar,
phpFunctions.
If you wish non-filetype syntax items to also be included, you can use a
regular expression syntax (added in version 13.0 of autoload\syntaxcomplete.vim)
to add items. Looking at the output from ":syntax list" while editing a PHP file
I can see some of these entries: >
If you wish non-filetype syntax items to also be included, you can use a
regular expression syntax (added in version 13.0 of
autoload/syntaxcomplete.vim) to add items. Looking at the output from
":syntax list" while editing a PHP file I can see some of these entries: >
htmlArg,htmlTag,htmlTagName,javaScriptStatement,javaScriptGlobalObjects
To pick up any JavaScript and HTML keyword syntax groups while editing a PHP
file, you can use 3 different regexs, one for each language. Or you can
simply restrict the include groups to a particular value, without using
file, you can use 3 different regexs, one for each language. Or you can
simply restrict the include groups to a particular value, without using
a regex string: >
let g:omni_syntax_group_include_php = 'php\w\+,javaScript\w\+,html\w\+'
let g:omni_syntax_group_include_php = 'phpFunctions,phpMethods'
@ -1528,9 +1529,9 @@ highlight. These items will be available within the omni completion list.
Some people may find this list unwieldy or are only interested in certain
items. There are two ways to prune this list (if necessary). If you find
certain syntax groups you do not wish displayed you can use two different
methods to identify these groups. The first specifically lists the syntax
groups by name. The second uses a regular expression to identify both
certain syntax groups you do not wish displayed you can use two different
methods to identify these groups. The first specifically lists the syntax
groups by name. The second uses a regular expression to identify both
syntax groups. Simply add one the following to your vimrc: >
let g:omni_syntax_group_exclude_php = 'phpCoreConstant,phpConstant'
let g:omni_syntax_group_exclude_php = 'php\w*Constant'
@ -1553,22 +1554,22 @@ vimrc: >
For plugin developers, the plugin exposes a public function OmniSyntaxList.
This function can be used to request a List of syntax items. When editing a
SQL file (:e syntax.sql) you can use the ":syntax list" command to see the
SQL file (:e syntax.sql) you can use the ":syntax list" command to see the
various groups and syntax items. For example: >
syntax list
syntax list
Yields data similar to this: >
sqlOperator xxx some prior all like and any escape exists in is not
or intersect minus between distinct
links to Operator
sqlType xxx varbit varchar nvarchar bigint int uniqueidentifier
date money long tinyint unsigned xml text smalldate
double datetime nchar smallint numeric time bit char
varbinary binary smallmoney
image float integer timestamp real decimal
Yields data similar to this:
sqlOperator xxx some prior all like and any escape exists in is not ~
or intersect minus between distinct ~
links to Operator ~
sqlType xxx varbit varchar nvarchar bigint int uniqueidentifier ~
date money long tinyint unsigned xml text smalldate ~
double datetime nchar smallint numeric time bit char ~
varbinary binary smallmoney ~
image float integer timestamp real decimal ~
There are two syntax groups listed here: sqlOperator and sqlType. To retrieve
a List of syntax items you can call OmniSyntaxList a number of different
a List of syntax items you can call OmniSyntaxList a number of different
ways. To retrieve all syntax items regardless of syntax group: >
echo OmniSyntaxList( [] )
@ -1585,7 +1586,6 @@ From within a plugin, you would typically assign the output to a List: >
let myKeywords = []
let myKeywords = OmniSyntaxList( ['sqlKeyword'] )
SQL *ft-sql-omni*
@ -1972,4 +1972,4 @@ self explanatory. Using the long or the short version depends on the
[READ ERRORS] not all of the file could be read
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -1,7 +1,7 @@
*intro.txt* Nvim
VIM REFERENCE MANUAL by Bram Moolenaar
NVIM REFERENCE MANUAL
Introduction to Vim *ref* *reference*
@ -9,7 +9,7 @@ Introduction to Vim *ref* *reference*
Type |gO| to see the table of contents.
==============================================================================
1. Introduction *intro*
Introduction *intro*
Vim stands for Vi IMproved. It used to be Vi IMitation, but there are so many
improvements that a name change was appropriate. Vim is a text editor which
@ -28,8 +28,8 @@ is not located in the default place. You can jump to subjects like with tags:
Use CTRL-] to jump to a subject under the cursor, use CTRL-T to jump back.
*pronounce*
Vim is pronounced as one word, like Jim, not vi-ai-em. It's written with a
capital, since it's a name, again like Jim.
Vim is pronounced as one word, like Jim. Nvim is pronounced as N-vim, or,
continuing with the Jim simile, N-Jim, which sounds like Ninja.
This manual is a reference for all the Vim commands and options. This is not
an introduction to the use of Vi or Vim, it gets a bit complicated here and
@ -37,134 +37,67 @@ there. For beginners, there is a hands-on |tutor|. To learn using Vim, read
the user manual |usr_toc.txt|.
*book*
There are many books on Vi that contain a section for beginners. There are
two books I can recommend:
There are many books on Vi and Vim. We recommend these books:
"Practical Vim" by Drew Neil
"Modern Vim" by Drew Neil
https://vimcasts.org/publications/
"Practical Vim" is a popular because of its focus on quickly learning common
editing tasks with Vim. "Modern Vim" explores new features introduced by Nvim
and Vim 8.
"Vim - Vi Improved" by Steve Oualline
This is the very first book completely dedicated to Vim. It is very good for
beginners. The most often used commands are explained with pictures and
examples. The less often used commands are also explained, the more advanced
features are summarized. There is a comprehensive index and a quick
reference. Parts of this book have been included in the user manual
|frombook|.
Published by New Riders Publishing. ISBN: 0735710015
This is the first book dedicated to Vim. Parts of it were included in the
user manual. |frombook| ISBN: 0735710015
For more information try one of these:
http://iccf-holland.org/click5.html
http://www.vim.org/iccf/click5.html
"Learning the Vi editor" by Linda Lamb and Arnold Robbins
This is a book about Vi that includes a chapter on Vim (in the sixth edition).
The first steps in Vi are explained very well. The commands that Vim adds are
only briefly mentioned. There is also a German translation.
Published by O'Reilly. ISBN: 1-56592-426-6.
https://iccf-holland.org/click5.html
https://www.vim.org/iccf/click5.html
==============================================================================
2. Vim on the internet *internet*
Nvim on the interwebs *internet*
*www* *WWW* *faq* *FAQ* *distribution* *download*
The Vim pages contain the most recent information about Vim. They also
contain links to the most recent version of Vim. The FAQ is a list of
Frequently Asked Questions. Read this if you have problems.
Vim home page: http://www.vim.org/
Vim FAQ: http://vimdoc.sf.net/
Downloading: ftp://ftp.vim.org/pub/vim/MIRRORS
Usenet News group where Vim is discussed: *news* *usenet*
comp.editors
This group is also for other editors. If you write about Vim, don't forget to
mention that.
*mail-list* *maillist*
There are several mailing lists for Vim:
<vim@vim.org> *vim-use* *vim_use*
For discussions about using existing versions of Vim: Useful mappings,
questions, answers, where to get a specific version, etc. There are
quite a few people watching this list and answering questions, also
for beginners. Don't hesitate to ask your question here.
<vim-dev@vim.org> *vim-dev* *vim_dev* *vimdev*
For discussions about changing Vim: New features, porting, patches,
beta-test versions, etc.
<vim-announce@vim.org> *vim-announce* *vim_announce*
Announcements about new versions of Vim; also for beta-test versions
and ports to different systems. This is a read-only list.
<vim-mac@vim.org> *vim-mac* *vim_mac*
For discussions about using and improving the Macintosh version of
Vim.
See http://www.vim.org/maillist.php for the latest information.
NOTE:
- You can only send messages to these lists if you have subscribed!
- You need to send the messages from the same location as where you subscribed
from (to avoid spam mail).
- Maximum message size is 40000 characters.
*subscribe-maillist*
If you want to join, send a message to
<vim-subscribe@vim.org>
Make sure that your "From:" address is correct. Then the list server will
give you help on how to subscribe.
*maillist-archive*
For more information and archives look on the Vim maillist page:
http://www.vim.org/maillist.php
Nvim home page: https://neovim.io/
Nvim FAQ: https://github.com/neovim/neovim/wiki/FAQ
Downloads: https://github.com/neovim/neovim/releases
Vim FAQ: https://vimhelp.appspot.com/vim_faq.txt.html
Vim home page: https://www.vim.org/
Bug reports: *bugs* *bug-reports* *bugreport.vim*
Report bugs on GitHub: https://github.com/neovim/neovim/issues
Please be brief; all the time that is spent on answering mail is subtracted
from the time that is spent on improving Vim! Always give a reproducible
example and try to find out which settings or other things trigger the bug.
Be brief, yet complete. Always give a reproducible example and try to find
out which settings or other things trigger the bug.
Preferably start Vim with: >
vim --clean -u reproduce.vim
Where reproduce.vim is a script that reproduces the problem. Try different
machines, if relevant (is this an MS-Windows specific bug perhaps?).
Send me patches if you can!
It will help to include information about the version of Vim you are using and
your setup. You can get the information with this command: >
:so $VIMRUNTIME/bugreport.vim
This will create a file "bugreport.txt" in the current directory, with a lot
of information of your environment. Before sending this out, check if it
doesn't contain any confidential information!
If Vim crashes, please try to find out where. You can find help on this here:
|debug.txt|.
In case of doubt or when you wonder if the problem has already been fixed but
you can't find a fix for it, become a member of the vim-dev maillist and ask
your question there. |maillist|
*year-2000* *Y2K*
Since Vim internally doesn't use dates for editing, there is no year 2000
problem to worry about. Vim does use the time in the form of seconds since
January 1st 1970. It is used for a time-stamp check of the edited file and
the swap file, which is not critical and should only cause warning messages.
There might be a year 2038 problem, when the seconds don't fit in a 32 bit int
anymore. This depends on the compiler, libraries and operating system.
Specifically, time_t and the ctime() function are used. And the time_t is
stored in four bytes in the swap file. But that's only used for printing a
file date/time for recovery, it will never affect normal editing.
The Vim strftime() function directly uses the strftime() system function.
localtime() uses the time() system function. getftime() uses the time
returned by the stat() system function. If your system libraries are year
2000 compliant, Vim is too.
The user may create scripts for Vim that use external commands. These might
introduce Y2K problems, but those are not really part of Vim itself.
If Nvim crashes, try to get a backtrace. See |debug.txt|.
==============================================================================
3. Credits *credits* *author* *Bram* *Moolenaar*
Sponsor Vim/Nvim development *sponsor* *register*
Fixing bugs and adding new features takes a lot of time and effort. To show
your appreciation for the work and motivate Bram and others to continue
working on Vim please send a donation.
Since Bram is back to a paid job the money will now be used to help children
in Uganda. See |uganda|. But at the same time donations increase Bram's
motivation to keep working on Vim!
For the most recent information about sponsoring look on the Vim web site:
https://www.vim.org/sponsor/
Neovim development is funded separately from Vim:
https://neovim.io/#sponsor
==============================================================================
Credits *credits* *author* *Bram* *Moolenaar*
Most of Vim was written by Bram Moolenaar <Bram@vim.org>.
@ -273,7 +206,7 @@ Elvis Another Vi clone, made by Steve Kirkendall. Very compact but isn't
freely available.
==============================================================================
4. Notation *notation*
Notation *notation*
When syntax highlighting is used to read this, text that is not typed
literally is often highlighted with the Special group. These are items in [],
@ -439,7 +372,7 @@ notation meaning equivalent decimal value(s) ~
<k0> - <k9> keypad 0 to 9 *keypad-0* *keypad-9*
<S-...> shift-key *shift* *<S-*
<C-...> control-key *control* *ctrl* *<C-*
<M-...> alt-key or meta-key *META* *meta* *alt* *<M-*
<M-...> alt-key or meta-key *META* *ALT* *<M-*
<A-...> same as <M-...> *<A-*
<D-...> command-key or "super" key *<D-*
-----------------------------------------------------------------------
@ -494,7 +427,7 @@ examples and use them directly. Or type them literally, including the '<' and
":autocmd"!
==============================================================================
5. Modes, introduction *vim-modes-intro* *vim-modes*
Modes, introduction *vim-modes-intro* *vim-modes*
Vim has seven BASIC modes:
@ -559,9 +492,9 @@ Virtual Replace mode Virtual Replace mode is similar to Replace mode, but
If the 'showmode' option is on "-- VREPLACE --" is
shown at the bottom of the window.
Insert Normal mode Entered when CTRL-O given in Insert mode. This is
like Normal mode, but after executing one command Vim
returns to Insert mode.
Insert Normal mode Entered when CTRL-O is typed in Insert mode (see
|i_CTRL-O|). This is like Normal mode, but after
executing one command Vim returns to Insert mode.
If the 'showmode' option is on "-- (insert) --" is
shown at the bottom of the window.
@ -579,7 +512,7 @@ Insert Select mode Entered when starting Select mode from Insert mode.
is shown at the bottom of the window.
==============================================================================
6. Switching from mode to mode *mode-switching*
Switching from mode to mode *mode-switching*
If for any reason you do not know which mode you are in, you can always get
back to Normal mode by typing <Esc> twice. This doesn't work for Ex mode
@ -642,28 +575,15 @@ The command CTRL-\ CTRL-G or <C-\><C-G> can be used to go to Insert mode when
make sure Vim is in the mode indicated by 'insertmode', without knowing in
what mode Vim currently is.
*Q* *mode-Ex* *Ex-mode* *Ex* *EX* *E501*
Q Switch to "Ex" mode. This is a bit like typing ":"
commands one after another, except:
*gQ* *Q* *mode-Ex* *Ex-mode* *Ex* *EX* *E501*
Q or gQ Switch to Ex mode. This is like typing ":" commands
one after another, except:
- You don't have to keep pressing ":".
- The screen doesn't get updated after each command.
- There is no normal command-line editing.
- Mappings and abbreviations are not used.
In fact, you are editing the lines with the "standard"
line-input editing commands (<Del> or <BS> to erase,
CTRL-U to kill the whole line).
Vim will enter this mode by default if it's invoked as
"ex" on the command-line.
Use the ":vi" command |:visual| to exit "Ex" mode.
*gQ*
gQ Switch to "Ex" mode like with "Q", but really behave
like typing ":" commands after another. All command
line editing, completion etc. is available.
Use the ":vi" command |:visual| to exit "Ex" mode.
Use the ":vi" command |:visual| to exit this mode.
==============================================================================
7. The window contents *window-contents*
The window contents *window-contents*
In Normal mode and Insert/Replace mode the screen window will show the current
contents of the buffer: What You See Is What You Get. There are two
@ -782,18 +702,15 @@ window. You may make the window as small as you like, but if it gets too
small not a single line will fit in it. Make it at least 40 characters wide
to be able to read most messages on the last line.
On most Unix systems, resizing the window is recognized and handled correctly
by Vim.
==============================================================================
8. Definitions *definitions*
Definitions *definitions* *jargon*
buffer Contains lines of text, usually read from a file.
screen The whole area that Vim uses to work in. This can be
a terminal emulator window. Also called "the Vim
window".
buffer Contains lines of text, usually from a file.
screen The whole area that Nvim uses to display things.
window A view on a buffer. There can be multiple windows for
one buffer.
frame Windows are kept in a tree of frames. Each frame
contains a column, row, or window ("leaf" frame).
A screen contains one or more windows, separated by status lines and with the
command line at the bottom.
@ -826,7 +743,7 @@ A difference is made between four types of lines:
lines with wrapping, line breaks, etc. applied. They
can only be as long as the width of the window allows,
longer lines are wrapped or truncated.
screen lines The lines of the screen that Vim uses. Consists of
screen lines The lines of the screen that Nvim uses. Consists of
the window lines of all windows, with status lines
and the command line added. They can only be as long
as the width of the screen allows. When the command
@ -850,5 +767,27 @@ buffer lines logical lines window lines screen lines ~
5. ddd 13. (command line)
6. ~
API client ~
All external UIs and remote plugins (as opposed to regular Vim plugins) are
"clients" in general; but we call something an "API client" if its purpose is
to abstract or wrap the RPC API for the convenience of other applications
(just like a REST client or SDK such as boto3 for AWS: you can speak AWS REST
using an HTTP client like curl, but boto3 wraps that in a convenient python
interface). For example, the Nvim lua-client is an API client:
https://github.com/neovim/lua-client
Host ~
A plugin "host" is both a client (of the Nvim API) and a server (of an
external platform, e.g. python). It is a remote plugin that hosts other
plugins.
Remote plugin ~
Arbitrary code registered via |:UpdateRemotePlugins|, that runs in a separate
process and communicates with Nvim via the |api|.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -16,12 +16,14 @@ Concepts
Job Id *job-id*
When a job starts it is assigned a number, unique for the life of the current
Nvim session. Functions like |jobstart()| return job ids. Functions like
Each job is identified by an integer id, unique for the life of the current
Nvim session. Each job-id is a valid |channel-id|: they share the same "key
space". Functions like |jobstart()| return job ids; functions like
|jobsend()|, |jobstop()|, |rpcnotify()|, and |rpcrequest()| take job ids.
The job's stdio streams are represented as a |channel|. It is possible to send
and recieve raw bytes, or use |msgpack-rpc|.
Job stdio streams form a |channel| which can send and receive raw bytes or
|msgpack-rpc| messages.
==============================================================================
Usage *job-control-usage*

View File

@ -135,11 +135,11 @@ NR == 1 { nf=split(FILENAME,f,".")
# common case - Latin1
print "<META HTTP-EQUIV=\"Content-type\" content=\"text/html; charset=ISO-8859-1\">";
}
print "<TITLE>Vim documentation: " f[1] "</TITLE>";
print "<TITLE>Nvim documentation: " f[1] "</TITLE>";
print "</HEAD>";
print "<BODY BGCOLOR=\"#ffffff\">";
print "<H1>Vim documentation: " f[1] "</H1>";
print "<H1>Nvim documentation: " f[1] "</H1>";
print "<A NAME=\"top\"></A>";
if ( FILENAME != "help.txt" ) {
print "<A HREF=\"index.html\">main help file</A>\n";

View File

@ -286,6 +286,9 @@ current mode (instead of always going to normal-mode). Visual-mode is
preserved, so tricks with |gv| are not needed. Commands can be invoked
directly in cmdline-mode (which otherwise would require timer hacks).
Because <Cmd> avoids mode-changes (unlike ":") it does not trigger
|CmdlineEnter| and |CmdlineLeave| events. This helps performance.
Unlike <expr> mappings, there are no special restrictions on the <Cmd>
command: it is executed as if an (unrestricted) |autocmd| was invoked or an
async event event was processed.
@ -371,8 +374,9 @@ several modes. In Vim you can use the ":nmap", ":vmap", ":omap", ":cmap" and
*omap-info*
Operator-pending mappings can be used to define a movement command that can be
used with any operator. Simple example: ":omap { w" makes "y{" work like "yw"
and "d{" like "dw".
used with any operator. Simple example: >
:omap { w
makes "y{" work like "yw" and "d{" like "dw".
To ignore the starting cursor position and select different text, you can have
the omap start Visual mode to select the text to be operated upon. Example
@ -383,9 +387,11 @@ Normal mode commands find the first '(' character and select the first word
before it. That usually is the function name.
To enter a mapping for Normal and Visual mode, but not Operator-pending mode,
first define it for all three modes, then unmap it for Operator-pending mode:
first define it for all three modes, then unmap it for
Operator-pending mode: >
:map xx something-difficult
:ounmap xx
Likewise for a mapping for Visual and Operator-pending mode or Normal and
Operator-pending mode.
@ -866,7 +872,9 @@ an additional rule:
full-id In front of the match is a non-keyword character, or this is where
the line or insertion starts. Exception: When the abbreviation is
only one character, it is not recognized if there is a non-keyword
character in front of it, other than a space or a tab.
character in front of it, other than a space or a tab. However, for
the command line "'<,'>" (or any other marks) is ignored, as if the
command line starts after it.
end-id In front of the match is a keyword character, or a space or a tab,
or this is where the line or insertion starts.
@ -1208,6 +1216,7 @@ By default, the arguments of user defined commands do not undergo completion.
However, by specifying one or the other of the following attributes, argument
completion can be enabled:
-complete=arglist file names in argument list
-complete=augroup autocmd groups
-complete=buffer buffer names
-complete=behave :behave suboptions
@ -1227,6 +1236,7 @@ completion can be enabled:
-complete=highlight highlight groups
-complete=history :history suboptions
-complete=locale locale names (as output of locale -a)
-complete=mapclear buffer argument
-complete=mapping mapping name
-complete=menu menus
-complete=messages |:messages| suboptions
@ -1363,6 +1373,8 @@ The valid escape sequences are
<line1> The starting line of the command range.
*<line2>*
<line2> The final line of the command range.
*<range>*
<range> The number of items in the command range: 0, 1 or 2
*<count>*
<count> Any count supplied (as described for the '-range'
and '-count' attributes).
@ -1483,4 +1495,4 @@ local to the script and use mappings local to the script. When the user
invokes the user command, it will run in the context of the script it was
defined in. This matters if |<SID>| is used in a command.
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -1059,8 +1059,7 @@ widespread as file format.
A composing or combining character is used to change the meaning of the
character before it. The combining characters are drawn on top of the
preceding character.
Up to two combining characters can be used by default. This can be changed
with the 'maxcombine' option.
Up to six combining characters can be displayed.
When editing text a composing character is mostly considered part of the
preceding character. For example "x" will delete a character and its
following composing characters by default.
@ -1186,4 +1185,4 @@ Contributions specifically for the multi-byte features by:
Taro Muraoka <koron@tka.att.ne.jp>
Yasuhiro Matsumoto <mattn@mail.goo.ne.jp>
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -69,7 +69,7 @@ See `:messages` above.
LIST OF MESSAGES
*E222* *E228* *E232* *E256* *E293* *E298* *E304* *E317*
*E318* *E356* *E438* *E439* *E440* *E316* *E320* *E322*
*E323* *E341* *E473* *E570* *E685* >
*E323* *E341* *E473* *E570* *E685* *E950* >
Add to read buffer
makemap: Illegal mode
Cannot create BalloonEval with both message and callback
@ -90,6 +90,7 @@ LIST OF MESSAGES
Internal error
Internal error: {function}
fatal error in cs_manage_matches
Invalid count for del_bytes(): {N}
This is an internal error. If you can reproduce it, please send in a bug
report. |bugs|
@ -513,15 +514,6 @@ command. The script can then again read another script. This can continue
for about 14 levels. When more nesting is done, Vim assumes that there is a
recursive loop somewhere and stops with this error message.
*E319* >
The command is not available in this version
You have used a command that is not present in the version of Vim you are
using. When compiling Vim, many different features can be enabled or
disabled. This depends on how big Vim has chosen to be and the operating
system. See |+feature-list| for when which feature is available. The
|:version| command shows which feature Vim was compiled with.
*E300* >
Swap file already exists (symlink attack?)
@ -843,4 +835,4 @@ The |g<| command can be used to see the last page of previous command output.
This is especially useful if you accidentally typed <Space> at the hit-enter
prompt.
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -203,4 +203,4 @@ a message adapt to language preferences of the user, >
:endif
<
vim:tw=78:sw=4:ts=8:ft=help:norl:
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:

View File

@ -986,12 +986,13 @@ These commands are not marks themselves, but jump to a mark:
==============================================================================
8. Jumps *jump-motions*
A "jump" is one of the following commands: "'", "`", "G", "/", "?", "n",
"N", "%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and
the commands that start editing a new file. If you make the cursor "jump"
with one of these commands, the position of the cursor before the jump is
A "jump" is a command that normally moves the cursor several lines away. If
you make the cursor "jump" the position of the cursor before the jump is
remembered. You can return to that position with the "''" and "``" command,
unless the line containing that position was changed or deleted.
unless the line containing that position was changed or deleted. The
following commands are "jump" commands: "'", "`", "G", "/", "?", "n", "N",
"%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and the
commands that start editing a new file.
*CTRL-O*
CTRL-O Go to [count] Older cursor position in jump list
@ -1117,7 +1118,7 @@ remembered.
*:changes*
:changes Print the change list. A ">" character indicates the
current position. Just after a change it is below the
newest entry, indicating that "g;" takes you to the
newest entry, indicating that `g;` takes you to the
newest entry position. The first column indicates the
count needed to take you to this position. Example:
@ -1127,8 +1128,8 @@ remembered.
1 14 54 the latest changed line
>
The "3g;" command takes you to line 9. Then the
output of ":changes is:
The `3g;` command takes you to line 9. Then the
output of `:changes` is:
change line col text ~
> 0 9 8 bla bla bla
@ -1271,7 +1272,10 @@ the current line is included. You can then use "%" to go to the matching line.
H To line [count] from top (Home) of window (default:
first line on the window) on the first non-blank
character |linewise|. See also 'startofline' option.
Cursor is adjusted for 'scrolloff' option.
Cursor is adjusted for 'scrolloff' option, unless an
operator is pending, in which case the text may
scroll. E.g. "yH" yanks from the first visible line
until the cursor line (inclusive).
*M*
M To Middle line of window, on the first non-blank
@ -1281,11 +1285,14 @@ M To Middle line of window, on the first non-blank
L To line [count] from bottom of window (default: Last
line on the window) on the first non-blank character
|linewise|. See also 'startofline' option.
Cursor is adjusted for 'scrolloff' option.
Cursor is adjusted for 'scrolloff' option, unless an
operator is pending, in which case the text may
scroll. E.g. "yL" yanks from the cursor to the last
visible line.
<LeftMouse> Moves to the position on the screen where the mouse
click is |exclusive|. See also |<LeftMouse>|. If the
position is in a status line, that window is made the
active window and the cursor is not moved.
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -61,18 +61,15 @@ To get a formatted dump of the API using python (requires the `pyyaml` and
3. Connecting *rpc-connecting*
See |channel-intro|, for various ways to open a channel. Most of the channel
opening functions take an `rpc` key in the options dictionary, to enable rpc.
opening functions take an `rpc` key in the options dictionary, to enable RPC.
Additionally, rpc channels can be opened by other processes connecting to
Additionally, RPC channels can be opened by other processes connecting to
TCP/IP sockets or named pipes listened to by nvim.
An rpc socket is automatically created with each instance. The socket
location is stored in |v:servername|. By default this is a named pipe
with an automatically generated address. See |XXX|.
To make Nvim listen on a TCP/IP socket instead, specify |--listen|: >
Nvim creates a default RPC socket at |startup|, given by |v:servername|. To
start with a TCP/IP socket instead, use |--listen| with a TCP-style address: >
nvim --listen 127.0.0.1:6666
<Also, more sockets and named pipes can be listened on using |serverstart()|.
Additional sockets and named pipes can be started with |serverstart()|.
Note that localhost TCP sockets are generally less secure than named pipes,
and can lead to vunerabilities like remote code execution.

View File

@ -8,7 +8,9 @@ Nvim *nvim* *nvim-intro*
Nvim is based on Vim by Bram Moolenaar.
If you are new to Vim see |help.txt|, or type ":Tutor".
If you are new to Vim, try the 30-minute tutorial: >
:Tutor<Enter>
If you already use Vim see |nvim-from-vim| for a quickstart.
Nvim is emphatically a fork of Vim, not a clone: compatibility with Vim is
@ -20,29 +22,24 @@ differences from Vim.
==============================================================================
Transitioning from Vim *nvim-from-vim*
To start the transition, create init.vim in the correct directory for your
platform.
1. To start the transition, create your |init.vim| (user config) file: >
For Linux, macOS and other Unixes, create the file at ~/.config/nvim/init.vim.
:call mkdir(stdpath('config'), 'p')
:exe 'edit '.stdpath('config').'/init.vim'
For Windows, create the file at %LOCALAPPDATA%\nvim\init.vim. `%LOCALAPPDATA%`
usually expands to `C:\Users\<username>\AppData\Local`.
2. Add these contents to the file: >
Note: If your system sets `$XDG_CONFIG_HOME`, use that instead of `~/.config`
or `%LOCALAPPDATA%` in the paths above. Nvim follows the XDG |base-directories|
convention.
Next, add these contents to the file:
>
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc
<
3. Restart Nvim, your existing Vim config will be loaded.
See |provider-python| and |provider-clipboard| for additional software you
might need to use some features.
Your Vim configuration might not be entirely compatible with Nvim. For a
full list of differences between Vim and Nvim see |vim-differences|.
Your Vim configuration might not be entirely Nvim-compatible.
See |vim-differences| for the full list of changes.
The |'ttymouse'| option, for example, was removed from Nvim (mouse support
should work without it). If you use the same |vimrc| for Vim and Nvim,

File diff suppressed because it is too large Load Diff

View File

@ -282,6 +282,14 @@ the "#" is under your left hand middle finger (search to the left and up) and
the "*" is under your right hand middle finger (search to the right and down).
(this depends on your keyboard layout though).
*E956*
In very rare cases a regular expression is used recursively. This can happen
when executing a pattern takes a long time and when checkig for messages on
channels a callback is invoked that also uses a pattern or an autocommand is
triggered. In most cases this should be fine, but if a pattern is in use when
it's used again it fails. Usually this means there is something wrong with
the pattern.
==============================================================================
2. The definition of a pattern *search-pattern* *pattern* *[pattern]*
*regular-expression* *regexp* *Pattern*
@ -888,7 +896,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
becomes invalid. Vim doesn't automatically update the matches.
Similar to moving the cursor for "\%#" |/\%#|.
*/\%l* */\%>l* */\%<l*
*/\%l* */\%>l* */\%<l* *E951*
\%23l Matches in a specific line.
\%<23l Matches above a specific line (lower line number).
\%>23l Matches below a specific line (higher line number).
@ -1148,7 +1156,8 @@ x A single character, with no special meaning, matches itself
- Matching with a collection can be slow, because each character in
the text has to be compared with each character in the collection.
Use one of the other atoms above when possible. Example: "\d" is
much faster than "[0-9]" and matches the same characters.
much faster than "[0-9]" and matches the same characters. However,
the new |NFA| regexp engine deals with this better than the old one.
*/\%[]* *E69* *E70* *E369*
\%[] A sequence of optionally matched atoms. This always matches.
@ -1390,4 +1399,4 @@ Finally, these constructs are unique to Perl:
":2match" for another plugin.
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -38,4 +38,4 @@ compression. Thus editing the patchmode file will not give you the automatic
decompression. You have to rename the file if you want this.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -1,4 +1,4 @@
*pi_msgpack.txt* Nvim
*pi_msgpack.txt* msgpack utilities
Author: Nikolay Pavlov <kp-pav@yandex.ru>
Copyright: (c) 2015 by Nikolay Pavlov
@ -49,7 +49,7 @@ does not check whether argument matches its description.
*{msgpack-value}* Either |msgpack-special-dict| or a regular value, but
not function reference.
*{msgpack-integer}* Any value for which |msgpack#type| will return
*{msgpack-integer}* Any value for which |msgpack#type()| will return
"integer".
*{msgpack-special-int}* |msgpack-special-dict| representing integer.

View File

@ -3719,8 +3719,6 @@ netrw:
or
http://vim.sourceforge.net/scripts/script.php?script_id=120
Decho.vim is provided as a "vimball"; see |vimball-intro|.
2. Edit the <netrw.vim> file by typing: >
vim netrw.vim
@ -4100,4 +4098,4 @@ netrw:
==============================================================================
Modelines: {{{1
vim:tw=78:ts=8:ft=help:norl:fdm=marker
vim:tw=78:ts=8:noet:ft=help:norl:fdm=marker

View File

@ -56,4 +56,4 @@ used. This plugin also helps to skip matches in comments. This is unrelated
to the matchparen highlighting, they use a different mechanism.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -108,4 +108,4 @@ If you don't like the release updating feature and don't want to answer
Good luck!!
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -148,4 +148,4 @@ Copyright 2005-2012: *tar-copyright*
v1 (original) * Michael Toren (see http://michael.toren.net/code/)
==============================================================================
vim:tw=78:ts=8:ft=help
vim:tw=78:ts=8:noet:ft=help

View File

@ -149,4 +149,4 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing
==============================================================================
vim:tw=78:ts=8:ft=help:fdm=marker
vim:tw=78:ts=8:noet:ft=help:fdm=marker

View File

@ -36,6 +36,8 @@ Note: If you have problems printing with |:hardcopy|, an alternative is to use
'printexpr' through |v:cmdarg|. Otherwise [arguments]
is ignored. 'printoptions' can be used to specify
paper size, duplex, etc.
Note: If you want PDF, there are tools such as
"ps2pdf" that can convert the PostScript to PDF.
:[range]ha[rdcopy][!] >{filename}
As above, but write the resulting PostScript in file
@ -729,4 +731,4 @@ to adjust the number of lines before a formfeed character to prevent
accidental blank pages.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -4,55 +4,60 @@
NVIM REFERENCE MANUAL by Thiago de Arruda
Providers *provider*
Providers *provider*
Nvim delegates some features to dynamic "providers".
Nvim delegates some features to dynamic "providers". This document describes
the providers and how to install them.
*E319*
Use of a feature requiring a missing provider is an error: >
E319: No "foo" provider found. Run ":checkhealth provider"
Run the |:checkhealth| command, and review the sections below.
Type |gO| to see the table of contents.
==============================================================================
Python integration *provider-python*
Python integration *provider-python*
Nvim supports the Vim legacy |python-vim| and |python3| interfaces via
external Python interpreters connected via |RPC|.
Nvim supports Python |remote-plugin|s and the Vim legacy |python2| and
|python3| interfaces (which are implemented as remote-plugins).
Note: Only the Vim 7.3 API is supported; bindeval (Vim 7.4) is not.
PYTHON QUICKSTART ~
If you used a package manager to install Nvim, you might already have the
required `neovim` Python package. Run |:checkhealth| to verify.
Install the "pynvim" Python package:
Following are steps to install the package with Python `pip`.
- Run |:checkhealth| to see if you already have the package (some package
managers install the "pynvim" Python package with Nvim itself).
- For Python 2 plugins, make sure Python 2.7 is available in your $PATH, then
install the package systemwide: >
sudo pip2 install --upgrade pynvim
< or for the current user: >
pip2 install --user --upgrade pynvim
< If "pip2" is missing, try "pip".
- For Python 3 plugins, make sure Python 3.4+ is available in your $PATH, then
install the package systemwide: >
sudo pip3 install --upgrade pynvim
< or for the current user: >
pip3 install --user --upgrade pynvim
< If "pip3" is missing, try "pip".
- For Python 2 plugins, make sure Python 2.7 is available in your `$PATH`,
then install the `neovim` Python package systemwide: >
sudo pip2 install --upgrade neovim
<
or for the current user: >
pip2 install --user --upgrade neovim
<
- For Python 3 plugins, make sure Python 3.4+ is available in your `$PATH`,
then install the `neovim` Python package systemwide: >
sudo pip3 install --upgrade neovim
<
or for the current user: >
pip3 install --user --upgrade neovim
<
Note: `pip` may refer to Python 2 or Python 3, so the instructions mention
`pip2` or `pip3` explicitly. If one is missing, try `pip`.
Note: The `--upgrade` flag ensures you have the latest version even if
a previous version was already installed.
- The `--upgrade` flag ensures you have the latest version even if a previous
version was already installed.
PYTHON PROVIDER CONFIGURATION ~
*g:python_host_prog*
Path to Python 2 interpreter. Setting this makes startup faster. Also useful
for working with virtualenvs. >
let g:python_host_prog = '/path/to/python' " Python 2
<
*g:python3_host_prog*
Program to use for evaluating Python code. Setting this makes startup faster.
Also useful for working with virtualenvs. >
let g:python_host_prog = '/path/to/python'
let g:python3_host_prog = '/path/to/python3'
Path to Python 3 interpreter. Setting this makes startup faster. Also useful
for working with virtualenvs. >
let g:python3_host_prog = '/path/to/python3' " Python 3
<
*g:loaded_python_provider*
To disable Python 2 support: >
@ -64,74 +69,74 @@ To disable Python 3 support: >
PYTHON VIRTUALENVS ~
If you plan to use per-project virtualenvs often, you should assign
a virtualenv for Neovim and hard-code the interpreter path via
|g:python_host_prog| (or |g:python3_host_prog|) so that the "neovim" python
package is not required for each Environment. Example using pyenv: >
If you plan to use per-project virtualenvs often, you should assign one
virtualenv for Neovim and hard-code the interpreter path via
|g:python3_host_prog| (or |g:python_host_prog|) so that the "pynvim" package
is not required for each virtualenv.
Example using pyenv: >
pyenv install 3.4.4
pyenv virtualenv 3.4.4 py3neovim
pyenv activate py3neovim
pip install neovim
pyenv virtualenv 3.4.4 py3nvim
pyenv activate py3nvim
pip install pynvim
pyenv which python # Note the path
The last command reports the interpreter path, add it to your init.vim: >
let g:python3_host_prog = '/path/to/py3nvim/bin/python'
The last command reports the interpreter path. Add it to your init.vim: >
let g:python3_host_prog = '/full/path/to/py3neovim/bin/python'
More information:
https://github.com/zchee/deoplete-jedi/wiki/Setting-up-Python-for-Neovim
See also: https://github.com/zchee/deoplete-jedi/wiki/Setting-up-Python-for-Neovim
==============================================================================
Ruby integration *provider-ruby*
Nvim supports the Vim legacy |ruby-vim| interface via external Ruby
interpreters connected via |RPC|.
Run |:checkhealth| to see if your system is up-to-date.
Nvim supports Ruby |remote-plugin|s and the Vim legacy |ruby-vim| interface
(which is itself implemented as a Nvim remote-plugin).
RUBY QUICKSTART ~
To use Vim Ruby plugins with Nvim, just install the latest `neovim` RubyGem: >
To use Ruby plugins with Nvim, install the latest "neovim" RubyGem: >
gem install neovim
Run |:checkhealth| to see if your system is up-to-date.
RUBY PROVIDER CONFIGURATION ~
*g:loaded_ruby_provider*
To disable Ruby support: >
let g:loaded_ruby_provider = 1
<
*g:ruby_host_prog*
Command to start the Ruby host. By default this is `neovim-ruby-host`. For users
who use per-project Ruby versions with tools like RVM or rbenv, setting this can
prevent the need to install the `neovim` gem in every project.
Command to start the Ruby host. By default this is "neovim-ruby-host". With
project-local Ruby versions (via tools like RVM or rbenv) setting this can
avoid the need to install the "neovim" gem in every project.
To use an absolute path (e.g. to an rbenv installation): >
let g:ruby_host_prog = '~/.rbenv/versions/2.4.1/bin/neovim-ruby-host'
<
To use the RVM "system" Ruby installation: >
let g:ruby_host_prog = 'rvm system do neovim-ruby-host'
<
==============================================================================
Node.js integration *provider-nodejs*
Nvim supports Node.js |remote-plugin|s.
https://github.com/neovim/node-client/
https://nodejs.org/
NODEJS QUICKSTART~
To use javascript remote-plugins with Nvim, install the `neovim` npm package: >
To use javascript remote-plugins with Nvim, install the "neovim" npm package: >
npm install -g neovim
<
Run |:checkhealth| to see if your system is up-to-date.
NODEJS PROVIDER CONFIGURATION~
*g:loaded_node_provider*
To disable Node support: >
To disable Node.js support: >
:let g:loaded_node_provider = 1
<
*g:node_host_prog*
Command to start the Node host. Setting this makes startup faster.
Command to start the Node.js host. Setting this makes startup faster.
By default, Nvim searches for `neovim-node-host` using "npm root -g", which
can be slow. To avoid this, set g:node_host_prog to an absolute path: >
By default, Nvim searches for "neovim-node-host" using "npm root -g", which
can be slow. To avoid this, set g:node_host_prog to the host path: >
let g:node_host_prog = '/usr/local/bin/neovim-node-host'
<
==============================================================================
@ -143,9 +148,8 @@ system clipboard or any other clipboard "backend".
To ALWAYS use the clipboard for ALL operations (instead of interacting with
the '+' and/or '*' registers explicitly): >
set clipboard+=unnamedplus
<
See 'clipboard' for details and options.
*clipboard-tool*
@ -153,16 +157,19 @@ The presence of a working clipboard tool implicitly enables the '+' and '*'
registers. Nvim looks for these clipboard tools, in order of priority:
- |g:clipboard|
- pbcopy/pbpaste (macOS)
- xsel (if $DISPLAY is set)
- pbcopy, pbpaste (macOS)
- wl-copy, wl-paste (if $WAYLAND_DISPLAY is set)
- xclip (if $DISPLAY is set)
- xsel (if $DISPLAY is set)
- lemonade (for SSH) https://github.com/pocke/lemonade
- doitclient (for SSH) http://www.chiark.greenend.org.uk/~sgtatham/doit/
- win32yank (Windows)
- tmux (if $TMUX is set)
*g:clipboard*
To configure a custom clipboard tool, set `g:clipboard` to a dictionary: >
To configure a custom clipboard tool, set g:clipboard to a dictionary.
For example this configuration integrates the tmux clipboard: >
let g:clipboard = {
\ 'name': 'myClipboard',
\ 'copy': {
@ -176,9 +183,28 @@ To configure a custom clipboard tool, set `g:clipboard` to a dictionary: >
\ 'cache_enabled': 1,
\ }
If `cache_enabled` is |TRUE| then when a selection is copied, Nvim will cache
If "cache_enabled" is |TRUE| then when a selection is copied Nvim will cache
the selection until the copy command process dies. When pasting, if the copy
process has not died, the cached selection is applied.
process has not died the cached selection is applied.
g:clipboard can also use functions (see |lambda|) instead of strings.
For example this configuration uses the g:foo variable as a fake clipboard: >
let g:clipboard = {
\ 'name': 'myClipboard',
\ 'copy': {
\ '+': {lines, regtype -> extend(g:, {'foo': [lines, regtype]}) },
\ '*': {lines, regtype -> extend(g:, {'foo': [lines, regtype]}) },
\ },
\ 'paste': {
\ '+': {-> get(g:, 'foo', [])},
\ '*': {-> get(g:, 'foo', [])},
\ },
\ }
The "copy" function stores a list of lines and the register type. The "paste"
function returns the clipboard as a `[lines, regtype]` list, where `lines` is
a list of lines and `regtype` is a register type conforming to |setreg()|.
==============================================================================
X11 selection mechanism *clipboard-x11* *x11-selection*
@ -189,15 +215,15 @@ The contents of selections are held by the originating application (e.g., upon
a copy), and only passed to another application when that other application
requests them (e.g., upon a paste).
*quoteplus* *quote+*
*primary-selection* *quotestar* *quoteplus* *quote+*
There are three documented X11 selections: `PRIMARY`, `SECONDARY`, and `CLIPBOARD`.
`CLIPBOARD` is typically used in X11 applications for copy/paste operations
(`Ctrl-c`/`v`), while `PRIMARY` is used for the last selected text, which is
There are three documented X11 selections: PRIMARY, SECONDARY, and CLIPBOARD.
CLIPBOARD is typically used in X11 applications for copy/paste operations
(CTRL-c/CTRL-v), while PRIMARY is used for the last selected text, which is
generally inserted with the middle mouse button.
Nvim's X11 clipboard providers only utilize the `PRIMARY` and `CLIPBOARD`
selections, used for the '*' and '+' registers, respectively.
Nvim's X11 clipboard providers only use the PRIMARY and CLIPBOARD selections,
for the "*" and "+" registers, respectively.
==============================================================================
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -33,7 +33,7 @@ compiler (see |errorformat| below).
*quickfix-ID*
Each quickfix list has a unique identifier called the quickfix ID and this
number will not change within a Vim session. The getqflist() function can be
number will not change within a Vim session. The |getqflist()| function can be
used to get the identifier assigned to a list. There is also a quickfix list
number which may change whenever more than ten lists are added to a quickfix
stack.
@ -51,6 +51,14 @@ When a window with a location list is split, the new window gets a copy of the
location list. When there are no longer any references to a location list,
the location list is destroyed.
*quickfix-changedtick*
Every quickfix and location list has a read-only changedtick variable that
tracks the total number of changes made to the list. Every time the quickfix
list is modified, this count is incremented. This can be used to perform an
action only when the list has changed. The |getqflist()| and |getloclist()|
functions can be used to query the current value of changedtick. You cannot
change the changedtick variable.
The following quickfix commands can be used. The location list commands are
similar to the quickfix commands, replacing the 'c' prefix in the quickfix
command with 'l'.
@ -281,6 +289,10 @@ processing a quickfix or location list command, it will be aborted.
from the last error backwards, -1 being the last error.
The 'switchbuf' settings are respected when jumping
to a buffer.
The |:filter| command can be used to display only the
quickfix entries matching a supplied pattern. The
pattern is matched against the filename, module name,
pattern and text of the entry.
:cl[ist] +{count} List the current and next {count} valid errors. This
is similar to ":clist from from+count", where "from"
@ -299,8 +311,7 @@ processing a quickfix or location list command, it will be aborted.
8386: ^ ~
8387: symbol: method Fmainx() ~
*:lli* *:llist*
:lli[st] [from] [, [to]]
:lli[st] [from] [, [to]] *:lli* *:llist*
Same as ":clist", except the location list for the
current window is used instead of the quickfix list.
@ -333,6 +344,51 @@ use this code: >
au QuickfixCmdPost make call QfMakeConv()
Another option is using 'makeencoding'.
*quickfix-title*
Every quickfix and location list has a title. By default the title is set to
the command that created the list. The |getqflist()| and |getloclist()|
functions can be used to get the title of a quickfix and a location list
respectively. The |setqflist()| and |setloclist()| functions can be used to
modify the title of a quickfix and location list respectively. Examples: >
call setqflist([], 'a', {'title' : 'Cmd output'})
echo getqflist({'title' : 1})
call setloclist(3, [], 'a', {'title' : 'Cmd output'})
echo getloclist(3, {'title' : 1})
<
*quickfix-size*
You can get the number of entries (size) in a quickfix and a location list
using the |getqflist()| and |getloclist()| functions respectively. Examples: >
echo getqflist({'size' : 1})
echo getloclist(5, {'size' : 1})
<
*quickfix-context*
Any Vim type can be associated as a context with a quickfix or location list.
The |setqflist()| and the |setloclist()| functions can be used to associate a
context with a quickfix and a location list respectively. The |getqflist()|
and the |getloclist()| functions can be used to retrieve the context of a
quickfix and a location list respectively. This is useful for a Vim plugin
dealing with multiple quickfix/location lists.
Examples: >
let somectx = {'name' : 'Vim', 'type' : 'Editor'}
call setqflist([], 'a', {'context' : somectx})
echo getqflist({'context' : 1})
let newctx = ['red', 'green', 'blue']
call setloclist(2, [], 'a', {'id' : qfid, 'context' : newctx})
echo getloclist(2, {'id' : qfid, 'context' : 1})
<
*quickfix-parse*
You can parse a list of lines using 'errorformat' without creating or
modifying a quickfix list using the |getqflist()| function. Examples: >
echo getqflist({'lines' : ["F1:10:Line10", "F2:20:Line20"]})
echo getqflist({'lines' : systemlist('grep -Hn quickfix *')})
This returns a dictionary where the 'items' key contains the list of quickfix
entries parsed from lines. The following shows how to use a custom
'errorformat' to parse the lines without modifying the 'errorformat' option: >
echo getqflist({'efm' : '%f#%l#%m', 'lines' : ['F1#10#Line']})
<
EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
*:cdo*
:cdo[!] {cmd} Execute {cmd} in each valid entry in the quickfix list.
@ -358,8 +414,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
autocommand event is disabled by adding it to
'eventignore'. This considerably speeds up editing
each buffer.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|,
|:ldo|, |:cfdo| and |:lfdo|.
@ -372,8 +427,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
:{cmd}
etc.
< Otherwise it works the same as `:cdo`.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
*:ldo*
:ld[o][!] {cmd} Execute {cmd} in each valid entry in the location list
@ -386,8 +440,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
etc.
< Only valid entries in the location list are used.
Otherwise it works the same as `:cdo`.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
*:lfdo*
:lfdo[!] {cmd} Execute {cmd} in each file in the location list for
@ -399,8 +452,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
:{cmd}
etc.
< Otherwise it works the same as `:ldo`.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
=============================================================================
2. The error window *quickfix-window*
@ -423,7 +475,9 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
which will indicate the command that produced the
quickfix list. This can be used to compose a custom
status line if the value of 'statusline' is adjusted
properly.
properly. Whenever this buffer is modified by a
quickfix command or function, the |b:changedtick|
variable is incremented.
*:lop* *:lopen*
:lop[en] [height] Open a window to show the location list for the
@ -531,6 +585,117 @@ In all of the above cases, if the location list for the selected window is not
yet set, then it is set to the location list displayed in the location list
window.
*quickfix-window-ID*
You can use the |getqflist()| and |getloclist()| functions to obtain the
window ID of the quickfix window and location list window respectively (if
present). Examples: >
echo getqflist({'winid' : 1}).winid
echo getloclist(2, {'winid' : 1}).winid
<
*getqflist-examples*
The |getqflist()| and |getloclist()| functions can be used to get the various
attributes of a quickfix and location list respectively. Some examples for
using these functions are below:
>
" get the title of the current quickfix list
:echo getqflist({'title' : 0}).title
" get the identifier of the current quickfix list
:let qfid = getqflist({'id' : 0}).id
" get the identifier of the fourth quickfix list in the stack
:let qfid = getqflist({'nr' : 4, 'id' : 0}).id
" check whether a quickfix list with a specific identifier exists
:if getqflist({'id' : qfid}).id == qfid
" get the index of the current quickfix list in the stack
:let qfnum = getqflist({'nr' : 0}).nr
" get the items of a quickfix list specified by an identifier
:echo getqflist({'id' : qfid, 'items' : 0}).items
" get the number of entries in a quickfix list specified by an id
:echo getqflist({'id' : qfid, 'size' : 0}).size
" get the context of the third quickfix list in the stack
:echo getqflist({'nr' : 3, 'context' : 0}).context
" get the number of quickfix lists in the stack
:echo getqflist({'nr' : '$'}).nr
" get the number of times the current quickfix list is changed
:echo getqflist({'changedtick' : 0}).changedtick
" get the current entry in a quickfix list specified by an identifier
:echo getqflist({'id' : qfid, 'idx' : 0}).idx
" get all the quickfix list attributes using an identifier
:echo getqflist({'id' : qfid, 'all' : 0})
" parse text from a List of lines and return a quickfix list
:let myList = ["a.java:10:L10", "b.java:20:L20"]
:echo getqflist({'lines' : myList}).items
" parse text using a custom 'efm' and return a quickfix list
:echo getqflist({'lines' : ['a.c#10#Line 10'], 'efm':'%f#%l#%m'}).items
" get the quickfix list window id
:echo getqflist({'winid' : 0}).winid
" get the context of the current location list
:echo getloclist(0, {'context' : 0}).context
" get the location list window id of the third window
:echo getloclist(3, {'winid' : 0}).winid
<
*setqflist-examples*
The |setqflist()| and |setloclist()| functions can be used to set the various
attributes of a quickfix and location list respectively. Some examples for
using these functions are below:
>
" create an empty quickfix list with a title and a context
:let t = 'Search results'
:let c = {'cmd' : 'grep'}
:call setqflist([], ' ', {'title' : t, 'context' : c})
" set the title of the current quickfix list
:call setqflist([], 'a', {'title' : 'Mytitle'})
" set the context of a quickfix list specified by an identifier
:call setqflist([], 'a', {'id' : qfid, 'context' : {'val' : 100}})
" create a new quickfix list from a command output
:call setqflist([], ' ', {'lines' : systemlist('grep -Hn main *.c')})
" parse text using a custom efm and add to a particular quickfix list
:call setqflist([], 'a', {'id' : qfid,
\ 'lines' : ["a.c#10#L10", "b.c#20#L20"], 'efm':'%f#%l#%m'})
" add items to the quickfix list specified by an identifier
:let newItems = [{'filename' : 'a.txt', 'lnum' : 10, 'text' : "Apple"},
\ {'filename' : 'b.txt', 'lnum' : 20, 'text' : "Orange"}]
:call setqflist([], 'a', {'id' : qfid, 'items' : newItems})
" empty a quickfix list specified by an identifier
:call setqflist([], 'r', {'id' : qfid, 'items' : []})
" free all the quickfix lists in the stack
:call setqflist([], 'f')
" set the title of the fourth quickfix list
:call setqflist([], 'a', {'nr' : 4, 'title' : 'SomeTitle'})
" create a new quickfix list at the end of the stack
:call setqflist([], ' ', {'nr' : '$',
\ 'lines' : systemlist('grep -Hn class *.java')})
" create a new location list from a command output
:call setloclist(0, [], ' ', {'lines' : systemlist('grep -Hn main *.c')})
" replace the location list entries for the third window
:call setloclist(3, [], 'r', {'items' : newItems})
<
=============================================================================
3. Using more than one list of errors *quickfix-error-lists*
@ -575,6 +740,14 @@ list, one newer list is overwritten. This is especially useful if you are
browsing with ":grep" |grep|. If you want to keep the more recent error
lists, use ":cnewer 99" first.
To get the number of lists in the quickfix and location list stack, you can
use the |getqflist()| and |getloclist()| functions respectively with the list
number set to the special value '$'. Examples: >
echo getqflist({'nr' : '$'}).nr
echo getloclist(3, {'nr' : '$'}).nr
To get the number of the current list in the stack: >
echo getqflist({'nr' : 0}).nr
<
=============================================================================
4. Using :make *:make_makeprg*
@ -1067,7 +1240,7 @@ or >
to indicate the column of the error. This is to be used in a multi-line error
message. See |errorformat-javac| for a useful example.
The "%s" conversion specifies the text to search for to locate the error line.
The "%s" conversion specifies the text to search for, to locate the error line.
The text is used as a literal string. The anchors "^" and "$" are added to
the text to locate the error line exactly matching the search text and the
text is prefixed with the "\V" atom to make it "very nomagic". The "%s"
@ -1336,6 +1509,22 @@ The backslashes before the pipe character are required to avoid it to be
recognized as a command separator. The backslash before each space is
required for the set command.
*cfilter-plugin* *Cfilter* *Lfilter*
If you have too many matching messages, you can use the cfilter plugin to
reduce the number of entries. Load the plugin with: >
packadd cfilter
Then you can use these command: >
:Cfilter[!] /{pat}/
:Lfilter[!] /{pat}/
:Cfilter creates a new quickfix list from entries matching {pat} in the
current quickfix list. Both the file name and the text of the entries are
matched against {pat}. If ! is supplied, then entries not matching {pat} are
used.
:Lfilter does the same as :Cfilter but operates on the current location list.
=============================================================================
8. The directory stack *quickfix-directory-stack*
@ -1573,4 +1762,4 @@ by Vim.
vim:noet:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -614,7 +614,8 @@ Short explanation of each option: *option-list*
'backupext' 'bex' extension used for the backup file
'backupskip' 'bsk' no backup for files that match these patterns
'balloondelay' 'bdlay' delay in mS before a balloon may pop up
'ballooneval' 'beval' switch on balloon evaluation
'ballooneval' 'beval' switch on balloon evaluation in the GUI
'balloonevalterm' 'bevalterm' switch on balloon evaluation in the terminal
'balloonexpr' 'bexpr' expression to show in balloon
'belloff' 'bo' do not ring the bell for these reasons
'binary' 'bin' read/write/edit file in binary mode
@ -809,6 +810,7 @@ Short explanation of each option: *option-list*
'printoptions' 'popt' controls the format of :hardcopy output
'prompt' 'prompt' enable prompt in Ex mode
'pumheight' 'ph' maximum height of the popup menu
'pumwidth' 'pw' minimum width of the popup menu
'pythondll' name of the Python 2 dynamic library
'pythonthreedll' name of the Python 3 dynamic library
'quoteescape' 'qe' escape characters used in a string
@ -906,6 +908,8 @@ Short explanation of each option: *option-list*
'undoreload' 'ur' max nr of lines to save for undo on a buffer reload
'updatecount' 'uc' after this many characters flush swap file
'updatetime' 'ut' after this many milliseconds flush swap file
'varsofttabstop' 'vsts' a list of number of spaces when typing <Tab>
'vartabstop' 'vts' a list of number of spaces for <Tab>s
'verbose' 'vbs' give informative messages
'verbosefile' 'vfile' file to write messages in
'viewdir' 'vdir' directory where to store files with :mkview
@ -1372,4 +1376,4 @@ Context-sensitive completion on the command-line:
|zN| zN fold normal set 'foldenable'
|zi| zi invert 'foldenable'
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -27,6 +27,9 @@ You can see the name of the current swap file being used with the command:
:sw[apname] *:sw* *:swapname*
Or you can use the |swapname()| function, which also allows for seeing the
swap file name of other buffers.
The name of the swap file is normally the same as the file you are editing,
with the extension ".swp".
- On Unix, a '.' is prepended to swap file names in the same directory as the
@ -170,4 +173,4 @@ Once you are sure the recovery is ok delete the swap file. Otherwise, you
will continue to get warning messages that the ".swp" file already exists.
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

Some files were not shown because too many files have changed in this diff Show More