Commit Graph

12499 Commits

Author SHA1 Message Date
Jan Edmund Lazo
64f91fa1fd vim-patch:8.0.0412: menu test fails on MS-Windows
Problem:    Menu test fails on MS-Windows.
Solution:   Use a menu entry with only ASCII characters.
5558d19432
2019-01-26 08:44:30 -05:00
Jan Edmund Lazo
1338702b2b vim-patch:8.0.0411: menu translations don't match when case is changed.
Problem:    We can't change the case in menu entries, it breaks translations.
Solution:   Ignore case when looking up a menu translation.
11dd8c1201
2019-01-26 08:43:57 -05:00
Justin M. Keyes
ec5a4d862d
checkhealth: validate locale (#9548)
Test case:

    LANG= LC_ALL= LC_CTYPE= tmux
    nvim -u NORC +'checkhealth nvim'
2019-01-26 00:41:42 +01:00
Björn Linse
6e6bc3b6c0
Merge pull request #9520 from bfredl/errmsg2
Lua: format multiline messages / emsgf_multiline()
2019-01-23 20:48:44 +01:00
erw7
3b56f59532 :terminal : Fix F1-F4 key codes (#9535)
fixes #9529
2019-01-23 19:51:23 +01:00
Björn Linse
f7b174eb71 tests/lua: test for multiline error messages in lua 2019-01-23 19:34:13 +01:00
Björn Linse
27b7813025 cleanup: reduce some duplicate code, avoid function pointers for a condition
Add 'multiline' flag to history for correct :messages output

Use larger buffer size for multiline messages. if this turns out to not
be enough, we could do size calculation like api_set_error
2019-01-23 19:34:13 +01:00
Björn Linse
9e54778e7c
Merge pull request #9538 from beeender/patch-1
Fix api doc nvim_buf_lines_event example
2019-01-22 22:09:16 +01:00
Alexandre Dubray
67bac681ea ex_echo: reuse code from message.c to show arg to user 2019-01-22 20:16:12 +01:00
Alexandre Dubray
7f2e43c637 message.c: add msg_echo_attr functions, use it for lua error messages
The added function behaves like the non-echo function but display message
in a echo-style way (i.e. tab and newline are preserved)
2019-01-22 20:15:27 +01:00
Chen Mulong
09f6b1f2cb
Fix api doc nvim_buf_lines_event example
when send_buffer=true, the first nvim_buf_lines_event will come with
lastline=-1 instead of 0.
2019-01-22 11:43:44 +08:00
Justin M. Keyes
bfb8170d32
PVS/V1028 (rework): cast operands, not the result #9531
closes #9522
2019-01-21 23:49:58 +01:00
Justin M. Keyes
4cea88aa37 CI/codecov: fix invalid yaml [ci skip]
To validate:

    cat codecov.yml | curl --data-binary @- https://codecov.io/validate
2019-01-21 19:45:47 +01:00
Justin M. Keyes
969618ebb5
Merge #9532 from justinmk/fix-fpclassify 2019-01-21 10:08:27 +01:00
Justin M. Keyes
226352afcb build: Fix -Wconversion warnings for fpclassify et al
closes #8274

The parent commit tries a different approach, but that fails on Apple
Clang version:
    Apple LLVM version 10.0.0 (clang-1000.11.45.5)
    Target: x86_64-apple-darwin17.7.0
which somehow compiles the check_c_source_compiles() check, but then
complains during later compilation that __fpclassify is not defined
(regardless of "#include <math.h>").
2019-01-21 00:32:34 +01:00
Justin M. Keyes
c6a039d087 build: Fix -Wconversion warnings for fpclassify et al
closes #8274

- Instead of #undef and re-#define, define "xfoo" wrappers to avoid
  include-order sensitivity.
- The warnings are bogus, caused by bad interaction between glibc and
  clang 6+.
  - https://bugs.llvm.org/show_bug.cgi?id=35268
  - https://bugs.llvm.org/show_bug.cgi?id=39738
  - https://bugzilla.redhat.com/show_bug.cgi?id=1472437
2019-01-20 23:51:12 +01:00
Justin M. Keyes
53c0f0bba5 CI/codecov: remove "only_pulls" directive [ci skip]
Since this was added, codecov has been adding comments to every PR, even
though we have specified `comment: off`.
2019-01-20 23:10:25 +01:00
James McCoy
7e3300f717
Merge pull request #9526 from jamessan/remove-jemalloc
Remove support for using jemalloc instead of the system allocator
2019-01-20 13:58:38 -05:00
Björn Linse
62254d2cc0
Merge pull request #9429 from bfredl/grid_mouse
API/UI: add nvim_input_mouse() including multigrid mouse support
2019-01-20 13:36:20 +01:00
Justin M. Keyes
ed6b44e1be
Merge #9525 'STRICT_ADD, STRICT_SUB: Log error' 2019-01-20 12:32:41 +01:00
Björn Linse
a2be9c7218 ui: multigrid mouse support 2019-01-20 10:32:05 +01:00
Justin M. Keyes
c11b79ce51 STRICT_ADD, STRICT_SUB: Log error before abort 2019-01-20 00:18:39 +01:00
Justin M. Keyes
dbba685c69 build: include auto/config.h explicitly
Otherwise the symbols defined in config/config.h.in may not be defined,
depending on include-order.
2019-01-20 00:18:39 +01:00
James McCoy
c2343180d7
Remove support for using jemalloc instead of the system allocator
There was never any investigation done to determine whether using
jemalloc was actually a net benefit for nvim.  It has been a portability
limitation and adds another factor to consider when triaging issues.
2019-01-19 18:09:52 -05:00
Justin M. Keyes
f2cc9e8826 pvscheck.sh: set --sourcetree-root [ci skip]
Reverts previous experiment. PVS root is working correctly, one can
observe this in the PVS-studio.err file, for example:

    /usr/local/clang-7.0.0/lib/clang/7.0.0/include/stddef.h:51:1: warning: V677 ...
    /usr/local/clang-7.0.0/lib/clang/7.0.0/include/stddef.h:132:1: warning: V677 ...
    ./src/nvim/fileio.c:1382:1: warning: V1026 ...
    ./src/nvim/fileio.c:1388:1: warning: V1026 ...

The "./src/nvim/…" paths are correctly rooted, yet PVS somehow still
thinks it should analyze "/usr/local/clang-7.0.0/…".

See also: https://stackoverflow.com/q/44906903
2019-01-19 22:13:58 +01:00
Justin M. Keyes
391f0c1ce7 pvscheck.sh: do not set --sourcetree-root [ci skip]
System headers should be ignored by PVS, but somehow aren't.
See also: https://stackoverflow.com/q/44906903
2019-01-19 13:04:32 +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