Commit Graph

4007 Commits

Author SHA1 Message Date
Thiago de Arruda
e897ccad3e terminal: Don't store a buf_T reference in the terminal struct
Since vimscript can close buffers at any time, it is possible that a
refresh_timer_cb will be called with an invalid buffer, but there's no way to
detect this if only a reference is stored because the memory can be reused by
the allocator. Use buf_T->handle which is guaranteed to be unique.
2015-09-18 14:50:36 -03:00
Thiago de Arruda
47cbbc0b8c terminal: Run screen refresh timer in a deferred queue
Close #3332
2015-09-18 14:35:26 -03:00
Thiago de Arruda
1f90cbb4ae ugrid: Increase cell size to allow unicode composition
Close #3323
2015-09-18 14:35:26 -03:00
Thiago de Arruda
1b1716477c terminal: Don't enter terminal mode from :normal
Ref: https://github.com/junegunn/fzf.vim/issues/8#issuecomment-139209765
2015-09-18 14:35:26 -03:00
Thiago de Arruda
b7dab423ef eval: Fix ex_delfunction to use the uf_refcount field properly
@4b98ea1e80bf changed how refcounts are handled internally to fit into job
control semantics. Change the refcount check in `ex_delfunction` to consider
this. Close #3000
2015-09-18 14:35:26 -03:00
Thiago de Arruda
0a116c828d regexp: Fix invalid multibyte reads at end of strings
Close #3150
2015-09-18 14:35:26 -03:00
Thiago de Arruda
c708061a5a os/path: Fix path_get_absolute_path for top-level paths
Close #2833
2015-09-18 14:35:26 -03:00
Thiago de Arruda
29b998be68 ui_bridge: Fix passing NULL pointer to memcpy 2015-09-18 14:35:26 -03:00
Justin M. Keyes
a4c4173535 Merge pull request #3353 from yagebu/docs-misc
docs cleanup: misc
2015-09-17 14:24:08 -04:00
Jakob Schnitzer
fcd314223d options: unify undolevels default
Considering Nvim's supported platforms, having a different default for
(!Unix and !Windows) doesn't seem very useful.
2015-09-17 19:38:24 +02:00
Jakob Schnitzer
e3289e5354 doc: mark 'toolbar' and 'toolbariconsize' as removed.
These options have been removed from the code, so also mark them as
removed in the docs
2015-09-17 19:38:24 +02:00
Jakob Schnitzer
5d8f06fdc7 doc: feature-refs cleanup 2015-09-17 19:38:19 +02:00
Justin M. Keyes
7befd0f37c Merge pull request #3351 from fwalch/provider/pythonx-error-message
provider/pythonx: Improve detection code and error messages.
2015-09-17 13:23:29 -04:00
Florian Walch
e3540a430b provider/pythonx: Improve detection code and error messages.
"python -c" returns 1 in case of an error. Use a return code of 2 if
the Neovim module is not found to distinguish these cases.

Verify the interpreter version before checking for an installed Neovim
module. Show a new error message if the Python interpreter version
is below the minimum required version.

Always use "pkgutil" to determine if the Neovim module is installed.
In contrast to "importlib", which was used for Python 3,
"pkgutil.find_loader" is available for all Python versions [1,2].
"pkgutil.find_loader" internally uses "importlib" for Python >= 3.3 [2].
Also, the previously used "importlib.find_loader" is only available
since Python 3.3 (so checking the major Python version was not enough)
and deprecated since Python 3.4 [3].
Finally, conditioning on the major version in Vimscript was incorrect,
as checking the Neovim module for a certain Python major version does
not mean that the tested interpreters are actually of that version.
For example, we test the "python" executable, which is Python 2 on
Ubuntu and Python 3 on Arch Linux.

