Commit Graph

3652 Commits

Author SHA1 Message Date
Florian Walch
24dc42e7e5 Travis: Temporarily disable TSan build.
Tests currently time out and will be fixed by @tarruda in a future PR.
2015-07-05 10:31:17 +03:00
Justin M. Keyes
8eb3470147 MSan: Initialize buffer in spell_delete_wordlist. 2015-07-05 10:31:17 +03:00
Florian Walch
03062b8db0 Travis: Disable functional tests and allow failures for MSan.
* Functional tests fail with SIGPIPE: disable them until we
   figure out the exact problem.
 * MSan reports some warnings: allow failures for the Travis
   build to allow fixing them in individual follow-up PRs.
2015-07-05 10:31:16 +03:00
Florian Walch
b456d084a2 Travis: Use Clang 3.6. 2015-07-05 10:31:16 +03:00
Florian Walch
624630eff5 CMake: Enable EXITFREE for all *San. 2015-07-05 10:31:16 +03:00
Florian Walch
fe6bd8cae2 CMake: Add option for Clang TSan, rename option ASAN -> ASAN_UBSAN. 2015-07-05 10:31:16 +03:00
Florian Walch
bd9042b1a9 CMake: Add option for Clang MSan. 2015-07-05 10:31:16 +03:00
Michael Reed
1d9501186c Merge pull request #2914 from Pyrohh/doc-cleanup-4
[RDY] Doc cleanup (4) - clipboard docs + various
2015-07-04 15:46:22 -04:00
Michael Reed
f48c8d652c Remove VisualNOS highlight group remnants
Nvim hasn't ever had X11 integration, so this has was never needed.
2015-07-04 15:43:54 -04:00
Michael Reed
cadf93e6fc Remove 'guipty' references
Presumably due to tarruda's unifdefing, it was already a no-op at the
time of nvim's first commit.

It's probably better to be clear that it doesn't exist, as opposed to
users thinking `:set guipty` is doing something when it isn't.
2015-07-04 15:43:54 -04:00
Michael Reed
fab635f858 doc: Remove gui_x11.txt, merge remnants into nvim_clipboard.txt
We've never had an X11 GUI.
2015-07-04 15:43:53 -04:00
Björn Linse
e9c9d44f65 clipboard: don't overwrite before pasting in visual mode. #2945
This occured when clipboard=unnamedplus and doing "+p in visual mode.
Fixes #2942.
2015-07-04 18:17:30 +02:00
Nick Hynes
0ffd51425e rplugin: pass additional info to host factory function #2920 2015-07-03 12:12:21 -04:00
Florian Walch
b4d45f635d doc: Mention that Python module might be provided by package manager #2935
Using e.g. a Linux distribution's package manager should be preferred
over installing the `neovim` Python modules with `pip`.
2015-07-01 18:59:07 -04:00
Thiago de Arruda
b656a954cf Merge PR #2650 'Data structure improvements' 2015-07-01 09:27:42 -03:00
Thiago de Arruda
0ef80b9c2b rbuffer: Reimplement as a ring buffer and decouple from rstream
Extract the RBuffer class from rstream.c and reimplement it as a ring buffer,
a more efficient version that doesn't need to relocate memory.

The old rbuffer_read/rbuffer_write interfaces are kept for simple
reading/writing, and the RBUFFER_UNTIL_{FULL,EMPTY} macros are introduced to
hide wrapping logic when more control is required(such as passing the buffer
pointer to a library function that writes directly to the pointer)

Also add a basic infrastructure for writing helper C files that are only
compiled in the unit test library, and use this to write unit tests for RBuffer
which contains some macros that can't be accessed directly by luajit.

Helped-by: oni-link <knil.ino@gmail.com>
Reviewed-by: oni-link <knil.ino@gmail.com>
Reviewed-by: Scott Prager <splinterofchaos@gmail.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Michael Reed <m.reed@mykolab.com>
2015-07-01 05:40:53 -03:00
oni-link
dcaf9c6bc3 rstream: Fix bug triggered when libuv doesn't use the allocated buffer
Libuv will return 0 to signal that the buffer allocated by `alloc_cb` wasn't
used, and in this case the read_cb should simply be ignored.
2015-07-01 05:40:53 -03:00
Thiago de Arruda
4f5b250d4e klib: Improve klist.h
- Add `kl_shift_at` macro and backing function. This can be used to shift
  elements at arbitrary positions. `kl_shift` is now defined on top of the new
  macro.
- Change shift/push API, now `kl_push` accepts an object as parameter and
  `kl_shift` returns the object instead of a status. An assertion against
  shifting at the end of a list(or empty lists) was added.
- Add `kl_iter` and `kl_iter_at` macros. `kl_iter_at` is for starting the
  iteration at arbitrary positions.
