Commit Graph

3057 Commits

Author SHA1 Message Date
Justin M. Keyes
424c04f2c9 Merge pull request #2214 from Pyrohh/version-cleanup
Version output cleanup
2015-03-23 08:20:22 -04:00
Michael Reed
8c19152dcb version.c: Clean up --version / :version output
Despite the +/- prefix, the majority of these features have been made
non-optional at compile time, so their presence here is misleading.

Also mention `:h vim-differences` to make it clear our that many
features are non-optional.
2015-03-22 16:55:50 -04:00
Björn Linse
1257b303ac Merge pull request #2212 from bfredl/concealfix
fix missing  conceal cchar when it is the first syntax group shown
2015-03-22 21:17:35 +01:00
Michael Reed
eea804ab59 Remove *_BUILTIN_TCAPS & 'ttybuiltin'
'ttybuiltin' was removed and *_BUILTIN_TCAPS was made into dead code in
PR #1820.
2015-03-22 15:41:29 -04:00
Eliseo Martínez
4bc62c76c7 Merge #2184: Fix coverity issues. (6)
Reviewed-by: oni-link <knil.ino@gmail.com>
2015-03-22 11:45:48 +01:00
Eliseo Martínez
44b563409e Passing-by: Add function attributes. 2015-03-22 11:32:30 +01:00
Eliseo Martínez
c6784d9f6f coverity/105985: Resource leak: RI.
Problem    : Resource leak @ 94, 98, 102.
Diagnostic : Real issue.
Rationale  : Coverity doesn't know that uv_pipe_open will save file
             descriptor to close them later. So, it signals file
             descriptors being leaked. This would then seem like a false
             positive we can fix by teaching coverity about uv_pipe_open
             through model file.
             But then we realize that the above is only true if
             uv_pipe_open succeeds. It it fails, then descriptors are
             really being leaked, which is why this is considered a real
             issue and not a false positive after all.
Resolution : Add error handling to correctly close descriptors if
             uv_pipe_open fails at any point.
             Add model for uv_pipe_open so that Coverity knows it will
             save descriptors when no error.

Helped-by: oni-link <knil.ino@gmail.com>
2015-03-22 11:32:30 +01:00
Eliseo Martínez
a2b4535747 coverity/105982: Unckecked return value: RI.
Problem    : Unchecked return value from library @ 91.
Diagnostic : Real issue.
Rationale  : fcntl can fail, which is not being checked.
Resolution : Add corresponding error handling.

Helped-by: oni-link <knil.ino@gmail.com>
2015-03-22 11:32:20 +01:00
Eliseo Martínez
3db0a40d69 coverity/105568: Free of array-typed value: FP.
Problem    : Free of array-typed value @ 3628.
Diagnostic : False positive.
Rationale  : expand_shell_cmd() is called with a mock value for file
             (*file = (char_u **)""). That means we want file to be
             filled with a new value. We can't use *file = NULL because
             that means we don't want file to be filled.
             Now, coverity incorrectly thinks that sentinel value is the
             one we are freeing up at some other later point, which is
             not the case.
Resolution : Assert that, when we are freeing *file, its value is
             different than the sentinel one.
2015-03-22 11:31:47 +01:00
Eliseo Martínez
fb44a233a5 coverity/13777: String not null terminated: RI.
Problem    : String not null terminated @ 1543.
Diagnostic : Real issue.
Rationale  : We are reading a struct block0, which contains some string
             fields, from a file, without checking for string fields to
             be correctly terminated. That could cause a buffer overrun
             if file has somehow been garbled.
Resolution : Add string fields check for nul termination.
             Mark issue as intentional (there seems to be no way of
             teaching coverity about read_eintr being ok that way).

Helped-by: oni-link <knil.ino@gmail.com>
2015-03-22 11:31:46 +01:00
Björn Linse
04c8235df0 vim-patch: mark 7.4.673 as included 2015-03-21 22:05:50 +01:00
Björn Linse
19ca54b969 syntax: let first syntax item seqnr be 1 instead of 0
in screen.c:win_line seqnr 0 represents the state: no current syntax
item
2015-03-21 13:48:29 +01:00
Michael Reed
4fc0291c73 Update to libuv 1.4.2 2015-03-21 09:21:51 -03:00
Gustaf Lindstedt
a9e6a768c5 legacy test script: minor string handling fix #2181
Add check to see if a string contains ], which can result in
cases where wrapping a string in [[...]] breaks. Use [=[...]=] instead
on those strings.