[1] https://docs.python.org/2/library/pkgutil.html#pkgutil.find_loader
[2] https://docs.python.org/3/library/pkgutil.html#pkgutil.find_loader
[3] https://docs.python.org/3/library/importlib.html#importlib.find_loader
2015-09-17 18:48:26 +02:00
Björn Linse
c416e6874e Merge pull request #3106 from bfredl/nowaitreturn
Don't show return prompt between lines of the same vim_err_write message #3106
2015-09-16 22:00:04 +02:00
Björn Linse
c8aaabc09c api: vim_err_write: add tests for multiline handling 2015-09-16 21:42:57 +02:00
Björn Linse
8c2481806d api: vim_err_write: don't wait for return in the middle of a message 2015-09-16 21:42:57 +02:00
Thiago de Arruda
22ea2900d0 loop: Free the parent queue last when destroying the loop
This avoids a heap-use-after-free ASAN error. Close #3334
2015-09-16 02:52:55 -03:00
Jonathan Skeate
5613b62224 host.vim: expand $MYVIMRC. #3342
According to the vim helpfile:

> fnamemodify({fname}, {mods})
>    ...
>    Note: Environment variables don't work in {fname}, use
>    expand() first then.

So this causes issues if your $MYVIMRC contains environment variables
(e.g. $XDG_CONFIG_HOME)
2015-09-14 21:59:13 -04:00
Justin M. Keyes
6bcbb18dc8 Merge pull request #3331 from yagebu/python-no-cwd-import
python: remove current working directory from path
2015-09-14 08:55:36 -04:00
Jakob Schnitzer
c478dd5ab4 python: remove current working directory from path
Before, running Nvim in a directory containing a Python module `neovim`,
or one that is imported by it or a plugin, will load that module and not
the system one. So Nvim might be tricked into running arbitrary scripts
from the current working directory.

Fixes #1665
Fixes #2530
2015-09-14 12:06:49 +02:00
Justin M. Keyes
5c82ea8f9f remove HAVE_DUP #1072
Vim defines this for Windows, so there's no Neovim-supported system for
which this would not be defined.
2015-09-12 13:07:38 -04:00
Enrico Ghirardi
57836f2b71 term: Do not highlight bold text by default. #3333
It makes more sense to let the user application terminal emulator
decide how to render bold text.
2015-09-12 12:30:54 -04:00
Justin M. Keyes
b762e809e4 Merge pull request #3322 from oni-link/fix.memory.leak.2
path.c: Fix memory leak in expand_wildcards().
2015-09-10 20:52:25 -04:00
Justin M. Keyes
7031364c76 test: update lua client to 0.0.1-14 2015-09-10 19:41:44 -04:00
Justin M. Keyes
aea3f70237 test: update lua client to 0.0.1-13 #3281 2015-09-10 02:08:48 -04:00
Rui Abreu Ferreira
2bc1d7d0db Windows: Only link against libm, libutil on Unix. #3324 2015-09-10 00:48:43 -04:00
Justin M. Keyes
48786f076c runtime: remove dvorak macro #3325
This macro does the same thing as `set keymap=dvorak`, so it serves no
purpose.
2015-09-10 00:46:55 -04:00
Justin M. Keyes
6d50f4d0c9 Merge #3297 'move.c refactor' 2015-09-10 00:32:43 -04:00
Rui Abreu Ferreira
b50cc42eb7 Windows: Link against libraries libuv needs on Windows. 2015-09-09 17:44:22 -04:00
Florian Walch
de3689a46f Merge #3307 'Travis: Rebuild third-party deps when updated'. 2015-09-09 20:22:00 +02:00
oni-link
367fc41943 path.c: Fix memory leak in expand_wildcards().
A file that matches with one of the patterns in 'wildignore' is ignored
when using expand_wildcards(). After removing ignored files, the array
of (file name) matches can be empty. But an empty array is never freed.
2015-09-09 19:03:45 +02:00
Florian Walch
fd23d588fe deps: Update unibilium to 1.2.0.
Changes since 1.1.4 (from [1]):

