Commit Graph

12474 Commits

Author SHA1 Message Date
Björn Linse
a2be9c7218 ui: multigrid mouse support 2019-01-20 10:32:05 +01:00
Justin M. Keyes
8a5c68f695
Merge #9518 from justinmk/pvs-warnings 2019-01-18 21:51:32 +01:00
Justin M. Keyes
e8137d263e pvscheck.sh: ignore stddef.h
This system header should be ignored by PVS.
See also: https://stackoverflow.com/q/44906903
2019-01-18 02:43:42 +01:00
Justin M. Keyes
ce6a5fb94b PVS/V560: expression is always true
This macro serves as a sanity-check / documentation.
2019-01-18 02:43:38 +01:00
Justin M. Keyes
6cd3912a51 clang/"null pointer dereference": expand_wildcards
This invariant is explained in aa39fc56f6.
2019-01-18 02:43:32 +01:00
Justin M. Keyes
8f9fc1f692
Merge #9508 from justinmk/pvs-warnings 2019-01-18 00:20:38 +01:00
Justin M. Keyes
aa39fc56f6 PVS/V1032: pointer cast to a more strictly aligned type
Rework-of: ea7491586f
Helped-by: Björn Linse <bjorn.linse@gmail.com>

- The old (Vim) use of (char_u **)"" before ea7491586f is garbage,
  which hints that this value was never used.
- The necessary condition is next to the NULL assigmnent, the pointer
  would only be started to be accessed, if the length assignment next to
  it is also changed.
2019-01-18 00:10:08 +01:00
Justin M. Keyes
ea7491586f PVS/V1032: pointer cast to a more strictly aligned type 2019-01-18 00:09:50 +01:00
Justin M. Keyes
ed171f7be2 PVS/V1028: cast operands, not the result 2019-01-18 00:09:50 +01:00
Justin M. Keyes
dca0da4e3f PVS/V501: diff.c: silence warning
False positive: vim_fgets has side effects.

ref 8586770e1f
2019-01-18 00:09:50 +01:00
Justin M. Keyes
8093cbd8e8
Merge #9292 from mhinz/xcode10 2019-01-17 23:24:03 +01:00
Matěj Cepl
a8a38f3465 test: Lua 5.2/5.3 compat
close #9515
ref #9280
2019-01-17 23:06:04 +01:00
Marco Hinz
06785da5b6
ci: switch to Xcode 10.1 / macOS 10.13 2019-01-17 15:59:44 +01:00
Marco Hinz
f2e996b991
tests: load-adjust timer tests (functionaltest) 2019-01-17 15:59:23 +01:00
Marco Hinz
0afd452ef1
tests: load-adjust timer tests (oldtest) 2019-01-17 15:59:23 +01:00
Marco Hinz
9d6bffd517
tests: fix Test_help_tagjump()
The Vim version of Test_help_tagjump() tests for `:help sm?le` here. That
command got removed from Nvim, so the test was changed to check against `:help
sp?it` instead.

The new test already handled the case that on Win `:h split` would jump to the
entry for split() and on all other systems to the entry for :split.

Then this commit happened:

   bb3aa824b lua/stdlib: vim.inspect, string functions

Since then `:h split` would jump to split() for macOS as well! I'm not sure why.

Anyway, instead of adding another check for has('mac'), we change the test once
more to be more akin to the original test. Instead of testing for :smile, which
is exclusive to Vim, we check against :checkhealth, which is exclusive to Nvim.
2019-01-17 15:59:22 +01:00
Björn Linse
279043d625
Merge pull request #9507 from bfredl/noscrollclear
screen: don't unconditionally clear messages on window scroll
2019-01-15 21:19:02 +01:00
Björn Linse
5a836d4767 screen: don't unconditionally clear messages on window scroll
In vim, scrolling a window might mess up the cmdline. To keep it simple,
cmdline was always cleared for any window scroll. In nvim, where safe scrolling
is implemented in the TUI layer, this problem doesn't exist.

Clearing the message on scrolling, when we not do it e.g when switching tabs
is a bit weird, as the former is a much smaller context change.

A vim patch introduced the possibility to avoid the cmdlline clear for
redraws caused by async events. This case will now trivially be covered,
as the redraw is always avoided.

vim-patch:8.0.0592: if a job writes to a buffer screen is not updated
2019-01-15 19:48:49 +01:00
raffitz
95fa71c6d2 :recover : Fix crash on non-existent *.swp #9504
Reverts d2944e6a29. mf_open() _can_ fail if the file does not exist.

