Commit Graph

5766 Commits

Author SHA1 Message Date
Rui Abreu Ferreira
d0a3f8b73f Add missing include fcntl.h
In Windows, open() flags like O_RDONLY need fcntl.h.
2016-04-29 08:24:07 +01:00
Justin M. Keyes
a1d326a251 Merge pull request #1112 from justinmk/os_nodetype
os_nodetype: impl with libuv
2016-04-29 00:42:55 -04:00
Justin M. Keyes
7db4a15e95 os_nodetype: impl with libuv 2016-04-29 00:22:43 -04:00
Justin M. Keyes
43e7c40051 Merge pull request #4670 from equalsraf/tb-remove-unix-guard
Remove old UNIX ifdef from buf_write()
2016-04-28 22:38:32 -04:00
Rui Abreu Ferreira
136374ec6f Remove old UNIX ifdef from buf_write()
When backupcopy=auto buf_write assumes backupcopy=yes when the file is a
hard/symbolic link. However this check was guarded by a UNIX ifdef. The
check itself is portable and the guard can be removed.

Added a couple tests to check the behaviour of bkc=auto and bkc=no
with a symbolic link.

Reported in #4525
2016-04-28 23:58:21 +01:00
Justin M. Keyes
eefcc50f2c Merge pull request #4668 from fwalch/archlinux-filetypes
Runtime: Re-add support for Arch Linux PKGBUILDs.
2016-04-28 16:32:52 -04:00
Florian Walch
9cd2488334 Runtime: Re-add support for Arch Linux PKGBUILDs.
Originally done in #1087, but was accidentally removed in #4595.

Resolves #4613, resolves #4667.
2016-04-28 22:18:05 +02:00
pips.linux
ee4d1f2cce vim-patch:7.4.1236
Problem:    When "syntax manual" was used switching between buffers removes
            the highlighting.
Solution:   Set the syntax option without changing the value. (Anton
            Lindqvist)

885f24fbca

Patch applied cleanly to the nvim sources except for version.c.
2016-04-28 21:11:03 +02:00
KillTheMule
360d0513d1 Satisfy testlint.
For that, make luatest ignore the preload.lua files.
2016-04-28 19:30:17 +02:00
Justin M. Keyes
81e0874a54 option.c: include header for completeopt_was_set 2016-04-28 00:09:33 -04:00
Justin M. Keyes
860a0194a4 Merge pull request #4661 from brcolow/vim-7.4.1401
vim-patch: 7.4.1401
2016-04-27 23:16:54 -04:00
Justin M. Keyes
ef4c0070ce Merge pull request #4652 from HiPhish/coverity-defects
Fix coverity errors in `haslocaldir()` and `getcwd()`.
2016-04-27 23:15:08 -04:00
Justin M. Keyes
c6594d73c6 Merge pull request #4625 from brcolow/vim-7.4.1075
vim-patch: 7.4.1075
2016-04-27 21:54:48 -04:00
Justin M. Keyes
4ff793eaab Merge pull request #4655 from brcolow/vim-7.4.1035
vim-patch: 7.4.1035
2016-04-27 21:53:05 -04:00
Justin M. Keyes
b447b865cd Merge #4591 2016-04-27 21:48:35 -04:00
KillTheMule
f931e78fe4 test: matchparen_spec.lua
Covers vim-patch 7.4.1296
2016-04-27 21:48:18 -04:00
KillTheMule
61e25f995c vim-patch:7.4.1296
Problem:    Cursor changes column with up motion when the matchparen plugin
            saves and restores the cursor position. (Martin Kunev)
Solution:   Make sure curswant is updated before invoking the autocommand.

f068dcafcf

Applied manually.

Could reproduce the bug with vim/vim@4d8747c but not with vim/vim@2693ca2,
so it must have appeared inbetween. For discussion, see

https://groups.google.com/forum/#!msg/vim_dev/t2sdeFhkybs/WEtLJpCODQAJ
http://vim.1045645.n5.nabble.com/Cursor-behaviour-change-td5726895.html

Could not reproduce with current nvim master.
2016-04-27 21:44:13 -04:00
Justin M. Keyes
2d5520fb25 Merge pull request #4622 from Shougo/vim-7.4.1753
vim-patch:7.4.1753
2016-04-27 21:01:03 -04:00
Michael Ennen
c0de12c3c5 vim-patch: 7.4.1401
Problem:    Having 'autochdir' set during startup and using diff mode doesn't
            work. (Axel Bender)
