Commit Graph

4482 Commits

Author SHA1 Message Date
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
Joe Hermaszewski
442cd0672b Enable focus events in cmdline and terminal modes
This change adds switch cases for K_FOCUSGAINED and K_FOCUSLOST to the
input handling functions in ex_getln.c and terminal.c. The handling is
identical to what's found in edit.c (just calling apply_autocmds).

If one enters cmdline-mode by feeding `:` and sends a focuslost event (by
leaving the window for example) the text `<FocusLost>` will be inserted
into the command line. There is similar behaviour in terminal mode. This
patch corrects this behavior to fire the apropriate autocmd instead.

Fixes #3714
2015-11-23 13:18:27 +01:00
Felipe Morales
321db59ca1 Merge pull request #3270 from ZyX-I/shada-support
Add plugin for editing ShaDa files
2015-11-23 00:27:18 +01:00
Shougo Matsushita
1fbb56795d Update version.c to latest Vim
NA patches list:

652: xxd changes  xxd is not included in neovim
744: if_ruby and if_perl legacy tests
750: if_perl build problem
751: compile options
756: if_perl support
757: term.c changes
759: if_lua support
761: term.c changes
762: term.c changes
763: if_lua support
766: term.c changes
770: term.c changes
772: if_mzsch support
802: duplicated test
809: revert of 802
829: GUI
837: Windows with if_sniff
840: GUI
846: CONTRIBUTING.md
850: CONTRIBUTING.md
851: Win32 console
852: Win32 console
855: GTK GUI
861: GTK GUI
862: GTK GUI
867: Windows Fix
869: Windows GUI
872: CI service
874: Windows GUI
875: README.md
876: Windows GUI
880: CI service
884: CI service
886: Windows GUI
890: if_python3
894: vimrun.exe
899: README.md
900: README.md
902: Win32 console
906: Windows problem
907: Dynamic loading
908: Windows build error
910: if_python
911: terminal
913: hangul input GUI only
917: hangulin.c changes
918: if_python
919: if_lua, if_python, if_python3
920: ruby stuff
921: Windows

Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
2015-11-20 13:44:07 -05:00
Marco Hinz
959f2601f9 Merge PR #3488 'Implement handling of terminal focus events' 2015-11-18 13:41:54 +01:00
Joe Hermaszewski
f480b38a2f Add tests for focus events 2015-11-17 22:36:28 +00:00
Joe Hermaszewski
33eb33bb62 Implement handling of terminal focus events
Two new keys have been added to key_name_entry in keymap.c:
`FocusGained` and `FocusLost`.

Two cases have been added to the key handing switch in edit.c each
applying their respective autocmds.

In normal.c two functions have been added alongside nv_cursorhold doing
a similar job of applying the autocmd for the appropriate key.

tui/input.c has a new function `handle_focus_event` which eats either of
the control sequences for focus gained or lost. This function is checked
before handle_bracketed_paste and handle_forced_escape.

tui.c registers neovim as able to receive these control sequences in
terminfo_start and undoes that in terminfo_stop.

Closes #2302
2015-11-17 22:36:28 +00:00
John Szakmeister
ed06071f1f Merge pull request #3680 from jszakmeister/fix-ordering-oldfiles-spec
Workaround the unstable ordering of v:oldfiles in some more tests.
2015-11-16 09:27:39 -05:00
John Szakmeister
d4f3d819d8 Workaround the unstable ordering of v:oldfiles in some more tests.
Fixes #3676.

Reviewed-by: Marco Hinz <mh.codebro@gmail.com>
2015-11-16 08:29:45 -05:00