Use [=[...]=] for insert() and expect().
2015-03-20 18:19:19 -04:00
Perry Hung
26e6bca769 vim-patch:7.4.503 #2178
Problem:    Cannot append a list of lines to a file.
Solution:   Add the append option to writefile(). (Yasuhiro Matsumoto)

https://code.google.com/p/vim/source/detail?r=v7-4-503

-Ported old legacy test over to
    test/functional/legacy/writefile_spec.lua
-Tests for mapping and signs from the original patch were removed since
    they have nothing to do this with feature

Tested with: make oldtest, make test on OS X.

Signed-off-by: Perry Hung <iperry@gmail.com>
2015-03-20 17:54:28 -04:00
Nikolai Aleksandrovich Pavlov
2d0f7fa95d README: Do not call translator transpiler
Never liked this term and never saw it in any dictionaries.
2015-03-20 21:56:15 +03:00
Thiago de Arruda
8dd415e887 tui: Add support for true color terminals
This is enabled by setting the `$NVIM_TUI_ENABLE_TRUE_COLOR` environment
variable, eg:

```
$ NVIM_TUI_ENABLE_TRUE_COLOR=1 nvim
```
2015-03-20 13:20:21 -03:00
Florian Walch
29b6fc57e8 deps: Use released versions for unibilium, msgpack-c. 2015-03-20 13:18:53 -03:00
John Szakmeister
90bce5ad38 Merge pull request #2144 from jszakmeister/fix-warning-in-release
Fix a couple warnings in the release build.
2015-03-20 09:54:06 -04:00
Perry Hung
657d274520 Remove BINARY_FILE_IO option #2179
The 'binary' mode flag is ignored on all POSIX conforming systems (man 3
fopen). For all the others, BINARY_FILE_IO needs to be set.

Always set BINARY_FILE_IO.

Signed-off-by: Perry Hung <iperry@gmail.com>
2015-03-18 04:42:39 -04:00
Michael Reed
8f6ecc4089 misc2.c: Move emsg* functions to message.c #2152
Clean up said functions and some outdated comments while we're at it.
2015-03-19 18:33:39 -04:00
Justin M. Keyes
21a5326527 Merge #1930 'hlsearch/incsearch screen tests + convert test 63' 2015-03-19 18:21:25 -04:00
Björn Linse
cf88f33eec tests/ui: cleanup ignores in screen_basic_spec 2015-03-19 23:09:56 +01:00
Björn Linse
a040aa95c1 tests/legacy: convert test 63 (:match and matchadd() ) 2015-03-19 23:09:56 +01:00
Björn Linse
93d01bf12e tests/ui: test hlsearch and incsearch 2015-03-19 23:09:56 +01:00
Justin M. Keyes
63d2564409 tests: update legacy Makefile #2186
Many tests were migrated, but entries were left in the old Makefile.
2015-03-19 11:02:49 -04:00
Thiago de Arruda
608d709fa0 Merge PR #2182 'Improve ui/busy handling and early input reading' 2015-03-18 22:42:19 -03:00
Thiago de Arruda
4d63d99174 main: Simplify code that deals with early user input
A read stream will be started before the first ex command is processed. This
stream will be used to read early user input before handling control over to the
UI module.

Which stdio stream will be used depends on which types of file descriptors are
connected, and whether the "-" argument was passed.
2015-03-18 21:28:20 -03:00
Thiago de Arruda
8b7b71f474 ui: Refactor so that busy state won't be the default
Even though assuming nvim is busy most times is simpler, it has a problem: A lot
of unnecessary busy_start/busy_stop notifications are sent to the UI. That's
because in the majority of scenarios almost no time is spent between
`event_poll` calls.

This restores the normal behavior which is to call busy_start only when nvim is
going to perform some task that can take a significant amount of time. Also
improve the usage of buffering in the TUI when changing the cursor state.
2015-03-18 14:16:23 -03:00
oni-link
a0f2961b4f tui.c: Send fewer cursor-hide commands to the terminal.
Since #2158 all connected UIs are informed about the busy state of nvim.
This can be used to decide whether to hide or show the cursor (in one
place).

