Commit Graph

3866 Commits

Author SHA1 Message Date
Steven Oliver
2bce7c9bae Fix lint errors #3204
Remove formatting errors from arabic.c and cursor_shape.c
2015-08-20 23:34:52 -04:00
Justin M. Keyes
f253c8d9b4 Merge pull request #3203 from jamessan/vim-7.4.813
Add getcharsearch() and setcharsearch()
2015-08-20 12:45:11 -04:00
James McCoy
f6f28c18e5 7.4.813
patch 7.4.813
Problem: It is not possible to save and restore character search state.
Solution: Add getcharsearch() and setcharsearch().  (James McCoy)

https://github.com/vim/vim/releases/tag/v7.4.813
https://github.com/vim/vim/releases/tag/v7.4.826

Signed-off-by: James McCoy <vega.james@gmail.com>
2015-08-20 10:32:25 -04:00
Justin M. Keyes
2647677618 Merge pull request #2159 from ZyX-I/auto-unicode
Generate unicode tables with script
2015-08-19 23:41:12 -04:00
James McCoy
08bae45337 Update patches list, 7.4.791 - 7.4.826
Signed-off-by: James McCoy <vega.james@gmail.com>
2015-08-19 22:04:24 -04:00
ZyX
60e62824b8 runtime: When generating helptags run NeoVim in headless mode
I see that problem fixed by #2801 was resurrected by making help tags file
generated in a more direct way. This fixes the hang without using the empty
file.
2015-08-19 22:23:47 +03:00
Justin M. Keyes
8653000782 Merge pull request #3184 from justinmk/remove_is_readonly
os/fs.c: remove os_file_is_readonly()
2015-08-18 21:57:32 -04:00
Justin M. Keyes
681ee8131c Merge pull request #2910 from blueyed/python-fix-path_hook
Python: fixes for sys.path_hooks handler
2015-08-17 19:21:19 -04:00
Justin M. Keyes
8f09fa1a49 os/fs.c: remove os_file_is_readonly()
os_file_is_readonly() in its current form is equivalent to
!os_file_is_writable(). This does not appear to be a bug, because Vim's
use of check_file_readonly() (which we changed to os_file_is_readonly())
is equivalent to !os_file_is_writable() in every case.

os_file_is_readonly() also fails this test:

    returns false if the file is non-read, non-write

A more useful form would define behavior under these cases:

  - path is executable (but not writable)
  - path is non-existent
  - path is directory

But there is no reason for os_file_is_readonly() to exist, so remove it.
2015-08-17 01:15:04 -04:00
Justin M. Keyes
d5cd15e67f test: more cases for os_file_is_readonly() 2015-08-17 01:14:13 -04:00
Justin M. Keyes
14d2a90db9 Merge pull request #3166 from justinmk/file_is_readable
os_file_is_readable()
2015-08-17 01:10:16 -04:00
Justin M. Keyes
86c38ef126 os_file_is_*: libuv impl
- uv_fs_access() is far more robust than access(). In particular, it
  handles utf16 paths (Windows).
- Still need R_OK, W_OK in win_defs.h
2015-08-17 01:07:48 -04:00
Rui Abreu Ferreira
b1e18dc393 win_defs.h: define R_OK, W_OK for MSVC. 2015-08-17 01:07:48 -04:00
Justin M. Keyes
ad6b356119 test: cover os_file_is_readable() 2015-08-17 01:07:48 -04:00
Justin M. Keyes
3ce1b4015f fs.c: implement os_file_is_readable()
Use access() because:

- We already use it for os_file_is_writable()
- Vim's old check_file_readonly() ends up using access() after all.
2015-08-17 01:06:00 -04:00
Justin M. Keyes
616b787d12 tutor: avoid 'wildignore' pain 2015-08-16 21:13:26 -04:00
Justin M. Keyes
521a9816d0 Merge pull request #3179 from ZyX-I/clint-find-new-errors
Add ability to suppress errors to clint.py
2015-08-16 17:17:34 -04:00
oni-link
db7b970057 rstream.c: Prevent stream closing if a read event is still queued. #3172
Processing a stream's output can be queued. If stream_close() is called
before the queue is processed, the RBuffer containing the stream's data
is freed and the next read event would try to access freed memory.

To fix this behavior, use the stream's pending requests counter.
2015-08-16 14:09:29 -04:00
Pepe Padial
2bd3351c37 Remove unused assignement #3173
Based on this report
http://neovim.io/doc/reports/clang/report-808d3e.html#EndPath
2015-08-16 14:06:48 -04:00
Felipe Morales
4912dcf3c7 install tutorial files #3180 2015-08-16 14:02:35 -04:00
ZyX
b9276dd630 vim.h: Fix error which is not suppressed by clint 2015-08-16 16:14:15 +03:00
Florian Walch
90ef218610 Add introductory text to intro screen. #1885 2015-08-15 15:11:28 -04:00
Justin M. Keyes
197a5ad376 Merge pull request #2700 from fmoralesc/vim-tutor-mode
runtime: Include vim-tutor-mode
2015-08-15 14:56:46 -04:00
Felipe Morales
4fc1ab779d runtime: Include vim-tutor-mode
vim-tutor-mode provides a mechanism to write and read interactive
tutorials in vim. It's aim is to replace the venerable vimtutor with a
more modern system.

The plugin's development is maintained at https://github.com/fmoralesc
/vim-tutor-mode

