Commit Graph

3971 Commits

Author SHA1 Message Date
oni-link
c6af09c566 shell.c: A full RBuffer with no NL can freeze shell output. #3156
out_data_cb() can return without emptying the full RBuffer (no NL was
seen). Because the shell output stream is stopped until space in the
Rbuffer is freed up, no more shell output is written.

To prevent this, output the full RBuffer when write_output() did not
write anything.

write_output() can also process the same RBuffer content more than once,
if no NL was seen. To prevent NUL bytes from producing new lines (if
lines are not written to a buffer), translate NUL to SOH(1).

Fixes #2983
2015-08-11 09:36:06 -04:00
Felipe Morales
7d9472ab1b tui: avoid double-resize on SIGWINCH. #3145 2015-08-10 00:01:27 -04:00
Justin M. Keyes
389c3b8581 Merge #3149 'Fix pending() invocations'. 2015-08-09 22:34:07 -04:00
Justin M. Keyes
5c1dc0fbe7 test: fix pending() invocations
AFAICT busted does not report pending() invocations without the 2nd
argument.
2015-08-09 22:33:28 -04:00
Justin M. Keyes
62c53c404b test: move runtime/autoload/* to provider/
- Organize tests by logical function, not the literal impl location.
- Avoid deep nesting / hyper-hierarchy.
2015-08-09 22:33:28 -04:00
Justin M. Keyes
698482ec3e test: python: report pending() if python{2,3} is missing 2015-08-09 22:33:28 -04:00
Marco Hinz
21c0d87a24 vim-patch:7.4.781 #3065
Problem:  line2byte() returns one less when 'bin' and 'noeol' are set.
Solution: Only adjust the size for the last line. (Rob Wu)

Original patch:
  https://code.google.com/p/vim/source/detail?r=30c9301f33ed76d0b76b9e22362f5e78e26786da
2015-08-09 21:13:25 -04:00
Marco Hinz
990c0350ab vim-patch:7.4.773 #3066
Problem:  'langmap' is used in command-line mode when checking for mappings.
Solution: Do not use 'langmap' in command-line mode. (Larry Velazquez)

Original patch:
  https://code.google.com/p/vim/source/detail?r=5b1eefbf9a532f32a66fa13abbd671488aaafd5c
2015-08-09 21:12:11 -04:00
Marco Hinz
3df37a8424 vim-patch:7.4.776 #3062
Problem:  Equivalence class for 'd' does not work correctly.
Solution: Fix 0x1e0f and 0x1d0b. (Dominique Pelle)

Original patch:
  https://code.google.com/p/vim/source/detail?r=94b17958585153641ad1e813fa144cad57c7170f
2015-08-09 21:09:28 -04:00
Justin M. Keyes
ef6451a113 Merge #3141 'handle clipboard=unnamedplus,unnamed correctly'. 2015-08-09 21:04:43 -04:00
Björn Linse
41e9ebcf41 clipboard: remove documentation for unsupported options
Both these were relevant only to the old gui implementation.
2015-08-07 13:06:17 +02:00
Björn Linse
d4ebbaa91a clipboard: support clipboard=unnamedplus,unnamed 2015-08-07 13:06:13 +02:00
Björn Linse
162361abac clipboard: fixup inconsequential yet embarrassing mixup 2015-08-06 22:39:47 +02:00
Justin M. Keyes
5a19585865 test: cover msgpackparse() regression 2015-08-05 19:08:06 -04:00
Justin M. Keyes
029b58e417 Merge #3135 'Use proper refcount of msgpack type lists'. 2015-08-05 19:08:03 -04:00
ZyX
718504e18d documentation: Replace undefined help tag 2015-08-06 01:41:01 +03:00
ZyX
fe3c8690f6 documentation: Fix special dictionary value key name 2015-08-06 01:40:01 +03:00
ZyX
172272ef3f eval: Use proper refcount of msgpack type lists 2015-08-05 22:50:46 +03:00
oni-link
b732a27c4e channel.c: Only free a channel after close callbacks are executed #3132
parse_msgpack() closes a channel's stream on EOF error and the stream's
close callback close_cb() is queued for the next libuv loop iteration.
When parse_msgpack() returns, it has freed the channel and the queued
stream callback will access this freed memory.

To prevent this, increase the channel's reference count and let the
stream's close callback call decref().

Fixes #3128
2015-08-05 11:17:08 -04:00
Rui Abreu Ferreira
2e1a80563b os_get_user_name() for non UNIX system #2729
os_get_user_name() requires getuid(), which is only available in UNIX. Return
FAIL for non UNIX systems.

On FAIL os_get_user_name() fills the buffer with the uid.  In Windows libuv
uses 0 for uid in stat structs, so 0 is used here too.
2015-08-04 19:15:17 -04:00
Michael Reed
8f3eb69207 doc: Fix nit in previous commit
...sorry
2015-08-04 17:10:44 -04:00
Florian Walch
61e6665652 doc: Add transition instructions to nvim_from_vim.txt
Also move introduction to Nvim and topic overview to nvim.txt.

Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
2015-08-04 16:46:15 -04:00
Keerthan Jaic
5fc4c2d442 tui: Fix terminal detection for cursor shape #3129
Default to DECSCUSR, except for known cases where other codes are used
or changing cursor shape is unsupported
2015-08-04 12:33:43 -04:00
Florian Walch
95a4dc6487 vim-patch.sh: Add --review option to compare PR and original diffs. #3083
Helped-by: Michael Reed <m.reed@mykolab.com>
2015-08-03 21:36:33 +02:00
Justin M. Keyes
9f350e615c Merge pull request #3034 from ZyX-I/msgpack-eval
msgpack viml functions for dump/restore
2015-08-03 00:24:10 -04:00
ZyX
030f360312 functests: Use eval subdirectory in place of viml 2015-08-02 22:19:58 +03:00
ZyX
401ae724ea eval: Call list_append_allocated_string from list_append_string 2015-08-02 20:38:09 +03:00
ZyX
69a42f2d1d documentation: Add {Nvim} tag to new functions 2015-08-02 19:34:32 +03:00
ZyX
ec95a58377 vim_to_msgpack: Silence -Werror=unitialized compiler error
Compiler warning was found in [QuickBuild logs][1] from [this page][2]. GCC and
clang on travis appear to be fine. Relevant log parts:

    Step Log (master>buildall>build-node?testNode=linux-64>build-and-run-tests>build-and-run-tests-parameterized?buildType=Release>configure-neovim-and-build-nvim)
    <…>
    16:26:31,364 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘f_msgpackdump’:
    16:26:31,364 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:12371:26: error: ‘cur_tv’ may be used uninitialized in this function [-Werror=uninitialized]
    16:26:31,364 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:12328:21: note: ‘cur_tv’ was declared here
    16:26:31,938 WARN  - cc1: all warnings being treated as errors

[1]: http://neovim-qb.szakmeister.net/wicket/page?4-1.ILinkListener-content-buildTab-panel-errorContainer-steps-5-logLink
[2]: http://neovim-qb.szakmeister.net/build/2099/overview
2015-08-02 19:32:41 +03:00
ZyX
fea633d0fa ex_cmds*: Silence -Wstrict-prototypes warnings
Due to a number of places where headers generated from these files are included
gcc with -DEXITFREE produces *loads* of warnings for these functions.
2015-08-02 19:32:41 +03:00
ZyX
7fbefd585e eval: Remove most of msgpack* functions limitations 2015-08-02 19:32:41 +03:00
ZyX
5a7135fa1c eval: Add msgpackparse and msgpackdump functions 2015-08-02 19:32:41 +03:00
Justin Gassner
63d5b8707b vim-patch:5d89d9b #2922
Update runtime files.

https://code.google.com/p/vim/source/detail?r=5d89d9b40499059e1a64dc35fbae94313fba0098
2015-08-02 05:17:49 -04:00
Justin M. Keyes
efa059c5a4 test: call scandir_next_with_dots() more than once
Also cosmetic reduction.
2015-08-01 23:33:54 -04:00
Justin M. Keyes
dd7c7efcfb Merge #3099 glob() should return '.' and '..' 2015-08-01 23:16:53 -04:00
Felipe Morales
ea551044ea Add the . and .. entries to glob()
os_scandir() and os_scandir_next() skip over those, because of the
unverlying libuv funcitons behaviour.

Fixes #2954
2015-08-01 23:16:17 -04:00
Felipe Morales
746a4e9f84 Remove spurious warning when reading directories 2015-08-01 23:16:16 -04:00
cztchoice
d4396acedb vim-patch:7.4.600 #3081
Problem:    Memory wasted in struct because of aligning.
Solution:   Split pos in lnum and col. (Dominique Pelle)

https://github.com/vim/vim/commit/v7-4-600
2015-07-31 21:30:52 -04:00
Justin M. Keyes
ccebc1f8d3 Merge #2660 'generalize mode-change API and support replace-mode cursor' 2015-07-26 23:50:55 -04:00
Omar Sandoval
f79025b9de tui: Use underline cursor in Replace mode
This is a port of my original contribution to Vim, added in 7.4.687
(https://github.com/vim/vim/commit/v7-4-687). The TUI code has been
heavily refactored (see esp. 25ceadab37),
so this required some translation, but the logic is the same.
2015-07-26 23:45:41 -04:00
Omar Sandoval
fa48fc667a api: Simplify UI API on mode change
Currently, there are two functions in the UI API that are called when
the mode changes: insert_mode() and normal_mode(). These can be folded
into a single mode_change() entrypoint which can do whatever it wants
based on the mode it is passed, limited to INSERT and NORMAL for now.
2015-07-26 23:38:35 -04:00
ZyX
61e4a32065 runtime: Remove duplicates and garbage from installation 2015-07-27 00:40:29 +03:00
ZyX
4d2807e128 documentation: Document table meanings in comment to genunicodetables 2015-07-26 22:59:46 +03:00
ZyX
12c269d32a Update unicode files 2015-07-26 22:59:46 +03:00
ZyX
8f9b81059a Create script that downloads and commits UNIDATA files 2015-07-26 22:59:46 +03:00
ZyX
c31b3339ff Generate unicode tables with script when building 2015-07-26 22:59:46 +03:00
Justin M. Keyes
a497bf4bfd Merge pull request #2288 from ZyX-I/autovimsyn
Move part of syntax/vim.vim to syntax/vim/generated.vim
2015-07-26 15:42:42 -04:00
ZyX
6f35bcfb07 syntax: Exclude deprecated options
Excluded options (compatible, edcompatible and ttyfast) are listed in 
vimOnlyOption group.
2015-07-26 21:39:19 +03:00
ZyX
853ba34103 syntax: List NeoVim-specific autocmd events
Note: list was copied from master (7a6bf3f418). 
I did not add more events there.
2015-07-26 21:28:32 +03:00
ZyX
f2b4894c93 syntax: Restore vim-specific highlight groups 2015-07-26 21:21:58 +03:00