Solution:   Don't use 'autochdir' while still starting up. (Christian
            Brabandt)

6bd364e084
2016-04-27 16:28:38 -07:00
HiPhish
f644d8d88e Fix coverity errors in haslocaldir() and getcwd.
The Vim function `haslocaldir()` would crash if the users called it with
the two arguments `-1, -1`. Now it returns `0` in that case.

The coverity issue was complaining about a NULL dereference, but there
can never be a case where the pointer `tp` is NULL and being
dereferenced. An assertion has been put in place to satisfy coverity.

Furthermore the functions themselves have been cleaned up. First of all
the documentation comment for the different scopes has been extended and
a macro for the minimum scope has been introduced. In both functions any
time a scope is used as a range (e.g. in a loop) macros instead of
actuals scopes are used, that makes the functions more robust if new
scopes are added.

Second, in the implementation of `getcwd()` there was a superfluous
loop, it has been removed completely. I also changed all `goto end` to
plaing `return` statements by moving the allocation of `cwd` down, that
way there is no need for `goto` anymore.
2016-04-27 18:53:00 +02:00
Michael Ennen
de0ea44698 vim-patch: 7.4.1101
Problem:    With 'rightleft' and concealing the cursor may move to the wrong
            position.
Solution:   Compute the column differently when 'rightleft' is set. (Hirohito
            Higashi)

e39b3d9fb4
2016-04-26 23:43:42 -07:00
Michael Ennen
7209d3c59a vim-patch: 7.4.1075
Problem:    Crash when using an invalid command.
Solution:   Fix generating the error message. (Dominique Pelle)

05fe017c1a
2016-04-26 23:33:22 -07:00
Michael Ennen
6bb4b9f57f vim-patch:7.4.1006 #4605
Problem:    The fix in patch 7.3.192 is not tested.
Solution:   Add a test, one for each regexp engine. (Elias Diem)

96c664af27

The patch was applied to 044_099_regexp_multibyte_magic_spec.lua as
these two legacy tests (44 and 99) were merged together (and
de-duplicated) in Neovim.
2016-04-27 00:37:05 -04:00
Justin M. Keyes
2adb8acebd Merge pull request #4649 from justinmk/vimpatches
vim-patch:7.4.1092
2016-04-27 00:04:36 -04:00
Justin M. Keyes
ec916bb983 Merge pull request #4630 from jamessan/vim-7.4.613
vim-patch:7.4.613
2016-04-26 23:48:16 -04:00
Justin M. Keyes
e4146dd7df remove disable_char_avail_for_testing()
test_cursor_func.vim hangs at the call to
disable_char_avail_for_testing(). The test does not actually need this
function (and it correctly fails if the fix from 7.4.1300 is reverted).
Given that disable_char_avail_for_testing is a gigantic hack, if we can
avoid it let's do so.
2016-04-26 23:32:01 -04:00
Michael Ennen
cc410185c0 vim-patch: 7.4.1035
Problem:    An Ex range gets adjusted for folded lines even when the range is
            not using line numbers.
Solution:   Only adjust line numbers for folding. (Christian Brabandt)

a3306958dc
2016-04-26 20:22:11 -07:00
Justin M. Keyes
ea483231c5 Merge pull request #4593 from ZyX-I/length-functions
Make some function accept strings with length in place of just strings
2016-04-26 23:12:42 -04:00
Justin M. Keyes
0d6fe73d7b vim-patch:7.4.1118
Problem:    Tests hang in 24 line terminal.
Solution:   Set the 'more' option off.

a99b90437a
2016-04-26 22:37:00 -04:00
Justin M. Keyes
e861af85f8 Merge pull request #4647 from justinmk/vimpatches
version.c: update NA; vim-patch:7.4.998
2016-04-26 00:01:46 -04:00
Justin M. Keyes
17294977bd Merge pull request #4631 from KillTheMule/vim-7.4.871
vim-patch:7.4.871
2016-04-25 23:20:23 -04:00
James McCoy
204629a1a0 regexp_nfa.c: Fix various linter errors 2016-04-25 06:36:13 -04:00
James McCoy
ee9cca892c vim-patch:7.4.613
Problem:    The NFA engine does not implement the 'redrawtime' time limit.
Solution:   Implement the time limit.

