Commit Graph

3899 Commits

Author SHA1 Message Date
Lucas Hoffmann
ffe88f0d52 test59: Save source file in utf8, this will mess up a lot of characters. 2015-08-26 10:30:34 +02:00
Lucas Hoffmann
144b4954f7 test59: Turn function definition into source() call. 2015-08-26 10:30:30 +02:00
Lucas Hoffmann
e60e46596a test59: Inital clean up.
Fix some feed() calls and string delimiters
Fix trimming of buffer before final expect().
2015-08-26 10:30:25 +02:00
Lucas Hoffmann
0a495d0be8 tests: Migrate legacy test 59. 2015-08-26 10:30:22 +02:00
Justin M. Keyes
b4d29fe067 vim-patch.sh: update for git 2015-08-26 03:02:13 -04:00
John Whitley
4d39db355b vim-patch.sh: update for Vim's hg => git migration 2015-08-26 02:15:24 -04:00
Michael Reed
9602f0d589 nvim.1: Misc. improvements (2)
Besides some minor rewording, this commit does the following:

- the argument to the `q' flag is optional, so denote it as such
- the cross references to vim (`.Xr vim 1') were pointless, just refer
  to it as `Vim'
- the `d' flag doesn't actually take any arguments; `nvim -d' works
  just fine, so make the manual reflect that
- the `L' flag is just an alias for the `r' flag, so clarify that
- there was a lot of redundancy between the `o', `O', and `p' flags,
  unify their descriptions a bit

Helped-by: Justin M. Keyes <justinkz@gmail.com>

[ci skip]
2015-08-26 00:55:12 -04:00
Rui Abreu Ferreira
f81302d5b0 MSVC: include os/os_defs.h for inline. #3239 2015-08-25 23:08:39 -04:00
Michael Reed
a4856694e1 Small cleanup after #3227
HAVE_SYS_TIME_H isn't being used by anything, remove it.
2015-08-25 21:38:15 -04:00
Michael Reed
2b39453912 Move MAX and MIN macros to macros.h
vim.h is too big, and these were missing parens around the arguments.
These may already be defined in <sys/param.h> or <windef.h>, so guard
them with an #ifndef.

extracted from #810
2015-08-25 21:31:12 -04:00
Seth Jackson
7c135b8ccb MSVC: Define inline and restrict. #3237
MSVC 2015 defines __func__ (C++11).
    https://msdn.microsoft.com/en-us/library/dn919276.aspx

MSVC only allows inline in C++ and requires __inline in C instead.
    https://msdn.microsoft.com/en-us/library/bw1hbe6y.aspx
2015-08-25 19:35:39 -04:00
Nikolay Orlyuk
bbe24da869 fix strict-overflow cases #3236 2015-08-25 19:31:08 -04:00
Rui Abreu Ferreira
fc7055f6e9 Mingw: Use POSIX compatible stdio #3232
- There are some differences between stdio (*printf) functions in POSIX
  and the MS runtime, this commit enables Mingw compatibility for these
  functions
2015-08-25 19:13:23 -04:00
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