In the TUI, this is tui_flush(). To prevent cursor flashing, the
terminal is always redrawn with an invisible cursor. After that the
cursor is shown if necessary. In the current implementation
a cursor-hide command will always be the first command in the next
redraw, to prevent flashing. This is not necessary.

Instead we start the TUI with a hidden cursor and only need to hide the
cursor in the next redraw, if the cursor was shown in the last redraw.
Otherwise the cursor is still hidden.

So instead of sending every redraw the cursor-hide command, we only need
to send the command while not busy(a state in nvim with low frequency).
2015-03-18 07:10:11 -03:00
Jonas Dourado
293a7dc134 Remove platform dependent HAVE_OPENDIR #2010 2015-03-17 23:52:50 -04:00
bobtwinkles
70393f2e30 contrib: fix YCM completion for header files #2151
[ci skip]
2015-03-16 01:48:27 -04:00
Thiago de Arruda
6cfc91c0b9 travis: Configure to notify gitter chat room 2015-03-17 20:36:45 -03:00
Thiago de Arruda
5709181243 main: Start stdin before sourcing startup scripts
This is required to be compatible with plugins that ask user questions at
startup(eg: vim-addon-local-vimrc)
2015-03-17 14:49:09 -03:00
John Szakmeister
67f3ff3dff Merge pull request #2166 from Pyrohh/build-improvements
build: Added local.mk.example
2015-03-17 05:02:17 -04:00
Michael Reed
e2a8692e72 contrib: Added local.mk.example
[ci skip]
2015-03-17 04:23:52 -04:00
Justin M. Keyes
7d5e1db586 Merge #2157 'Minor cleanups' 2015-03-16 11:01:10 -04:00
Anton Ovchinnikov
4fd8c3cbbb Reuse f_browse function from f_browsedir
The bodies of f_browse() and f_browsedir() were identical.
2015-03-16 11:01:09 -04:00
Anton Ovchinnikov
b81ec82533 Remove unnecessary 'free'
from_noamp is always NULL in this branch
2015-03-16 11:01:09 -04:00
Anton Ovchinnikov
76970fe2c1 Clarify an out-of-memory cleanup, remove a function-wide loop counter 2015-03-16 11:01:09 -04:00
Anton Ovchinnikov
53452663cc Remove redundant parentheses 2015-03-16 11:01:08 -04:00
Anton Ovchinnikov
a62a2b6250 Merge consecutive identical 'if' statements 2015-03-16 11:01:08 -04:00
Anton Ovchinnikov
9927e99948 Remove always-true expressions 2015-03-16 11:01:07 -04:00
Michael Reed
08d2f7b562 scripts/vim-patch.sh: Misc. improvements #2108
- Check for mercurial before using it
- Make 'Merging patches...' wiki page easier to copy
- Use `basename` instead of assuming the user is running vim-patch.sh
  via the repo root
- Appease shellcheck by quoting path variables
- Remove unneeded variable quoting inside [[ ]] blocks
- Don't unconditionally 'exit 1'
  '-h' and '--help' are both recognized options, so current behavior is
  misleading.
2015-03-16 11:00:24 -04:00
Justin M. Keyes
3946810d54 Merge #2074 'Migrate legacy test 19 and 89' 2015-03-16 10:55:21 -04:00
Gustaf Lindstedt
6511c24af8 legacy tests: migrate test19 2015-03-16 10:54:49 -04:00
Gustaf Lindstedt
311f09e20f legacy tests: migrate test89 2015-03-16 10:54:36 -04:00
Thiago de Arruda
f6d4bfd51b Merge PR #2164 'Small changes to ui_busy functions and testing' 2015-03-16 10:59:29 -03:00
Thiago de Arruda
1d80c0e3a0 ui: Only call ui_flush when the busy state changes
Also add back the `ui_flush` call to `get_keystroke`. Its necessary to display
prompt messages correctly.
2015-03-16 08:35:43 -03:00
Thiago de Arruda
5199456471 test: Only display cursor marker in screen tests if nvim is not busy 2015-03-16 08:29:57 -03:00