Vim-fork focused on extensibility and usability
Go to file
Justin M. Keyes c95f5d166f paste: workaround typeahead race
Workaround this failure:

    [  ERROR   ] test/functional/terminal/tui_spec.lua @ 192: TUI paste: exactly 64 bytes
    test/functional/helpers.lua:403:
    retry() attempts: 478
    test/functional/terminal/tui_spec.lua:201: Expected objects to be the same.
    Passed in:
    (table: 0x47cd77e8) {
     *[1] = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz endz' }
    Expected:
    (table: 0x47cd7830) {
     *[1] = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz end' }

This happens because `curwin->w_cursor.col` is sometimes decremented at
the end of `do_put`... because the editor is in Normal-mode instead of
the expected Insert-mode.

Caused by "typeahead race" (#10826): there may be queued input in the
main thread not yet processed, thus the editor mode (`State` global)
will be "wrong" during paste. Example: input "i" followed immediately by
a paste sequence:

    i<start-paste>...<stop-paste>
    ^
     "i" does not get processed in time, so the editor is in
     Normal-mode instead of Insert-mode while handling the paste.

Attempted workarounds:
- vim.api.nvim_feedkeys('','x',false) in vim._paste()
- exec_normal() in tinput_wait_enqueue()
- LOOP_PROCESS_EVENTS(&main_loop,…,0) in tinput_wait_enqueue()

ref #10826
2019-08-27 21:19:10 +02:00
.builds CI/OpenBSD: run oldtest #10797 2019-08-18 12:44:05 +02:00
.github doc [ci skip] #10177 2019-06-30 00:09:45 +02:00
ci ci: AppVeyor: exitIfFailed with old tests (#10187) 2019-08-21 21:54:03 +02:00
cmake get_compile_flags: also look at target properties 2019-08-15 19:42:46 +02:00
config Merge #10098 'win: fix msg_puts_printf()' 2019-08-12 02:42:13 +02:00
contrib build: clean up / remove X_USE_STATIC (#10713) 2019-08-07 22:19:55 +02:00
man vim-patch:8.0.0716: "--clean", 'shadafile' #9907 2019-04-15 21:15:36 +02:00
runtime paste: edge-case: handle EOL at end-of-buffer 2019-08-27 21:19:10 +02:00
scripts Merge #10646 'vim-patch: runtime patches' 2019-08-01 16:43:14 +02:00
snap dist: snap packaging #7918 2018-01-29 23:02:15 +01:00
src paste: phases, dots 2019-08-27 21:19:10 +02:00
test paste: workaround typeahead race 2019-08-27 21:19:10 +02:00
third-party build: third-party: enable CXX language earlier (#10862) 2019-08-27 20:55:11 +02:00
unicode vim-patch:8.1.1470: new doublewidth Unicode character U32FF #10126 2019-06-06 11:35:23 +02:00
.clang-format lint: src/.clang-format 2018-11-28 03:48:06 +01:00
.editorconfig editorconfig: set default tab width to 8 (#9467) 2019-01-07 02:15:19 +01:00
.flake8 ci: pylint target via flake8 2019-07-29 22:14:23 +02:00
.gitattributes make all *.h linguist-language as C file #10442 2019-07-08 10:51:41 +02:00
.gitignore .gitignore: src/nvim/testdir/*.tlog 2019-08-20 19:24:55 +02:00
.luacheckrc tests: move "busted" dir to "test" (#10518) 2019-07-16 22:02:50 +02:00
.travis.yml Remove TSan suppression config [skip appveyor] 2019-08-15 21:58:51 +02:00
appveyor.yml CI/AppVeyor: revert "skip MSVC_32 for non-PR" [skip travis] #10805 2019-08-18 17:26:20 +02:00
BACKERS.md Update backer URL 2015-11-11 19:50:33 -08:00
BSDmakefile build: show a hint for BSD make (#7275) 2017-09-16 10:54:49 +02:00
CMakeLists.txt cmakelists: fixed tests to avoid clang warnings (#10705) 2019-08-07 12:49:33 +02:00
codecov.yml ci: revisit/fix coverage uploading (#10201) 2019-06-25 15:35:33 +02:00
CONTRIBUTING.md doc [ci skip] #10383 2019-07-19 21:32:04 +02:00
LICENSE LICENSE: add LuaJIT notice. #899 2014-06-30 13:59:56 -04:00
MAINTAIN.md gen_vimdoc.py: support <pre> preformatted text [ci skip] 2019-05-01 00:18:49 +02:00
Makefile build: Makefile: use _opt_pylint [ci skip] (#10720) 2019-08-08 16:02:59 +02:00
README.md doc [ci skip] 2019-04-08 03:42:21 +02:00

Neovim

Wiki | Documentation | Chat/Discussion | Twitter

Travis build status AppVeyor build status Codecov coverage Coverity Scan analysis Clang analysis PVS-Studio analysis

Packages Debian CI Downloads

Neovim is a project that seeks to aggressively refactor Vim in order to:

See the Introduction wiki page and Roadmap for more information.

Features

See :help nvim-features for the full list!

Install from package

Pre-built packages for Windows, macOS, and Linux are found on the Releases page.

Managed packages are in Homebrew, Debian, Ubuntu, Fedora, Arch Linux, Gentoo, and more!

Install from source

The build is CMake-based, but a Makefile is provided as a convenience.

make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install

To install to a non-default location:

make CMAKE_INSTALL_PREFIX=/full/path/
make install

To skip bundled (third-party/*) dependencies:

  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
    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 inspect the build, these CMake features are useful:

  • cmake --build build --target help lists all build targets.
  • build/CMakeCache.txt (or cmake -LAH build/) contains the resolved values of all CMake variables.
  • build/compile_commands.json shows the full compiler invocations for each translation unit.

See the Building Neovim wiki page for details.

Transitioning from Vim

See :help nvim-from-vim for instructions.

Project layout

├─ ci/              build automation
├─ cmake/           build scripts
├─ runtime/         user plugins/docs
├─ 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
│  ├─ msgpack_rpc/  RPC subsystem
│  ├─ os/           low-level platform code
│  └─ tui/          built-in UI
├─ third-party/     CMake subproject to build dependencies
└─ test/            tests (see test/README.md)

License

Neovim is licensed under the terms of the Apache 2.0 license, except for parts that were contributed under the Vim license.

  • Contributions committed before b17d96 remain under the Vim license.

  • Contributions committed after b17d96 are licensed under Apache 2.0 unless those contributions were copied from Vim (identified in the commit logs by the vim-patch token).

See LICENSE for details.

Vim is Charityware.  You can use and copy it as much as you like, but you are
encouraged to make a donation for needy children in Uganda.  Please see the
kcc section of the vim docs or visit the ICCF web site, available at these URLs:

        http://iccf-holland.org/
        http://www.vim.org/iccf/
        http://www.iccf.nl/

You can also sponsor the development of Vim.  Vim sponsors can vote for
features.  The money goes to Uganda anyway.