Commit Graph

3815 Commits

Author SHA1 Message Date
Justin M. Keyes
3955ffa305 os/*defs: restore some comments and formatting. 2015-07-06 08:23:21 -04:00
Yamakaky
d4b4d7d0ec refactor: remove SYS_MENU_FILE (unused) 2015-07-06 08:23:21 -04:00
Yamakaky
2e46765849 Split os_unix_defs.h into os/ 2015-07-06 08:23:21 -04:00
Florian Walch
e949c2bd62 vim-patch:7.4.646 #2926
Problem:    ":bufdo" may start at a deleted buffer.
Solution:   Find the first not deleted buffer. (Shane Harper)

https://github.com/vim/vim/commit/v7-4-646
2015-07-06 15:09:32 +03:00
Michael Reed
1b78ad1c4d Merge pull request #2932 from lucc/helpers/write_file
[RDY] tests: Add write_file helper function

Reviewed-by: Florian Walch <florian@fwalch.com>
Reviewed-by: Michael Reed <m.reed@mykolab.com>
2015-07-06 04:07:23 -04:00
Michael Reed
deab194413 Merge pull request #2916 from Pyrohh/doc-cleanup-5
[RFC] Doc cleanup (5)

Reviewed-by: Felipe Morales <hel.sheep@gmail.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
2015-07-05 18:33:58 -04:00
Michael Reed
5da8ac8d29 README.md: Various
`:h nvim_terminal_emulator.txt` is much more comprehensive than
`:h :terminal`, so link to it instead.
2015-07-05 11:45:41 -04:00
Michael Reed
be00bd7016 doc: Remove refs to xsmp, xterm_(clipboard|save)
Nvim has no direct integration with X.

Helped-by: Florian Walch <florian@fwalch.com>
2015-07-05 11:45:40 -04:00
Michael Reed
36e3f4f4c4 doc: Remove refs to dos(16|32), win16, and win95
This is primarily low-hanging fruit; there are still many references to
things such as MS-DOS throughout (see os_dos.txt).
2015-07-05 11:45:40 -04:00
Florian Walch
5305338167 Merge #2807 'Travis: Add Clang MSan/TSan builds'. 2015-07-05 10:31:17 +03:00
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
Lucas Hoffmann
8f4e3a68a8 tests: Use new write_file() function in tests. 2015-06-30 18:06:06 +02:00
Lucas Hoffmann
652ee0348c tests: Use write_file() in source(). 2015-06-30 18:06:06 +02:00
Lucas Hoffmann
f0850775bf tests: Add helpers.write_file() to write short files. 2015-06-30 18:06:06 +02: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