Commit Graph

7315 Commits

Author SHA1 Message Date
James McCoy
5752bfb224
Run cleanup.vim on {eo,fr}.po 2017-02-01 18:34:58 -05:00
James McCoy
a5b875fe86
vim-patch:e18dbe8
Updated runtime files.

e18dbe865d
2017-02-01 18:34:58 -05:00
James McCoy
4e47568f89
vim-patch:802a0d9
Updated runtime files.

802a0d902f
2017-02-01 18:34:57 -05:00
James McCoy
cb0eead4ee
vim-patch:a02a551
Updated runtime files.

a02a551e18
2017-02-01 18:34:52 -05:00
Justin M. Keyes
3803314f78 doc: QuickBuild 2017-01-31 08:58:43 +01:00
Justin M. Keyes
88bc9f8e92 xstrlcat: Allow overlapped pointers. (#6017)
memcpy is not equivalent to memmove (which is used by vim_strcat), this
could cause subtle bugs if xstrlcat is used as a replacement for
vim_strcat. But vim_strcat is inconsistent: in the `else` branch it uses
strcpy, which doesn't allow overlap.

Helped-by: oni-link <knil.ino@gmail.com>
Helped-by: James McCoy <jamessan@jamessan.com>
Helped-by: Nikolai Aleksandrovich Pavlov <kp-pav@yandex.ru>
2017-01-31 17:42:22 +01:00
Matthew Malcomson
d25649fa01 undo: :earlier, g-: Set b_u_seq_cur correctly. (#6016)
Previously alternate branches were not accounted for properly, with this
change g- after an undo to a branch point works.

The current sequence number b_u_seq_cur is used in undo_time(), in
u_doit() this was calculated by subtracting one from the curhead
sequence number.

The curhead header entry represents the change that was just undone, so
the sequence number we want is that of the change we have moved to. This
is the sequence number of the undo head that is the uh_next element of
this curhead. That sequence number is not always one less than the
curhead sequence number -- there may have been an alternate branch at
this point.

Instead of subtracting one, we now directly find the sequence number of
curhead->uh_next.
2017-01-31 05:46:55 +01:00
Anmol Sethi
39a6f835e7 man.vim: get page after opening split (#6032)
This will ensure that $MANWIDTH is correctly set.
2017-01-31 16:03:45 +01:00
Anmol Sethi
5bcb972a88 man.vim: remove terminal escape characters (#6033)
This will make man.vim work on nixOS.
2017-01-31 16:00:00 +01:00
Matthieu Coudron
7c83657397 dist: runtime/nvim.desktop
Closes #3689

cmake: Add `desktop-install` and `icon-install` targets. `runtime`
target will trigger them.

Specification:
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys

Icons are stored system-wide in /usr/share/applications or user wide at
/usr/share/icons/hicolor/scalable/apps and can be overriden in ~/.local/share/icons

nvim.desktop file can be installed system wide or in
~/.local/share/applications/

To test without an installer:
$ xdg-desktop-menu install --novendor runtime/nvim.desktop
$ xdg-icon-resource install --novendor --mode user --size 64 contrib/nvim-icon.png

Once it is installed, you can test with gtk-launch if installed or
dmenu/rofi (drun mode)
2017-01-31 02:02:09 +01:00
Tommy Allen
bdfa1479d2 eval.c: Fix findfile(), :find, gf in :terminal. #6009
Closes #4299
2017-01-31 00:48:30 +01:00
Justin M. Keyes
81525dc5c3 defaults: Revert 'mouse=a' (#6022)
This default causes too much confusion for terminal users. Until
a better approach is implemented, revert to the traditional default.

Better solution would be:
- Implement a right-click menu for TUI
- Set 'mouse=a' *only* if clipboard is working.

Closes #5938
2017-01-28 14:30:57 +01:00
James McCoy
5527754f95 Merge pull request #6012 from jamessan/override-TI-cursor-normal
tui: Ignore DECRST 12 in terminfo's cursor_normal, if present
2017-01-26 09:50:59 -05:00
Justin M. Keyes
59fd0c4132 refactor: Remove strncpy/STRNCPY. (#6008)
Closes #731
References #851

Note: This does not remove some intentional legacy usages of strncpy.
      - memcpy isn't equivalent because it doesn't check the string
        length of `src`, and doesn't zero-out the remainder of `dst`.
      - xstrlcpy isn't equivalent because it doesn't zero-out the
        remainder of `dst`. Some Vim logic depends on that (e.g.
        ex_append which calls vim_strnsave).

Helped-by: Douglas Schneider <ds3@ualberta.ca>
Helped-by: oni-link <knil.ino@gmail.com>
Helped-by: James McCoy <jamessan@jamessan.com>
2017-01-26 14:33:03 +01:00
Justin M. Keyes
f78982620a build: Disable jemalloc for FreeBSD. (#6007)
jemalloc's README states:

> jemalloc [is] the FreeBSD libc allocator since 2005. ...  Modern jemalloc
> releases continue to be integrated back into FreeBSD

Since FreeBSD ships with jemalloc in some form, we don't need to require
jemalloc there. Less risk, low cost.
2017-01-26 13:07:30 +01:00
James McCoy
fd2d4c5ab9 tui: Ignore DECRST 12 in terminfo's cursor_normal, if present
As discussed in neovim/neovim#5977, it's typical for the terminfo
database to disable cursor blink as part of setting up the normal
cursor.  Since this interferes with the user's control over the cursor,
we'll skip over DECRST 12 if it starts the cursor_normal entry.

Note, this doesn't handle any case where DECRST 12 is not at the start
of the entry since unibilium simply stores the given pointer.  We would
need to allocate (and somewhere free) a modified copy of what we get
back from unibi_get_str to handle that.
2017-01-25 11:15:05 -05:00
Justin M. Keyes
25427ae892 test: Fix broken test. 2017-01-24 14:25:50 +01:00
Justin M. Keyes
a8a673c20d Merge #5964 from equalsraf/windows-clipboard
Windows clipboard support
2017-01-24 00:24:26 +01:00
Justin M. Keyes
a3a241d313 ci: XXX: Disable "throttle" test on Travis macOS. 2017-01-23 22:17:16 +01:00
Justin M. Keyes
5892aab1b5 Merge #5996 from justinmk/coverity-133845
xstrlcat() + coverity fixes
2017-01-23 21:50:41 +01:00
Justin M. Keyes
b70a5cdd49 clint.py: Suggest xstrlcat instead of strcat. 2017-01-23 15:49:37 +01:00
Justin M. Keyes
7e799b6e91 refactor: Replace vim_strcat() with xstrlcat(). 2017-01-23 15:49:37 +01:00
Justin M. Keyes
6c467f3f7e coverity/133853: Out-of-bounds access 2017-01-23 15:49:37 +01:00
Justin M. Keyes
d97d66e173 coverity/155512: Pass correct length to strncat()
References 8bc2bffda9
2017-01-23 15:49:37 +01:00
Justin M. Keyes
6be8ea0787 coverity/133845: Negative array index read. (FP)
`find_command(s->ca.cmdchar) >= 0` was established near the start of
normal_execute(). And `unshift_special(&s->ca);` "should" not ever
result in s->ca.cmdchar containing a multibyte char.

So only an assert() is needed here.
2017-01-23 15:49:37 +01:00
Justin M. Keyes
73da522d73 errors: Introduce "E856: Filename too long" 2017-01-23 15:49:37 +01:00
cztchoice
7c7c5a80a4 add_pathsep(): Return false if filename is too long.
References #3042
2017-01-23 15:49:36 +01:00
cztchoice
6e75bb5cbb refactor: strlcat instead of str{n}cat.
Add xstrlcat function.

Closes #3042
References #988
References #1069

coverity: 71530, 71531, 71532
2017-01-23 15:49:36 +01:00
Justin M. Keyes
d4b931deac Merge #5995 from ZyX-I/coverity-fixes
coverity fixes
2017-01-23 01:30:50 +01:00
ZyX
5ac5c7971c coverity/133898: Fix sizeof argument 2017-01-23 02:16:16 +03:00
ZyX
61e04cae75 ex_cmds: Also pass correct length in windows code 2017-01-23 02:09:59 +03:00
ZyX
5369b0c7ea coverity/155511: Pass correct length argument to strncat() 2017-01-23 02:05:17 +03:00
ZyX
8bc2bffda9 coverity/155512: Pass correct length to strncat() 2017-01-23 02:03:48 +03:00
ZyX
47a7d32563 coverity/155513: Do not assume xcalloc can return NULL 2017-01-23 02:02:35 +03:00
Shougo Matsushita
7255f00818 version.c: update
1914: signal
2074: HIKEY2UF()

Closes #5953
2017-01-22 15:10:51 +01:00
Justin M. Keyes
be09274287 test: Avoid Lua closure limit.
Fixes Lua error:
> function at line 543 has more than 60 upvalues
2017-01-22 14:13:53 +01:00
Justin M. Keyes
043d8ba422 Merge #5782 'Visual-mode put from @. register' 2017-01-22 11:10:24 +01:00
Justin M. Keyes
c86caf7e41 readfile(): Fix read-after-free.
References https://github.com/neovim/neovim/pull/5956#pullrequestreview-17812620

Helped-by: oni-link <knil.ino@gmail.com>
2017-01-21 21:57:44 +01:00
Justin M. Keyes
497db001df test: expand_env_esc()
Test expand_env_esc() using the same parameters reported in #3725.

Closes #3725
2017-01-21 18:17:44 +01:00
Justin M. Keyes
bd16e116eb win: test: Enable jobstart() 'shell' test. (#5983) 2017-01-21 17:04:39 +01:00
Justin M. Keyes
10864cd939 Merge #5977 from justinmk/tui-cursor-shape
tui: enable NVIM_TUI_ENABLE_CURSOR_SHAPE by default
2017-01-21 12:21:56 +01:00
Rui Abreu Ferreira
a27fcf38fd Windows: Install runtime dependencies with Neovim binary
Look for runtime dependencies diff.exe and win32yank.exe (and
recursively for DLL dependencies) and install them with nvim.exe. If a
dependency is missing a warning will be issued.
2017-01-20 18:29:18 +00:00
Rui Abreu Ferreira
1cb52309f1 Enable clipboard provider tests in Windows 2017-01-20 18:29:18 +00:00
Rui Abreu Ferreira
f59bb4be6c third-party: Add helper to fetch binary dependencies
Add cmake script with recipes to download binary dependencies, currently
the only dependency is win32yank.
2017-01-20 18:29:17 +00:00
Rui Abreu Ferreira
33cd06dfb7 Windows: Clipboard provider win32yank 2017-01-20 18:29:17 +00:00
Justin M. Keyes
ef753a76b9 tui: Enable mode-sensitive cursor by default.
Also give NVIM_TUI_ENABLE_CURSOR_SHAPE more granularity:
0 = do not change cursor shape
1 = non-blinking ("steady") cursor with mode-sensitive shape
2 = blinking cursor with mode-sensitive shape

Note: blink state is not changed for Konsole, instead user's terminal
preference makes the decision. (Can't do that for xterm-likes, DECSCUSR
forces us to choose blink-state.)

This is a temporary step until the TUI respects 'guicursor'
Ref: https://github.com/neovim/neovim/issues/2583#issuecomment-272988384
2017-01-20 15:48:41 +01:00
Justin M. Keyes
030349d852 input_enqueue(): Fix length calculation. (#5981)
Ref: https://github.com/neovim/neovim/issues/5885#issuecomment-273614373
2017-01-20 13:49:38 +01:00
Justin M. Keyes
4b2759b6da vim-patch:7.4.2049,7.4.2050,7.4.2064,7.4.2067,7.4.2081 (#5969)
vim-patch:7.4.2049,7.4.2050,7.4.2064,7.4.2067,7.4.2081
2017-01-20 13:11:26 +01:00
Justin M. Keyes
8684fdda3b tui: Do not decide cursor blinking.
"CSI ? 12 l" stops cursor blinking. `unibi_cursor_normal` need only
_show_ the cursor, not make any pronouncement about cursor blinking.
User's terminal setting (or NVIM_TUI_ENABLE_CURSOR_SHAPE) takes
precedence.
2017-01-20 01:59:29 +01:00
Justin M. Keyes
e7de3b5f84 test/timer_spec.lua: Relax expected count.
Test sometimes fails on AppVeyor (Windows). 300/50=6, but there could be
environment factors that miss the timer interval on the "edges".
timer_start() does not have such a hard requirement.
2017-01-19 14:46:29 +01:00