Commit Graph

12456 Commits

Author SHA1 Message Date
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
Justin M. Keyes
424388c207 win/dist: nvim-qt v0.2.12 2019-01-12 23:47:05 +01:00
Justin M. Keyes
fe3f2ad0f9 CI/codecov: Avoid "fail" status for non-PR
Purpose of codecov is to:

1. show a web UI of lines that need coverage
2. sanity-check PRs
3. show a pretty badge on README

codecov (and/or gcov) is not reliable enough to allow it to cause
a "red" status in the `master` branch CI history.
2019-01-12 16:58:00 +01:00
Björn Linse
88963a18de
Merge pull request #9490 from bfredl/vim-patch-8.1.0726
normal/edit: add missing "need_cursor_line_redraw = false"
2019-01-12 10:10:56 +01:00
Björn Linse
ca58c3a4f5 normal/edit: add missing "need_cursor_line_redraw = false"
vim-patch:8.1.0726: redrawing specifically for conceal feature
2019-01-12 09:22:21 +01:00
Marco Hinz
db3c797c6b
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-12 00:52:12 +01:00
Björn Linse
8853fca1fd
Merge pull request #9484 from bfredl/highlander
screen: make update_screen() the only entry point for redrawing
2019-01-11 12:30:17 +01:00
Björn Linse
889f73e861 screen: make update_screen() the only entry point for redrawing
update_single_line() was only used for 'concealcursor'. But 'cursorline'
has very similiar characteristics (redraw both lines on move cursor
between lines) and works without its own special entry point to the
redraw subsystem.

Later on 'concealcursor' and 'cursorline' could share more logic, but for
now make the former use standard redrawWinline(). Make sure it is called
before update_screen(), so that it is immediately visible.

Get rid of update_prepare() and update_finish(), and all issues from
them and their callsites not being in sync with changes to
update_screen()
2019-01-11 10:55:43 +01:00
Marvim the Paranoid Android
10f29f79f4 version.c: update [ci skip] (#9444)
vim-patch:8.0.1336: cannot use imactivatefunc() unless compiled with +xim
vim-patch:8.0.1338: USE_IM_CONTROL is confusing and incomplete

vim-patch:8.1.0646: cannot build with Ruby 2.6.0
vim-patch:8.1.0656: trying to reconnect to X server may cause problems
vim-patch:8.1.0664: configure "fail-if-missing" does not apply to enable-gui
2019-01-11 02:24:26 +01:00
Justin M. Keyes
8986f70bdc
Merge #9468 'checkhealth: detect broken pip"' 2019-01-11 02:03:56 +01:00
Justin M. Keyes
99429e5f41 Merge #9481 'vim-patch:8.1.0449,8.1.0450'
closes #9481
2019-01-11 01:45:38 +01:00
Michael Vilim
56dec2a3a0 vim-patch:8.1.0450: build failure without the +fold feature
Problem:    Build failure without the +fold feature.
Solution:   Add #ifdef.
0e9deefb4f
2019-01-11 01:44:15 +01:00
Michael Vilim
bed95b37b2 vim-patch:8.1.0449: fix display of 'rnu' with folded lines #9481
Problem:    When 'rnu' is set folded lines are not displayed correctly.
            (Vitaly Yashin)
Solution:   When only redrawing line numbers do draw folded lines.
            (closes vim/vim#3484)
7701f30856

---
Explanation:
Before this patch, relative line numbers would update on a cursor
movement and overwrite fold highlighting in the line number columns.
Other operations can cause the fold highlighting to overwrite the line
number styles. Together, this causes the highlighting in the line number
columns to flicker back and forth while editing.

Test case: create `t.vim` with these contents:

    set fdm=marker rnu foldcolumn=2
    call setline(1, ["{{{1", "nline 1", "{{{1", "line 2"])

and then call `nvim -u NORC -S t.vim` and press `j`; observe that the fold
highlighting disappears.
2019-01-11 01:44:15 +01:00
Marco Hinz
3f10c5b533 clipboard/macOS: assume that pbcopy works #9480
Avoids ~30-60 ms startup cost for users of clipboard=unnamed.
2019-01-10 09:11:36 +01:00
Justin M. Keyes
6d8b5989bc
Merge #9472 from justinmk/pvs-warnings2 2019-01-10 08:56:38 +01:00
Pedro L. Ramos
57c7e1d4a0 vim-patch:8.1.0648: custom operators can't act upon forced motion
Problem:    Custom operators can't act upon a forced motion. (Christian
            Wellenbrock)
Solution:   Add the forced motion to the mode() result. (Christian Brabandt,
            closes vim/vim#3490)
5976f8ff00

closes #8667
closes #9476

Christian Wellenbrock:

> For (most) built in text objects it's possible to force operation on
> them to be linewise, for example by using `dVab` (`:h o_V`,
> `motion_force`). When using custom text objects (defined as mappings
> by plugins for example), this doesn't currently work.
>
> Example:
>
>     onoremap x viw
>
> Open a file with a few lines each containing some words. With the
> cursor on any word, try:
>
> 1. `dw` (builtin) deletes some characters
> 2. `dVw` (builtin) deletes linewise
> 3. `dx` (from mapping) deletes some characters
> 4. `dVx` (from mapping) deletes some characters, but should delete
>    linewise

ref: https://github.com/wellle/targets.vim/issues/214
ref: https://gitter.im/neovim/neovim?at=5b379ff7f1664406610e7483
2019-01-10 08:50:07 +01:00
Björn Linse
1ca2c8950f
Merge pull request #9479 from bfredl/redrawsign
screen: remove ad-hoc code path for redrawing signs.
2019-01-09 21:26:49 +01:00
Björn Linse
8510d5ff86
Merge pull request #9445 from bfredl/pum_api
API: select items in popupmenu
2019-01-09 11:43:19 +01:00
Justin M. Keyes
fc4ca5bdd8 CMake: Feature-detect __builtin_{add,sub}_overflow 2019-01-09 10:41:17 +01:00