1.1.5   2015-07-17:
        - doc/unibi_{get,set}_ext_*_name: Fix man's “can't break line” warnings
        - Merge pull request #12 from Debian/manpage-warnings
        - fix variable name parsing in %g/%P (gh #14)

1.1.6   2015-07-23:
        - neatify formatting
        - factor out TAP pseudo-library
        - regenerate static tests
        - add screen-256color sanity test
        - make ok() accept printf varargs
        - regenerate static tests
        - mark test functions as potentially unused
        - more test stuff
        - use note for annotations instead of diag
        - regenerate static tests
        - fix nested conditionals
        - add ansi-pfkey test because why not

1.2.0   2015-08-14:
        - add helper functions for unibi_var_t manipulation
        - document semantics of zero-initializing unibi_var_t

[1] https://github.com/mauke/unibilium/compare/v1.1.4...v1.2.0
2015-09-09 17:23:22 +02:00
Florian Walch
10cdf8c286 Travis: Cache third-party build directory.
Instead of just caching the third-party build output, cache the full
build directory. Always run make to ensure that updated dependencies
are downloaded.
2015-09-09 17:23:22 +02:00
Florian Walch
b480eb069b CMake: Don't use existing third-party sources by default.
Introduce ALLOW_EXISTING_SRC_DIR option, turned off by default.

The Homebrew formula, which downloads and extracts the third-party
dependency sources before starting the build, would turn this option
ON.
2015-09-09 17:23:22 +02:00
Justin M. Keyes
41446715b4 Merge pull request #3298 from oni-link/vim-7.4.609
vim-patch:7.4.609
2015-09-09 00:43:04 -04:00
Justin M. Keyes
a5b4e943be Merge pull request #3308 from oni-link/fix.clang.report
Fix warning: stream.c: stream_init(): Dead store: HI.
2015-09-09 00:42:27 -04:00
Justin M. Keyes
87ffa7794b Merge pull request #3317 from fwalch/cmake/git-lookup
CMake: Use project directory to look for Git revision.
2015-09-09 00:40:34 -04:00
Enrico Ghirardi
1d1963e90e api: buffer_insert: fix bounds. #3315
buffer_insert calls buffer_set_line_slice excluding the start
line number and including the end, but it should be the opposite.

Closes https://github.com/neovim/neovim/issues/3212
Closes https://github.com/neovim/python-client/issues/103
2015-09-09 00:35:52 -04:00
Justin M. Keyes
3736a613e8 doc: 'encoding' 2015-09-09 00:04:39 -04:00
Florian Walch
231ac048aa CMake: Use project directory to look for Git revision.
If downloading Neovim as a tarball (i.e. without Git data),
building Neovim will search parent directories for a .git directory.
Explicitly set GIT_DIR to the project directory to avoid that.
2015-09-08 22:54:57 +02:00
Justin M. Keyes
9468e53869 Merge #2929 'Disallow "set encoding" after startup' 2015-09-08 08:51:59 -04:00
oni-link
217b6bc123 Fix warning: stream.c: stream_init(): Dead store: HI.
Problem     : Dead store @ 59.
Diagnostic  : Harmless issue.
Rationale   : loop is a function parameter that is not used anymore
              after this line.
Resolution  : Remove line.

Based on: http://neovim.io/doc/reports/clang/report-27475f.html#EndPath
2015-09-08 14:35:19 +02:00
Nicolas Cornu
23acaf8940 Scope variables in move.c 2015-09-08 13:51:36 +02:00
Björn Linse
087f3bacaf encoding: test that &encoding cannot be changed
Helped-By: Justin M. Keyes <justinkz@gmail.com>
2015-09-08 10:56:15 +02:00
Björn Linse
ffff2c9c47 encoding: Update handling of encoding in tests
Always run tests with encoding=utf-8, regardless of user locale
Don't set &encoding after startup in tests

Helped-By: Michael Reed <m.reed@mykolab.com>
2015-09-08 10:54:31 +02:00
Björn Linse
e99368104a encoding: update docs for encoding
Helped-By: Michael Reed <m.reed@mykolab.com>
Helped-By: Justin M. Keyes <justinkz@gmail.com>
2015-09-08 10:54:01 +02:00
Björn Linse
fa5827b144 encoding: simplify handling of encoding in TUI 2015-09-08 10:53:44 +02:00
Björn Linse
6769438cd1 encoding: don't allow changing encoding after startup scripts 2015-09-08 10:53:27 +02:00
Rui Abreu Ferreira
dc9652e68d Windows: disable libuv argument escaping for uv_spawn #3305
When calling uv_spawn to launch a process set the libuv process flag
UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS to disable escaping for the
arguments otherwise libuv will wrap arguments in quotes.
2015-09-08 01:23:21 -04:00