Commit Graph

3886 Commits

Author SHA1 Message Date
Justin M. Keyes
6cf2925f63 screen.c: remove screen_char_attr #3235
screen_char_attr is always 0, it was obviated by
3baba1e7bc.

References #1889
2015-08-25 18:59:41 -04:00
Chiu-Hsiang Hsu
54973477e7 vim-patch:7.4.799
Problem:    Accessing memory before an allocated block.
Solution:   Check for not going before the start of a pattern.  (Dominique Pelle)

https://github.com/vim/vim/commit/v7-4-799
2015-08-25 18:43:49 -04:00
Seth Jackson
2753be6e4d Windows: Define ssize_t and SSIZE_MAX. #3228
Remove R_OK, W_OK defines because os/os.h includes <uv.h> which includes
uv-win.h which defines R_OK and W_OK.
2015-08-25 18:31:22 -04:00
Rui Abreu Ferreira
5066128d48 Windows: Accept CRLF in msgpack-gen.lua grammar #3226
- MSVC generates output using Windows newlines (\r\n) instead of (\n).
2015-08-24 04:35:44 -04:00
Felipe Morales
45121a267f defaults: set 'laststatus' to 2. #2876 2015-08-24 00:48:32 -04:00
Justin M. Keyes
7280e8c365 remove references to <sys/time.h>
Since gettimeofday() was replaced by os_time in
fb5a786bdb we do not need sys/time.h.
2015-08-24 00:27:30 -04:00
Rui Abreu Ferreira
e7b58b4e53 Windows: is_executable(): do not check exec bit.
In Windows there is no equivalent to the filesystem executable bit; the
documentation states that for Windows :executable() returns
1 for all files. But this behaviour was broken because is_executable()
checked for the UNIX bit.

When WIN32 is defined we now skip the S_IXUSR check.
2015-08-23 23:53:24 -04:00
Rui Abreu Ferreira
5090d94699 Windows: Add has('win32'). #3223
References #810
2015-08-23 14:52:03 -04:00
Felipe Morales
be29de1fa2 defaults: set 'listchars' to "tab:> ,trail:-,nbsp:+". #2872
Re: https://github.com/neovim/neovim/issues/2676
2015-08-22 13:48:48 -04:00
Thiago de Arruda
105a72eabc terminal: Fix use after free
Since close_cb may free the terminal structure, save the "wipe" flag before
calling it.
2015-08-22 01:01:14 -03:00
John Szakmeister
f9778052af tests: fix the glob tests when building under a long path #3214 2015-08-21 23:58:39 -04:00
Thiago de Arruda
c75d5010b7 Merge PR #3210 'Bugfixes'
Helped-by: oni-link <knil.ino@gmail.com>
Reviewed-by: oni-link <knil.ino@gmail.com>
2015-08-21 13:38:11 -03:00
Thiago de Arruda
3d2d44037f terminal: Only wipe buffer terminal_close wasn't called
After @250aca4f8938 it is possible that terminal_close will be called without
invoking the close_cb(which normally destroys the terminal structure). If this
happens, the terminal buffer will already be deleted so there's no need to call
`bwipeout!`.
2015-08-21 13:28:53 -03:00
Thiago de Arruda
cb87670ff8 main: Initialize event loop before command_line_scan
The call to `event_init()` was too late. `command_line_scan()` in `main()` could
already need the loop initialized. Ref https://github.com/neovim/neovim/issues/3045#issuecomment-123405833.

A consequence of this change is that it was necessary to move the
`channel_from_stdio()` call to `command_line_scan()` when embedded_mode is set.
2015-08-21 13:28:53 -03:00
Thiago de Arruda
1beee0685d eval: Protect job callbacks from being redefined
ref: #3188
2015-08-21 13:28:49 -03:00
Thiago de Arruda
6e59b7b0e5 tui/remote_ui: Fix some regressions
- Explicitly set the SignalWatcher event queue. Without this, the watcher will
  publish events to the fast queue, resulting in resize bugs for certain
  terminals(#2322).
- Set `async = false` to the `remote_ui_attach` handler(It was a deferred
  before, this is the new equivalent)
2015-08-21 10:56:57 -03:00
Robin Allen
d5b5063622 Notify attached UIs whenever menus change
This adds a redraw notification "update_menu" which is sent whenever
Vim's menus are changed by the :menu command and friends.
2015-08-21 14:23:50 +01:00
oni-link
250aca4f89 terminal.c: Events in terminal_enter() should not free the terminal
It is possible for a processed event in the input loop of
terminal_enter() to destroy the terminal. But this is undetected by the
function and it still tries to use the freed terminal.

Use a reference count to delay the freeing of the terminal until
terminal_enter() returns.

Fixes #3112
2015-08-21 10:53:31 +02:00
sanmiguel
0ec6a9c3c3 provider/pythonx.vim: Use shell-agnostic construction. #3190 2015-08-21 00:33:29 -04:00
ZyX
57eaefbb23 ci: Use error suppression in place of ignored files list. #3185
Fixes #3174
2015-08-20 23:40:15 -04:00
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