2015-07-01 05:40:53 -03:00
Thiago de Arruda
d6ed2b3a39 os/fs: Use module-local uv_loop_t instance
This event loop is just a stub instance used in synchronous libuv function
calls, it needs to be decoupled from the main event loop in order to run it from
another thread.
2015-07-01 05:40:53 -03:00
Thiago de Arruda
67e45e1852 test: Don't run legacy test 87
The python3 emulation layer doesn't work well enough to run that test. Also add
notes to test86/test87 explaining why.
2015-07-01 05:40:53 -03:00
Thiago de Arruda
c8c5af5a7a test: Ensure proper initialization in unit/helpers.lua
Remove helpers.vim_init and simply perform the required initialization in
helpers.lua.
2015-07-01 05:40:53 -03:00
Florian Walch
bfadf5a28b ASan: Fix "null pointer passed for argument declared to never be null". #2925
Arguments passed to xmemdupz() are sometimes NULL, but xmemdupz() has
FUNC_ATTR_NONNULL_ALL. Check pointers for NULL before calling
xmemdupz().

Resolves #2533.
2015-06-30 18:36:41 +03:00
Michael Reed
fa13cc61ce Merge pull request #2928 from fmoralesc/update-example-nvimrc
[RFC] Update vimrc_example file and remove gvimrc_example file

Reviewed-by: Michael Reed <m.reed@mykolab.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
2015-06-29 20:44:41 -04:00
Felipe Morales
597b8eed6a Remove gvimrc_example 2015-06-29 20:01:56 -03:00
Felipe Morales
b40f95d723 Update vimrc_example file
Because of recent work on defaults (see
https://github.com/neovim/neovim/issues/2676)
2015-06-29 20:01:56 -03:00
Michael Reed
27f0e74542 doc: Fix undefined reference warning 2015-06-28 22:22:41 -04:00
Eliseo Martínez
f77f644998 Fix warnings: shell.c: do_os_system(): Nonnull passed null: FP. #2923
Problem    : Argument with 'nonnull' attribute passed null @ 203.
Diagnostic : False positive.
Rationale  : Problem is supposed to appear when argv[0] is NULL within
             do_os_system. But argv is being generated by
             shell_build_argv(), which implies argv[0] is the current
             value for 'shell' option. Now, option has a non-null
             default ($SHELL or "sh"), and, if set by the user, it can
             be empty, but not NULL. So, argv[0] can never be NULL.
Resolution : Assert shell_build_argv() postcondition.
2015-06-28 14:45:13 -04:00
Felipe Morales
957c81539f plugin/matchit: create stub for matchit.vim #2921
Re: compatibility issues with users doing `:so
$VIMRUNTIME/macros/matchit.vim`

Fixes #2918
2015-06-28 13:34:26 -04:00
Michael Reed
57f11f9ca0 doc: Remove usr_90.txt
- It's severely outdated
- We already have (up to date) installation instructions on the wiki
2015-06-27 18:16:51 -04:00
Michael Reed
3ec0ede3a8 Merge pull request #2904 from Pyrohh/clint
[RFC] clint.py stuff

Reviewed-by: Florian Walch <florian@fwalch.com>
2015-06-27 15:22:31 -04:00
Michael Reed
3c2fa1767b cmake: Make make lint less verbose
It unnecessarily complicates spotting linter errors, as they're usually
surrounded by a bunch of lines saying "Done processing ... ".
2015-06-27 15:21:09 -04:00
Michael Reed
ed6611a588 clint.py: don't print --help output to stderr and exit 1
a) It's not an error
b) It requires manual redirection of stderr into stdout ('2>&1') in
   order to be viewed with a pager, which it warrants given how long the
   help message is.

Helped-by: Florian Walch <florian@fwalch.com>
2015-06-27 15:21:09 -04:00
Michael Reed
0cfadce547 man: Bump nvim.1 date, add Makefile for authoring
igor(1) checks if the document date is today, so this should prevent
forgetting to bump the date in the future.
2015-06-26 19:24:07 -04:00
oni-link
4aa6279a6b event_teardown(): retry uv_loop_close() instead of abort. #2903
abort() causes a bad exit; retry uv_loop_close() instead.

Before this change, this ruby script will cause nvim to abort() instead
of exiting cleanly:
```
  require 'open3'
  require 'base64'

  Open3.popen3('nvim --embed -u -NONE') {|stdin, stdout, stderr, wait_thr|
    # base64-encoded msgpack message for the vim_command "qa!".
    stdin.write Base64.decode64('kwKrdmltX2NvbW1hbmSRo3FhIQ==')
    puts wait_thr.value
  }
```

