aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* | | tests: fix Test_help_tagjump()Marco Hinz2019-01-17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | screen: don't unconditionally clear messages on window scrollBjörn Linse2019-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | :recover : Fix crash on non-existent *.swp #9504raffitz2019-01-15
| | | | | | | | | | | | | | Reverts d2944e6a298e. mf_open() _can_ fail if the file does not exist. closes #9503 closes #9504
* | lua: expose full interface of vim.inspect and add testBjörn Linse2019-01-14
| | | | | | | | | | | | 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.
* | lua/stdlib: Load runtime modules on-demandJustin M. Keyes2019-01-14
| | | | | | | | | | | | | | | | | | | | 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
* | lua/stdlib: vim.inspect, string functionsKillTheMule2019-01-14
| | | | | | | | | | ref #6580 ref #8677
* | API: nvim_set_vvar(): set v: variables #9395jin cong2019-01-14
| | | | | | | | closes #9349
* | dict_set_var: check value before checking its containerJustin M. Keyes2019-01-14
| | | | | | | | | | | | | | - 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.
* | clang/"null pointer dereference": close_bufferJustin M. Keyes2019-01-13
| | | | | | | | False positive: win_valid_any_tab() already checks `win != NULL`.
* | clang/"Dead assignment": screen.cJustin M. Keyes2019-01-13
| | | | | | | | | | Vim 8.1 source has equivalent structure (this isn't a case of accidental regression), but it depends on FEAT_MBYTE.
* | clang/"Dead assignment"Justin M. Keyes2019-01-13
| |
* | clang/"null passed to nonnull arg": shada.cJustin M. Keyes2019-01-13
| |
* | clang/"null passed to nonnull arg": ex_historyJustin M. Keyes2019-01-13
| |
* | clang/"null passed to nonnull arg": cs_manage_matchesJustin M. Keyes2019-01-13
| |
* | clang/"null passed to nonnull arg": expand_wildcardsJustin M. Keyes2019-01-13
| |
* | clang/"Assigned garbage": parse_shape_optJustin M. Keyes2019-01-13
| | | | | | | | | | False positive, see b6c1fae6a94d. Clang ignores the assert introduced in that commit?
* | PVS/V560: expression is always trueJustin M. Keyes2019-01-13
| |
* | display: unify cursorline and concealcursor redraw logicBjörn Linse2019-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | normal/edit: add missing "need_cursor_line_redraw = false"Björn Linse2019-01-12
| | | | | | | | vim-patch:8.1.0726: redrawing specifically for conceal feature
* | provider: improve error message if provider is missing (#9487)Marco Hinz2019-01-12
| | | | | | | | | | | | | | | | | | 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
* | Merge pull request #9484 from bfredl/highlanderBjörn Linse2019-01-11
|\ \ | | | | | | screen: make update_screen() the only entry point for redrawing
| * | screen: make update_screen() the only entry point for redrawingBjörn Linse2019-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()
* | | version.c: update [ci skip] (#9444)Marvim the Paranoid Android2019-01-11
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | vim-patch:8.1.0450: build failure without the +fold featureMichael Vilim2019-01-11
| | | | | | | | | | | | | | | | | | Problem: Build failure without the +fold feature. Solution: Add #ifdef. https://github.com/vim/vim/commit/0e9deefb4fb4f99d0ab90b21ca38260be26bf5de
* | | vim-patch:8.1.0449: fix display of 'rnu' with folded lines #9481Michael Vilim2019-01-11
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) https://github.com/vim/vim/commit/7701f308565fdc7b5096a6597d9c3b63de0bbcec --- 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.
* | Merge #9472 from justinmk/pvs-warnings2Justin M. Keyes2019-01-10
|\ \
| * | CMake: Feature-detect __builtin_{add,sub}_overflowJustin M. Keyes2019-01-09
| | |
| * | PVS/V1028: cast operands, not the resultJustin M. Keyes2019-01-09
| | |
| * | assert.h: Check overflow with STRICT_ADD, STRICT_SUBJustin M. Keyes2019-01-09
| | |
* | | vim-patch:8.1.0648: custom operators can't act upon forced motionPedro L. Ramos2019-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) https://github.com/vim/vim/commit/5976f8ff00efcb3e155a89346e44f2ad43d2405a 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
* | | Merge pull request #9479 from bfredl/redrawsignBjörn Linse2019-01-09
|\ \ \ | | | | | | | | screen: remove ad-hoc code path for redrawing signs.
| * | | bufhl: simplify redraw logicBjörn Linse2019-01-09
| | | | | | | | | | | | | | | | | | | | using changed_lines_buf was technically incorrect, as the buffer wasn't modififed.
| * | | remove dead argument of redrawWinlineBjörn Linse2019-01-09
| | | |
| * | | screen: avoid redrawing windows immediately when debug signs are placed.Björn Linse2019-01-09
| | | |
* | | | Merge pull request #9445 from bfredl/pum_apiBjörn Linse2019-01-09
|\ \ \ \ | | | | | | | | | | API: select items in popupmenu
| * | | | api: select items in popupmenuBjörn Linse2019-01-09
| |/ / /
* / / / win/TUI: fix text overrides line numbers #9474erw72019-01-09
|/ / / | | | | | | fixes #9461
* / / API: don't directly call update_screen() in API functionsBjörn Linse2019-01-08
|/ / | | | | | | | | | | | | | | | | There is no need to call update_screen() directly in an API function, mode input processing invokes update_screen() as needed. And if the API call is done in a context where redraw is disabled, then redraw is disabled for a reason. A lot of API functions are of equal semantical strength (nvim_call_function and nvim_execute_lua can also do whatever, nvim_command is not special), this inconsistency has no purpose.
* | vim-patch:8.1.0700: using "gt" sometimes does not redraw a tab (#9464)Justin M. Keyes2019-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Using "gt" sometimes does not redraw a tab. (Jason Franklin) Solution: Always set must_redraw in redraw_all_later(). https://github.com/vim/vim/commit/04b4e1a42409f81d65ae4801ac867dc0bba3d7b8 ref https://github.com/vim/vim/commit/bf3250a8ad39797e3ccdac82d20c6f19533419e4#r31852304 > I fixed it in a more general way, in that if we don't find a window > that doesn't have the redraw type set it, then it will not set > must_redraw, even though that's clearly intended. ref #9152 ref #9155 NA patches: vim-patch:8.1.0698 vim-patch:8.1.0699
* | lintJan Edmund Lazo2019-01-07
| |
* | vim-patch:8.1.0696: when test_edit fails 'insertmode' may not be resetJan Edmund Lazo2019-01-06
| | | | | | | | | | | | | | | | | | Problem: When test_edit fails 'insertmode' may not be reset and the next test may get stuck. (James McCoy) Solution: Always reset 'insertmode' after executing a test. Avoid that an InsertCharPre autocommand or a 'complete' function can change the state. (closes vim/vim#3768) https://github.com/vim/vim/commit/8ad16da7290190f55f88073d5586dfe133fddf45
* | Merge #9459 from janlazo/vim-8.1.0677Justin M. Keyes2019-01-06
|\ \
| * | vim-patch:8.1.0685: get_buf_tv() is named inconsistentlyJan Edmund Lazo2019-01-05
| | | | | | | | | | | | | | | | | | Problem: get_buf_tv() is named inconsistently. Solution: Rename it to tv_get_buf(). (Yegappan Lakshmanan, closes vim/vim#3759) https://github.com/vim/vim/commit/f2d79fa92d0ed90732f52dd88da4ad66c2c5ce13
| * | vim-patch:8.1.0687: sentence text object in Visual mode is not testedJan Edmund Lazo2019-01-05
| | | | | | | | | | | | | | | | | | Problem: Sentence text object in Visual mode is not tested. Solution: Add a test. (Dominique Pelle, closes vim/vim#3758) https://github.com/vim/vim/commit/6d3a1940be9d3f2b079f81baa9b19f839289b69e
| * | vim-patch:8.1.0677: look-behind match may use the wrong line numberJan Edmund Lazo2019-01-05
| | | | | | | | | | | | | | | | | | | | | Problem: Look-behind match may use the wrong line number. (Dominique Pelle) Solution: Use the line number in regsave instead of the one in behind_pos, we may be looking at the previous line. (closes vim/vim#3749) https://github.com/vim/vim/commit/866f3558141aa68862aa2fedbb7747bf2365e838
* | | Merge #8604 from janlazo/vim-8.0.0286Justin M. Keyes2019-01-06
|\ \ \
| * | | vim-patch:8.1.0683: spell highlighting does not always endJan Edmund Lazo2019-01-05
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Spell highlighting does not always end. (Gary Johnson) Solution: Also reset char_attr when spell errors are highlighted. https://github.com/vim/vim/commit/637532b3c0ca41f0de7e90b6f3c0defe06369372
| * | | vim-patch:8.1.0674: leaking memory when updating a single lineJan Edmund Lazo2019-01-05
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Leaking memory when updating a single line. Solution: Do not call start_search_hl() twice. https://github.com/vim/vim/commit/6d5b4f566a2a50c1de7300336e9e4f5e761500a8
| * | | vim-patch:8.0.0286: not always redrawing after screen resizeJan Edmund Lazo2019-01-05
| |/ / | | | | | | | | | | | | | | | | | | | | | Problem: When concealing is active and the screen is resized in the GUI it is not immediately redrawn. Solution: Use update_prepare() and update_finish() from update_single_line(). https://github.com/vim/vim/commit/c10f0e7cb0f35eea489b038e56c87b818eee975b
* | | PVS/V501: diff.c: silence warningJustin M. Keyes2019-01-05
| | | | | | | | | | | | | | | | | | False positive: vim_fgets has side effects. ref 8586770e1fd8