70781ee403
2016-04-25 06:36:08 -04:00
Justin M. Keyes
67d5a1aae2 vim-patch:7.4.1092
Problem:    It is not simple to test for an exception and give a proper error
            message.
Solution:   Add assert_exception().

a803c7f940
2016-04-25 06:34:29 -04:00
Justin M. Keyes
db9c22adb9 legacy test: Makefile 2016-04-25 06:34:29 -04:00
KillTheMule
cf434d2ae4 Satisfy the linter. 2016-04-25 06:34:28 -04:00
KillTheMule
3d73956b96 Add documentation for disable_char_avail_for_testing, handpicked from
6463ca229c
7823a3bd2e
2016-04-25 06:34:28 -04:00
KillTheMule
11fd965554 vim-patch:7.4.1300
Problem:    Cannot test CursorMovedI because there is typeahead.
Solution:   Add disable_char_avail_for_testing().

2ab375e54e

Most of it manually applied.
2016-04-25 06:34:28 -04:00
KillTheMule
ad99d0bf7e vim-patch:5a46a58
Add missing test file.

5a46a58eb6
2016-04-25 06:34:28 -04:00
Justin M. Keyes
ef977c6b68 vim-patch:7.4.998 2016-04-25 05:25:32 -04:00
KillTheMule
5797f40646 version.c: update NA
7.4.797:

- Modified function redraw_asap was removed in
  e0e41b30c6,
  together with its only caller check_termcode.
- Grepping for the following regexps did not yield any result in
  nvim/src and its subdirectories: rows.*\*.*Columns (lines modified
  often), ScreenLinesC\[r\] (one of the sources of the bug),
  msg_scrolled followed by grepping for NORMAL (another line that was
  changed for the bug)
- The out-of-bound access was on the array *screenlineC[MAX_MCO] (see
  the diff). I grepped for MAX_MCO an checked every array of that length
  for out-of-bounds access in its scope (I did not check for called
  functions, e.g. utfc_ptr2char(p, u8cc) where u8cc was of length
  MAX_MCO). I did not find any.
- The code for drawing on the screen was moved to the TUI, which was
  newly written.

7.4.733:

- test_listchars was converted to a lua test in
  https://github.com/neovim/neovim/pull/2492
- Since no file is sourced anymore, the behavior of the lua test should
  not depend on the setting of ff
2016-04-25 05:25:31 -04:00
Justin M. Keyes
ef205c3851 Merge pull request #4325 from watiko/vim-7.4.984
vim-patch:7.4.{984,1093}
2016-04-25 04:17:45 -04:00
Justin M. Keyes
6f98034686 Merge pull request #4632 from KillTheMule/vim-7.4.822
vim-patch:7.4.822
2016-04-25 04:12:04 -04:00
Justin M. Keyes
588bc1d958 Merge #4303 'vim-patch:7.4.{951,1143,1144}'. 2016-04-25 03:56:33 -04:00
Justin M. Keyes
121e76db6f Merge pull request #4273 from watiko/vim-7.4.957
vim-patch:7.4.{941,942,957}
2016-04-25 03:20:45 -04:00
bambu
5a5ef1c222 mouse: Implement horizontal scroll. #3450
- Code from Vim source.
- Removed the check for 'guioptions'
- mouse_spec.lua: test <ScrollWheelLeft> and <ScrollWheelRight>
- Move horizontal scroll logic to mouse.c
- Remove 'gui_' from the function names
- Renamed variables to be more specific (as opposed to generic p, w).
- Marked some functions as `static`
2016-04-25 01:31:44 -04:00
Justin M. Keyes
dfe85dd80a Merge pull request #4642 from justinmk/unittest-event_init
test/unit: ensure event_init()
2016-04-25 01:10:55 -04:00
Justin M. Keyes
49c5689f45 test/unit: ensure event_init()
Closes #4635
References #4630
References https://github.com/neovim/neovim/pull/4070#discussion_r50626558
2016-04-25 00:42:44 -04:00
Justin M. Keyes
6e5343d230 test: shell_spec: rename variable 2016-04-24 23:58:11 -04:00
Justin M. Keyes
7925ffc872 version bump 2016-04-24 21:58:07 -04:00