Commit Graph

4697 Commits

Author SHA1 Message Date
watiko
21956adb6e tests: Migrate legacy test autocmd_option. 2015-11-28 17:22:53 +09:00
watiko
fe9d91ceb6 vim-patch:7.4.790
Problem:    Test fails when the autochdir feature is not available.  Test
            output contains the test script.
Solution:   Check for the autochdir feature. (Kazunobu Kuriyama)  Only write
            the relevant test output.

d113a80c77
2015-11-28 17:22:53 +09:00
watiko
09f6066bb4 vim-patch:7.4.789
Problem:    Using freed memory and crash. (Dominique Pellej)
Solution:   Correct use of pointers. (Hirohito Higashi)

9cac424d05
2015-11-28 17:22:52 +09:00
watiko
789041c282 vim-patch:7.4.787
Problem:    snprintf() isn't available everywhere.
Solution:   Use vim_snprintf(). (Ken Takata)

fb9bc4829a
2015-11-28 17:22:52 +09:00
watiko
119545190c vim-patch:7.4.786
Problem:    It is not possible for a plugin to adjust to a changed setting.
Solution:   Add the OptionSet autocommand event. (Christian Brabandt)

537443018d
2015-11-28 17:22:28 +09:00
Michael Reed
54b0c09685 Make make test run unit tests too
refs https://github.com/neovim/neovim/pull/2124#discussion_r26107174

Unlike Travis, `make test` currently only runs functional tests.
This can cause confusion since one might (understandably) think that `make
test` runs unit tests too, which it doesn't.

