Commit Graph

6584 Commits

Author SHA1 Message Date
Justin M. Keyes
172d099c32 Merge #5329 from justinmk/remove-misc2
Eliminate misc2.c
2016-09-13 17:23:35 +02:00
Justin M. Keyes
ca93b4a299 read_string: Use char if you mean char. 2016-09-13 16:20:09 +02:00
Justin M. Keyes
df072c3b2b refactor: eliminate misc2.c
move `call_shell` to misc1.c
Move some fns to state.c
Move some fns to option.c
Move some fns to memline.c
Move `vim_chdir*` fns to file_search.c
Move some fns to new module, bytes.c
Move some fns to fileio.c
2016-09-13 16:20:09 +02:00
Justin M. Keyes
7eb4d2f79d vim-patch:7.4.1558 (#5333)
Problem:    It is not easy to find out what windows display a buffer.
Solution:   Add win_findbuf().

9cdf86b86f
2016-09-13 14:05:34 +02:00
Justin M. Keyes
a34d3a7244 Merge 'vim-patch.sh' 2016-09-13 12:50:31 +02:00
Justin M. Keyes
d61826a85c vim-patch.sh: Use printf instead of echo
Also: neovim => nvim
2016-09-13 12:40:20 +02:00
Justin M. Keyes
d5aaa18316 vim-patch.sh: preprocess_patch()
- Remove not-applicable Vim changes such as *.proto, todo.txt, ...

Also:
- support NVIM_SOURCE_DIR override
2016-09-13 11:38:09 +02:00
Justin M. Keyes
2daf54ee8d Merge #4874 'Restore vim-like tab dragging' 2016-09-12 03:43:07 +02:00
Justin M. Keyes
ac819b8994 CI: Travis macOS: Skip tab left-drag tests.
These tests fail on master, so it's not a regression. Changes in #4874
(parent commit) seem to work (and pass most CI), so skipping these tests
is better than blocking the changes.
2016-09-12 03:42:51 +02:00
Justin M. Keyes
b801291bec CI: test: Avoid QuickBuild hang. (#5330)
Delete the CWD using nvim instead of the external lua/test runner process.
2016-09-12 03:18:48 +02:00
sach1t
c6f5d6b7e0 normal.c: Restore vim-like tab dragging. #4874
Closes #4663
References #3310
2016-09-12 03:11:26 +02:00
Anmol Sethi
4ceacb37d5 man.vim: prevent bell in ':wincmd w' when only one window (#5328) 2016-09-11 20:58:51 +02:00
davix
13db9236fe vim-patch:7.4.1535 (#5327)
Problem:    The feedkeys test has a one second delay.
Solution:   Avoid need_wait_return() to delay. (Hirohito Higashi)

9e496854a9
2016-09-11 15:16:36 +02:00
Wei Huang
c4c2969624 vim-patch:7.4.1533 #5320
Problem:    Using feedkeys() with an empty string disregards 'x' option.
Solution:   Make 'x' work with an empty string. (Thinca)

When integrating the patch to nvim, used same logic but different code
based on nvim codebase. New test passed.

74c5bbf134
2016-09-11 03:47:16 +02:00
Justin M. Keyes
ca65514a24 Merge #2789 'system(): Respect shellxescape, shellxquote' 2016-09-11 03:27:35 +02:00
Justin M. Keyes
395ef5642e shell_escape: rename; refactor
- rename to shell_xescape_xquote
- move to os/shell.c
- disallow NULL argument
- eliminate casts, nesting
- test: empty shellxquote/shellxescape
2016-09-11 03:04:57 +02:00
Justin M. Keyes
8dc6c1a7ff Merge #5318 from equalsraf/fix-openbsd
Fix OpenBSD builds
2016-09-10 23:36:25 +02:00
Zhaosheng Pan
0991041ae7 system(): Respect 'sxe' and 'sxq' #2789
Fixes #2773
2016-09-10 22:21:40 +02:00
Rui Abreu Ferreira
0ebd30fba7 third-party: Bump luv to v1.9.1-0
Fixes #4620
2016-09-10 18:43:05 +01:00
Rui Abreu Ferreira
aa6705875d Add compiler check for -Wno-static-in-inline
Add compiler check for -Wno-static-in-inline, the option is only
supported in gcc >= 4.4, and some systems still ship with earlier
versions of gcc (see #5300).
2016-09-10 18:43:04 +01:00
Rui Abreu Ferreira
4c9e5676cd Disable use of jemalloc in OpenBSD
Works around #3434, turning off the use of jemalloc in OpenBSD.
2016-09-10 18:43:04 +01:00
Justin M. Keyes
bccb49bedb Merge #5316 2016-09-10 14:11:12 +02:00
oni-link
f8a8a56908 eval.c: Fix memory leak for detached pty job 2016-09-08 21:29:20 +02:00
oni-link
1c9d7270a8 eval.c: Garbage collection frees dictionary before job cleanup
Removing a job too early from the joblist gives garbage collection the
chance to also remove the job dictionary.

Can be triggered with ASAN while waiting 'updatetime'ms (~5 seconds)
before closing the terminal window opened with:

    nvim -u NONE +'call termopen("true",{})'
2016-09-08 21:29:20 +02:00
Justin M. Keyes
fe06e2a4a0 doc 2016-09-06 03:43:13 -04:00
Justin M. Keyes
d9d2c2fcc0 doc: clarify reltime()
Closes #5301
2016-09-05 20:15:31 -04:00
Justin M. Keyes
df99c6493d health.vim: "No healthchecks found" also needs the buffer. 2016-09-05 19:42:28 -04:00
Justin M. Keyes
522b885a0d Merge #5295 'health.vim' 2016-09-05 19:34:00 -04:00
Justin M. Keyes
3c24704ac8 health.vim: Show results incrementally.
Also:

- improve precision of "No healthcheck found"
- fix SUGGESTIONS syntax group definition
- fix indentation of SUGGESTIONS
2016-09-05 19:22:01 -04:00
Justin M. Keyes
31257b450b health.vim: Factor out health#provider#check() 2016-09-05 18:29:47 -04:00
Alex Genco
d61a50758c Improve Ruby version check in CheckHealth command
Compare current version number to that of the latest released neovim
rubygem, rather than a hard-coded version.

Note: The `gem list` command introduced here adds about 4 seconds to the
execution time of the CheckHealth command.
2016-09-04 21:26:21 -07:00
ZyX
6127eaef05 shada: Fix non-writeable ShaDa directory handling
Before this change,

    nvim -i /etc/shada

segfaults on exit if the file does not exist and user does not have
permissions to create the file at /etc/shada.

Closes #5296
Reported in #5277
https://github.com/neovim/neovim/issues/5277#issuecomment-243937255
2016-09-04 21:45:48 -04:00
HiPhish
cd321b7d0f getcwd(): Return empty string if CWD is invalid. #5292
Closes #5291

Restores behaviour identical to Vim. If the user calls the VimScript
function 'getcwd()' and the working directory cannot be found (for
example because the directory has been deleted since the last time it
was used) an empty string needs to be returned instead of throwing an
error.
2016-09-04 08:01:31 -04:00
Jurica Bradarić
73b8424fad vim-patch:7.4.1913 (#5260)
Problem:    When ":doautocmd" is used modelines are used even when no
            autocommands were executed. (Daniel Hahler)
Solution:   Skip processing modelines. (closes vim/vim#854)

1610d05241
2016-09-04 23:43:41 +02:00
Jurica Bradarić
0f381f26cb vim-patch:7.4.1971 (#5262)
Problem:    It is not easy to see unrecognized error lines below the current
            error position.
Solution:   Add ":clist +count".

e8fea0728a
2016-09-04 23:40:12 +02:00
Kalle Ranki
e75e9c10dc test: Add unittest spec for option.c (#5289)
Move typedef expand_T to types.h for tests
Fix lint error for old style comments

Describe 'check_ff_value' valid values as an initial test.

Fix 'get_sts_value' comment inaccuracy and add unit test for it
2016-09-04 09:54:41 +02:00
Anmol Sethi
9bba8ba372 [RFC] man.vim: remove <Plug> mappings (#5290)
- :Man with no arguments opens the manapage for the
  <cWORD> (man buffers) or <cword> (non-man buffers).
- remove now irrelevent comment about -P flag
2016-09-04 03:53:58 +02:00
Alejandro Sanchez
626065d385 tchdir: New tab should inherit CWD. (#5227)
When a new tabpage gets created it will copy the local working directory
of the previous one, if there is any.
2016-09-04 03:40:01 +02:00
Jurica Bradarić
5d8d24f0c2 vim-patch:7.4.1900 (#5259)
Problem:    Using CTRL-] in the help on "{address}." doesn't work.
Solution:   Recognize an item in {}. (Hirohito Higashi, closes vim/vim#814)

28b942a064
2016-09-04 03:30:36 +02:00
Nicolas Hillegeer
a9c5423263 signal_init: unblock all signals on startup. #5283
As discussed on #5243 and #5283.

Helped-by: John Szakmeister <john@szakmeister.net>
Helped-by: Justin M. Keyes <justinkz@gmail.com>
2016-09-03 19:16:23 -04:00
Justin M. Keyes
2f6d3e599b Merge #5249 'man.vim' 2016-09-03 14:01:04 -04:00
Justin M. Keyes
c9e39f8227 man.vim: Avoid hard redraw.
Use system() instead of :read to avoid a hard redraw.
2016-09-03 13:59:37 -04:00
Anmol Sethi
f8fc8f51c0 man.vim #5249
- fix synopsis highlighting in other locales. Cannot always rely on the first
  line for the section in some locales; instead, use the file path and
  explicitly set b:man_sect to the actual section.
- eliminate separate s:man_args function
- simplify logic: do not reuse buffer content
- introduce b:man_default_sects Fixes #5233
- introduce <Plug>(man_vsplit), <Plug>(man_tab)
- simplify regexps
2016-09-03 12:57:41 -04:00
James McCoy
94dfb6cea2 Merge pull request #5286 from jamessan/strtoimax-error-checking
Fix error-handling of strtoimax boundary conditions
2016-09-03 00:55:27 -04:00
Patrick Jackson
0253766b5d lint: Close resource leak (#5288) 2016-09-03 00:41:55 +02:00
James McCoy
a371f1027e Fix error-handling of strtoimax boundary conditions
strtoimax is only required to set errno if there is an
underflow/overflow.  In those conditions, strtoimax returns
INTMAX_MIN/INTMAX_MAX respectively, so that's the only time we should be
checking the value of errno.

Even in those conditions, errno needs to be set to a known good value
before calling strtoimax to differentiate between "value is actually
INTMAX_MAX/MIN" and "value over/underflows".

Closes #5279
2016-09-02 10:11:32 -04:00
oni-link
f175b281cf helpers.c: Fix invalid state of failed conversion result for object_to_vim() (#5282)
If a conversion for a container fails in object_to_vim(), the memory for
the container in the returned/converted value is freed, but the returned
value keeps a pointer to the freed memory. Calling later clear_tv() on
this value leads to an invalid memory access.

Set v_type to VAR_UNKNOWN in the converted value on failure, so that
clear_tv() has no effect.
2016-09-01 23:52:58 +02:00
Björn Linse
c6ac4f84b1 Merge pull request #4934 from bfredl/api
make the API callable from vimL, rename API functions to common nvim_ prefix
2016-09-01 18:32:37 +02:00
Björn Linse
acb7c826b3 api: fix leak when a api function is incorrectly called with a list.
This applies both to msgpack-rpc and eval.
2016-08-31 21:57:06 +02:00
Björn Linse
98a08c3e5a api: add tests for calling the api from vimscript 2016-08-31 21:57:06 +02:00