Closes #2351.
2015-08-15 15:25:30 -03:00
Felipe Morales
d8f1acbf9d tui: restore got_winch in sigwinch_cb #3171
Fixes minor regression from #3145.
2015-08-15 12:57:18 -04:00
ZyX
aa6723d16b clint: Add support for errors suppression 2015-08-15 19:09:16 +03:00
Thiago de Arruda
a94a68145b Merge PR #3029 'Refactor event processing architecture'
Helped-by: oni-link <knil.ino@gmail.com>
Reviewed-by: oni-link <knil.ino@gmail.com>
2015-08-13 12:20:53 -03:00
Thiago de Arruda
f1de097dbb eval: Fix jobwait() to process multiple jobs concurrently
The new event processing architecture changed `jobwait()` semantics: Only one
job is processed at time since process_wait only focuses on one queue.

This fixes the problem with a few changes:

- Allow the event queue polled by `process_wait` to be overriden by a new
  argument.
- Allow the parent queue to be overriden with `queue_replace_parent`
- Create a temporary queue that serves as the parent for all jobs passed to
  `jobwait()`
2015-08-13 11:53:19 -03:00
Thiago de Arruda
a816c726bb pty_process: Make termios structure a static variable
The structure has a constant initializer and is only used for reading.
2015-08-13 08:52:17 -03:00
Thiago de Arruda
6b3cd381dc rstream: Pass read count to read events
This is necessary to keep events in the same order received from the OS.
2015-08-13 08:52:17 -03:00
oni-link
166d8c799f process: Remove indeterminism that causes reordering of pty events
Since pty events are queued, it is possible that the reads will be reordered.
Example scenario:

In the terminal you have output combined from stdout and stderr. A program
generates output, first you have some output on stdout, then output on stderr,
output on stdout, output on stderr,...  The whole output should be interleaved
from both streams.

Each output generates a read_event and they are placed in the same queue. If the
queue is processed, the first read_event will send the whole stdout output to
the terminal (on_job_output() consumes the whole buffer). The next read_event is
similar for stderr. The remaining read events do nothing because now both
RBuffer are already empty. So the terminal would show first the stdout output
and after that the stderr output.

This commit fixes the problem by disabling stderr stream in pty processes.
That's ok because they all represent the same stream(duplicate file
descriptors), plus one stream is simpler to deal with.
2015-08-13 08:52:17 -03:00
Thiago de Arruda
502aee690c event: Refactor async event processing
- Improve the implementation of deferred/immediate events.
- Use the new queue module to change how/when events are queued/processed by
  giving a private queue to each emitter.
- Immediate events(which only exist to break uv_run recursion) are now
  represented in the `loop->fast_events` queue.
- Events pushed to child queues are propagated to the event loop main queue and
  processed as K_EVENT keys.
2015-08-13 08:49:38 -03:00
Thiago de Arruda
a6e0d35d2d queue: Implement a more flexible event queue 2015-08-13 08:46:21 -03:00
Thiago de Arruda
1a7a020b68 lib: Include libuv circularly linked list
This is simpler and more efficient than klist.h for implementing queues that
support insertion or removal at arbitrary positions.
2015-08-13 07:41:04 -03:00
Thiago de Arruda
0d71354058 test: Make sure ENTER prompt is exited in clipboard_provider_spec
The test may hang without this.
2015-08-13 07:41:04 -03:00
Thiago de Arruda
bef0c03b25 terminal: Ensure terminal buffers are flushed on exit
When a terminal closed, make sure it is refreshed before the Terminal structure
is freed. Also extract `refresh_terminal` from `on_refresh`.
2015-08-13 07:41:04 -03:00
Thiago de Arruda
696f9c2759 process: Pass loop reference during initialization
Change the API so that it is passed to {uv,pty}_process_init instead of
`process_spawn`.
2015-08-13 07:41:04 -03:00
Thiago de Arruda
3f5af6c1c4 loop: Simplify loop.c and move some code to input.c
- Declare poll timer in Loop structure instead of a loop_poll_events local
  variable.
- Move deferred event management to input.c
2015-08-13 07:41:04 -03:00
Thiago de Arruda
ccdeb91e12 msgpack: Replace FUNC_ATTR_DEFERRED by FUNC_ATTR_ASYNC
API functions exposed via msgpack-rpc now fall into two categories:

- async functions, which are executed as soon as the request is parsed
- sync functions, which are invoked in nvim main loop when processing the
  `K_EVENT special key

Only a few functions which can be safely executed in any context are marked as
async.
2015-08-13 07:41:04 -03:00
Thiago de Arruda
b13011ff47 pty_process: Simplify cleanup after error during spawn 2015-08-13 07:41:04 -03:00
Thiago de Arruda
024b1f39a3 eval: Fixes to job control
- Ensure TerminalJobData is freed in case of error when spawning pty jobs
- Check if job was stopped in every function that receives a job id.
2015-08-13 07:41:04 -03:00
Thiago de Arruda
a10b327073 events: Add missing function attributes to some APIs 2015-08-13 07:41:04 -03:00
Daniel Kosinski
6bf322c6ff doc: Fix typo in nvim-python. #3162 2015-08-12 21:57:29 -04:00
ZyX
a6c6128681 runtime: Do install generated syntax file, also test this. #3160
Fixes #3157
2015-08-11 13:50:43 -04:00
Justin M. Keyes
d21690a66e test: cover :grep
References #3156
2015-08-11 12:49:50 -04:00
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