The `oldtest` target is still left out because it's quite slow and
Travis already runs it.
2015-11-27 18:08:15 -05:00
Justin M. Keyes
b9139e009f Merge pull request #3724 from ZyX-I/fix-3635
shada: Do not save unlisted and quickfix buffers
2015-11-27 18:06:52 -05:00
Michael Reed
53ee6425c8 src/*: Remove VIM - Vi improved ... header
Regarding the individual items in the header:

`Vim - Vi improved	by Bram Moolenar`
  Bram Moolenar is already mentioned throughout the documentation, as
  well as the intro screen.

`:help uganda`
  It's already shown to all users who don't use `shortmess+=I` upon
  starting nvim, and is already placed prominently in help.txt, i.e.,
  `:help` run with no arguments.

`:help credits`
  Already mentioned near the top of help.txt.

`README.md`
  Already mentioned in develop.txt.
2015-11-27 16:25:10 -05:00
Michael Reed
951714ede6 Merge pull request #3741 from Pyrohh/doc-rm-todo
[RFC] doc: Remove todo.txt
2015-11-27 14:54:59 -05:00
Rui Abreu Ferreira
8496b71dc1 Windows: Only redefine ssize_t for MSVC
MinGW already has a redefine for ssize_t.
2015-11-26 18:27:48 -05:00
Michael Reed
eea072690b CONTRIBUTING.md: Fix broken sentence 2015-11-26 16:28:35 -05:00
Michael Reed
d3dbaa321b Merge pull request #3531 from equalsraf/tb-cleanup-os-errors
[RFC] Cleanup use of os_* functions errors and errno
2015-11-25 19:52:33 -05:00
Rui Abreu Ferreira
d873084581 Don't use errno constants for os_open() errors
In Windows we can't assume errno will be set by calls to os_* functions,
instead the return value from os_* functions can be used. This commit fixes two
occurences for os_open().

1. EFBIG is replaced with UV_EFBIG and checked against the return from os_open().
2. EOVERFLOW does not have a corresponding libuv constant, and is not defined
   by open() in Windows - disabled this case with a UNIX guard, and check the return
   value against -EOVERFLOW (libuv errors are negative errno values in Unix).
2015-11-25 23:16:37 +00:00
Rui Abreu Ferreira
5bc6e0dc74 Update shada.c to use libuv error constants instead of errno constants
From #3473, shada.c used errno constants (e.g. ENOENT) to check the return
of os_open(), but in Windows the return from libuv functions is not -errno.
Instead use libuv error constants (e.g UV_ENOENT) for error checks.
2015-11-25 23:16:37 +00:00
Rui Abreu Ferreira
28e59cb223 Use libuv errors instead of errno in unit tests
Replaced old unit tests for errno with libuv error codes UV_ENOENT
and UV_EEXIST (for os_open and os_getperms).

Added libuv include path to test/includes compiler calls - needed
to get hold of libuv headers.
2015-11-25 23:16:37 +00:00
Rui Abreu Ferreira
d54338f1e0 Return libuv error code from os_getperm()
Previously os_getperms() returned -1 for any error condition, it
now returns the libuv error code (as returned by os_stat()). This
allows checking for error conditions without relying on errno
(which not available in Windows).

The only case where the errno value from os_getperms() was being used
was in readfile() to set the new-file flag - replaced the errno check
with UV_ENOENT.
2015-11-25 23:15:38 +00:00
Rui Abreu Ferreira
091b6e216c Return libuv return code from os_stat()
Instead of returning bool from os_stat return the actual libuv return code.
This function is static and used internally in nvim/os/fs.c it should not
impact the rest of the API. This is a first step to change other fs functions.
2015-11-25 23:15:37 +00:00
Rui Abreu Ferreira
8dea8a036f Fix comments for os_* functions return value
In windows libuv does not return -errno, instead it uses negative
error codes e.g. UV_ENOENT. This commit changes the comments in os_*
functions to reflect this.
2015-11-25 23:15:37 +00:00
Rui Abreu Ferreira
4f24b9e06f Remove unnecessary includes for errno.h 2015-11-25 16:38:33 -05:00
Michael Reed
5361dedc77 Merge pull request #3742 from Pyrohh/antialias
[RFC] Remove 'antialias' remnants
2015-11-25 15:55:39 -05:00
Michael Reed
f7c4770572 Remove 'antialias' remnants
It never did anything (see `:h hidden-options`).
2015-11-25 14:56:08 -05:00
Michael Reed
9a349f9f3e doc: Remove todo.txt
It's not documentation in the same sense as the majority of files in
runtime/doc, so is of little use to most users and should probably not
be installed alongside the "real" documentation.

It may be full of good ideas, but it's also full of things which are no
longer applicable to Nvim, such as references to platforms we no longer
support (e.g., MS-DOS), Vi compatibility, Autoconf, the Perl interface,
etc.

If someone is looking for things to fix or improve, the GitHub issue
tracker should prove useful, and, unlike todo.txt, the issues are
generally much more relevant to Nvim.  Besides all that, removing
todo.txt makes porting runtime patches a bit easier.

refs #2911, discussed briefly in #2608 and #2553
2015-11-25 14:55:28 -05:00
Michael Reed
12cd633ad2 Merge pull request #3740 from Pyrohh/vi_diff2
[RFC] doc: More vi_diff.txt cleanup
2015-11-25 14:47:14 -05:00
Michael Reed
835d2c132d doc/vi_diff.txt: Remove unneeded opening paragraph
All `{not in Vi}' tags have been removed, so the first sentence is no
longer true.  As for the second sentence, the header ("Differences
between Vim and Vi") is already self-explanatory, so it can be removed
as well.
2015-11-24 15:41:35 -05:00
Michael Reed
ced7ee5b00 doc/vi_diff.txt: Remove remaining "{Vi: ...}" note
We don't care about Vi here, only Vim.
2015-11-24 15:41:35 -05:00
Michael Reed
3618240480 doc: Remove some Vi-compatibility stuff
This stuff is no longer relevant, as we don't care about Vi
compatibility just for the sake of it.
2015-11-24 15:40:56 -05:00
Michael Reed
5da7ea98ca Merge pull request #3733 from Pyrohh/doc_develop
[RFC] doc/develop.txt pruning

Reviewed-by: Felipe Morales < hel DOT sheep AT gmail DOT com >
Reviewed-by: Marco Hinz < mh DOT codebro AT gmail DOT com >
2015-11-24 12:09:42 -05:00
Michael Reed
69770c6cc6 doc/develop.txt: Remove "coding-style" section
By and large, it's very outdated, and we already have a style guide
available online (see CONTRIBUTING.md).
2015-11-24 12:08:14 -05:00
Michael Reed
d9e7a5a4cf doc/develop.txt: Mention src/nvim/README.md 2015-11-24 12:08:14 -05:00
Michael Reed
36f6863969 doc/develop.txt: Remove "design-assumptions" section
We don't make such assumptions; new code should use fixed-width integer
types [1].

[1]: https://neovim.io/develop/style-guide.xml?showone=Integer_Types#Integer_Types
2015-11-24 12:08:14 -05:00
Michael Reed
4f569333db Merge pull request #3734 from Pyrohh/src-readme
[RFC] src: README.txt -> README.md
2015-11-24 12:07:45 -05:00
Michael Reed
af5483089e src: README.txt -> README.md
The former no longer exists in this repo; see the top of
src/nvim/README.md.
2015-11-23 21:38:08 -05:00
Michael Reed
57a5745c95 Merge pull request #3731 from Pyrohh/gitignore
Update .gitignore
2015-11-23 18:42:17 -05:00
Michael Reed
fdfdd6e155 Update .gitignore
refs #3687
2015-11-23 18:40:34 -05:00
Michael Reed
84a5709a86 Merge pull request #3624 from Pyrohh/vi_diff
[RFC] vi_diff.txt pruning
2015-11-23 18:37:36 -05:00
Felipe Morales
80cf03602e Merge pull request #3581 from ZyX-I/fix-shada
Store last search direction when writing ShaDa files
2015-11-23 23:03:29 +01:00
Michael Reed
53f44310d7 doc: vi_diff: Remove 'Missing options' section
The compatibility stubs for these options were removed in [1], so this
section is nearly useless.

[1]: cc76c5b0cf
2015-11-23 15:46:10 -05:00
Michael Reed
acadfc20c4 doc: vi_diff: Remove 'Other vim features' section
These are more like notes than proper documentation, so remove it as
they're not of much use unless you don't know what you're looking for.

Many of these are somewhat useful, but many also duplicate what's
already documented elsewhere.  In any case, vi_diff.txt is the last
place that assorted tips'n'tricks should be located (we already have
tips.txt!!!).
2015-11-23 15:46:10 -05:00
Michael Reed
02478686f1 doc: vi_diff: Remove 'Command line arguments' section
In regards to Nvim, it's very outdated; for an updated list of such
arguments refer to the manual page or `nvim --help`.  In all other
regards, it's of little to no use to end-users.
2015-11-23 15:46:10 -05:00
Michael Reed
87e2a1ee40 doc: Remove stray {not in Vi} tag
This was missed in 818f7aefd2
2015-11-23 15:46:10 -05:00
ZyX
b98cea909f shada: Also store last search direction
Note: it looks like viminfo files do not store search direction intentionally.
After reading viminfo file search direction was considered to be “forward”.

Note 2: all files created on earlier Neovim version will automatically receive
“forward” direction.

Fixes #3580
2015-11-23 17:08:01 +03:00
Marco Hinz
369c1fdb25 Merge PR #3687 'Add luacheck for linting tests' 2015-11-23 13:58:35 +01:00
Marco Hinz
d9fbc1865b test/functional: clean up according to luacheck (part 2) 2015-11-23 13:57:21 +01:00
Marco Hinz
4a69e55f39 test/functional: clean up according to luacheck (part 1) 2015-11-23 13:57:21 +01:00
Marco Hinz
32ecd75a16 test/unit: clean up according to luacheck 2015-11-23 13:57:21 +01:00
Marco Hinz
4afd386276 test/benchmark: clean up according to luacheck 2015-11-23 13:57:21 +01:00
Marco Hinz
818f926eb0 Tests: add luacheck for linting tests
Source: https://github.com/mpeterv/luacheck
Docs:   http://luacheck.readthedocs.org/en/0.12.0/index.html

Run via "make testlint".
2015-11-23 13:57:21 +01:00
Marco Hinz
4680b4f3b1 Remove outdated comment from BuildLuarocks.cmake 2015-11-23 13:27:21 +01:00
Marco Hinz
97cee2c2e3 Merge PR #3715 'Enable focus events in cmdline and terminal modes' 2015-11-23 13:19:00 +01:00
Joe Hermaszewski
6329fd420e Reorganize focus events test into individual tests
The focus event tests now live in their own `describe` block with each
test testing the handling of focus events in a single mode.
2015-11-23 13:18:27 +01:00