closes #9503
closes #9504
2019-01-15 00:47:53 +01:00
Björn Linse
387ab4f706
Merge pull request #9505 from bfredl/inspect
lua: expose full interface of vim.inspect and add test
2019-01-14 23:30:09 +01:00
Björn Linse
3a84e5be88 lua: expose full interface of vim.inspect and add test
Implement lazy loading for vim.submodule, this would be over-engineering
for inspect only, but we expect to use this solution also for more and
larger modules.
2019-01-14 20:12:57 +01:00
Justin M. Keyes
89d7e24891 Merge #9463 'Lua stdlib' 2019-01-14 02:25:45 +01:00
Justin M. Keyes
6c02ff4747 lua/stdlib: Load runtime modules on-demand
Instead of eager-loading during plugin/* sourcing, define runtime
modules such as `vim.inspect` as lazy builtins. Otherwise non-builtin
Lua modules such as `vim.inspect` would not be available during startup
(init.vim, `-c`, `--cmd`, …).

ref #6580
ref #8677
2019-01-14 02:22:16 +01:00
KillTheMule
bb3aa824b7 lua/stdlib: vim.inspect, string functions
ref #6580
ref #8677
2019-01-14 02:14:34 +01:00
Justin M. Keyes
989fbad502
Merge #9395 from pqzx/api-set-vvar 2019-01-14 02:13:39 +01:00
Justin M. Keyes
38b9256439 test/API: nvim_set_vvar() #9395 2019-01-14 00:50:29 +01:00
jin cong
475b97e021 API: nvim_set_vvar(): set v: variables #9395
closes #9349
2019-01-14 00:42:25 +01:00
Justin M. Keyes
0b8c4b995a dict_set_var: check value before checking its container
- When setting a fixed/locked/readonly var, it is more relevant to
  report on the key, not its container dict. If its container dict (v:)
  is readonly, that does not mean the key itself is readonly.
- Allow modifying a "fixed" var. "fixed" only prevents deletion.
2019-01-14 00:42:25 +01:00
Justin M. Keyes
0d66cdc6f9
pvscheck.sh: Fix download URL #9500
- old URL redirects to https://www.viva64.com/en/pvs-studio-download/
- page now contains tgz files for macOS and Linux; the pattern must
  match only the Linux URL
2019-01-14 00:23:28 +01:00
Justin M. Keyes
a3d8cd3f69
Merge #9471 from justinmk/pvs-warnings 2019-01-13 23:09:59 +01:00
Justin M. Keyes
4cba75dab0 clang/"null pointer dereference": close_buffer
False positive: win_valid_any_tab() already checks `win != NULL`.
2019-01-13 19:57:52 +01:00
Justin M. Keyes
1ec0b9204b clang/"Dead assignment": screen.c
Vim 8.1 source has equivalent structure (this isn't a case of accidental
regression), but it depends on FEAT_MBYTE.
2019-01-13 19:57:52 +01:00
Justin M. Keyes
ddd4ed3ce5 clang/"Dead assignment" 2019-01-13 17:53:26 +01:00
Justin M. Keyes
94fc3e0182 clang/"null passed to nonnull arg": shada.c 2019-01-13 17:03:55 +01:00
Justin M. Keyes
fb7c48f2f3 clang/"null passed to nonnull arg": ex_history 2019-01-13 17:02:37 +01:00
Justin M. Keyes
712cf9d8f3 clang/"null passed to nonnull arg": cs_manage_matches 2019-01-13 16:55:14 +01:00
Justin M. Keyes
09d21f6f0b clang/"null passed to nonnull arg": expand_wildcards 2019-01-13 16:54:18 +01:00
Justin M. Keyes
651e82af9f clang/"Assigned garbage": parse_shape_opt
False positive, see b6c1fae6a9. Clang ignores the assert introduced in
that commit?
2019-01-13 16:39:38 +01:00
Justin M. Keyes
fff68dccd9 PVS/V560: expression is always true 2019-01-13 16:39:38 +01:00
Justin M. Keyes
61ec31cde1 release.sh 2019-01-13 15:21:24 +01:00
Justin M. Keyes
4e917e8731 Merge 'upstream/release-0.3' 2019-01-13 15:10:03 +01:00
Justin M. Keyes
7b7266430c version bump 2019-01-13 14:29:45 +01:00
Justin M. Keyes
ab2bbbf6c4 NVIM v0.3.4
This maintenance release fixes some issues found in v0.3.3.

FIXES:

8a7b6200fb #9487 provider: improve error message if provider is missing
44ea903ca5 #9468 checkhealth: detect broken pip
b4028056fa Windows: nvim-qt v0.2.12 (fix potential "blank screen" at startup)
2019-01-13 14:25:08 +01:00
Björn Linse
a7fc01a532
Merge pull request #9492 from bfredl/cul_cole
redraw: share more code between cursorline and conceal redraws. Add tests for conceal cursor
2019-01-13 12:10:26 +01:00
Björn Linse
23c71d5182 display: unify cursorline and concealcursor redraw logic
There is various places where 'conceallevel' and 'concealcursor'
necessitates additional redraws. This tries to separate the different
cases and handle each accordingly:

  - Share code with 'cursorline' for the common case: vertical move of
    cursor within the same window (concealcursor not active)
  - Improve the logic for managing 'concealcursor' and switching modes:
    test for the case where the new mode behaves differently from the
    last one.
  - Clarify the special case for horizontal movement within a line when
    'concealcursor' is active, now there is an if-statement only for this
     and not hidden in larger check mostly for the first point.
  - Keep the special case for moving between windows as is.
2019-01-13 12:08:11 +01:00
Björn Linse
9c75929e7b test: add tests for conceal cursor movement 2019-01-13 12:08:11 +01:00
Justin M. Keyes
7523eb3ce4
Merge #9495 from justinmk/release-0.3
release candidate 0.3.4
2019-01-13 02:33:47 +01:00
Marco Hinz
8a7b6200fb provider: improve error message if provider is missing (#9487)
Move `has_eval_provider()` check to `eval_call_provider()` to make sure that
every code path calls it first.

Previously we would, when pynvim was missing, get a nice error message for
`:python3 1`, but not for `:py3file blah`.

Fixes https://github.com/neovim/neovim/issues/9485
2019-01-13 01:49:07 +01:00
Justin M. Keyes
44ea903ca5 checkhealth: detect broken pip #9468 2019-01-13 01:48:32 +01:00
Justin M. Keyes
b4028056fa win/dist: nvim-qt v0.2.12 2019-01-13 01:27:36 +01:00