References ##2663
Closes #2466
Closes #2648

Helped-by: Rui Abreu Ferreira <raf-ep@gmx.com>
2015-06-25 22:26:28 -04:00
Justin M. Keyes
568d998549 Merge #2703 'Clipboard: do not use &shell to invoke provider + cache owned clipboard'. 2015-06-25 19:31:17 -04:00
Björn Linse
3fcfd52422 clipboard: avoid redundant error message on clipboard_get failure .
Fixes #2712

Helped-By: Michael Reed <m.reed@mykolab.com>
2015-06-25 19:30:29 -04:00
Björn Linse
d133502e98 clipboard: keep track of ownership and cache clipboard data locally
Helped-By: Justin M. Keyes <justinkz@gmail.com>
2015-06-25 19:30:28 -04:00
Björn Linse
a0e89978bd clipboard: don't use &shell in clipboard provider 2015-06-25 19:16:59 -04:00
Michael Reed
01a200996a Remove outdated and unused manuals #2891
`nvim-[lang].1`:
The non-english manuals are completely outdated and still written in
roff, as opposed to mdoc, which is used for `nvim.1`.
Given that, they're nearly useless at the moment, and when/if they are
updated, they should probably be rewritten from scratch using `nvim.1`
as a reference.

`xxd*.1`:
xxd hasn't been in the source tree for a long time, so the manual is of
little use.

`nvimtutor*.1`:
The vimtutor script hasn't ever shipped with nvim, and the consensus
seems to be that it won't, at least in the form of an executable
installed alongside `$(PREFIX)/bin/nvim` (see #2700).

In `nvim.1`, the argument to the `.Os` macro was removed. This was done
because its only purpose was to signify that nvim and nvimtutor
were part of the "Neovim" distribution, i.e., one and the same, which
isn't applicable anymore because `nvimtutor.1` is being removed.
From the `.Os` documentation in `man mdoc`:

    Os
	 Operating system version for display in the page footer.  This is the
	 mandatory third macro of any mdoc file.  Its syntax is as follows:

	       .Os [system [version]]

	 The optional system parameter specifies the relevant operating system or
	 environment.  It is suggested to leave it unspecified, in which case
	 mandoc(1) uses its -Ios argument or, if that isn't specified either,
	 sysname and release as returned by uname(3).

	 Examples:
	       .Os
	       .Os KTH/CSC/TCS
	       .Os BSD 4.3

	 See also Dd and Dt.

Reviewed-by: Felipe Morales <hel.sheep@gmail.com>
Reviewed-by: Florian Walch <florian@fwalch.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>

[ci skip]
2015-06-25 19:08:21 -04:00
Nick Hynes
105b8f1070 rplugin: allow users to register hosts #2896 2015-06-25 19:01:38 -04:00
Ismail Badawi
34a5efd7a9 Enable -Wconversion: menu.c #2885 2015-06-25 01:28:02 -04:00
Justin M. Keyes
f78bf64771 api: vim_set_var() should return the old value #2899
Closes #2816
2015-06-25 01:26:17 -04:00
Michael Reed
406e9876b6 doc: Various #2898
refs #2895

Helped-by: Bohr Shaw <pubohr@gmail.com>
Helped-by: Justin M. Keyes <justinkz@gmail.com>

[ci skip]
2015-06-24 21:43:03 -04:00
alecbrooks
e8c82372ff doc: Revise for flow and consistency #2831
In general, attempt to make things more concise.

Reviewed-by: Michael Reed <m.reed@mykolab.com>
2015-06-24 09:15:58 -04:00
Justin M. Keyes
91fcd33787 doc: vim_diff: clarify key-chord support. #2886 2015-06-24 00:43:20 -04:00
Justin M. Keyes
20a57c497b tests: 061_undo_tree_spec: minor edits 2015-06-22 22:56:16 -04:00
Justin M. Keyes
ae9eb747e0 Merge #2851 'tests: Migrate legacy test 61.'. 2015-06-22 22:18:10 -04:00
Lucas Hoffmann
c411fb6cda tests: Repeat a flaky part of the migrated test 61.
This is the part of the test that relies on wall clock time and sometimes
fails if the system is under load.  The test is repeated up to three times
before a failure is reported to the user.
2015-06-22 17:05:10 +02:00
Lucas Hoffmann
1c7372361f tests: Split test 61 into several it() blocks. 2015-06-22 12:15:51 +02:00
Lucas Hoffmann
2ce3656754 tests: Fix an further simplify migrated test 61.
:undojoin can only be used inside scripts and command chains.  So it has to be
tested inside an explicit `source()` call.

Also add a new test case for the different behavior when sourceing normal mode
commands from a script or inserting them interactively.
2015-06-22 12:08:24 +02:00