Commit Graph

19071 Commits

Author SHA1 Message Date
zeertzjq
59e80c4dfc vim-patch:8.1.1110: composing chars on space wrong when 'listchars' is set
Problem:    Composing chars on space wrong when 'listchars' is set.
Solution:   Do not use "space" and "nbsp" entries of 'listchars' when there is
            a composing character.  (Yee Cheng Chin, closes vim/vim#4197)
e5e4e22c1c
2021-09-19 13:13:44 +08:00
zeertzjq
c14dc616bf vim-patch:8.1.1079: no need for a separate ScreenLinesUtf8() test function
Problem:    No need for a separate ScreenLinesUtf8() test function.
Solution:   Get the composing characters with ScreenLines().
48aed0824e
2021-09-19 13:13:44 +08:00
zeertzjq
32663b0f7e vim-patch:8.1.1078: when 'listchars' is set a composing char on a space is wrong
Problem:    When 'listchars' is set a composing char on a space is wrong.
Solution:   Separate handling a non-breaking space and a space. (Yasuhiro
            Matsumoto, closes vim/vim#4046)
5f8069bbf5
2021-09-19 13:13:44 +08:00
zeertzjq
963474321b vim-patch:8.1.1071: cannot get composing characters from the screen
Problem:    Cannot get composing characters from the screen.
Solution:   Add screenchars() and screenstring(). (partly by Ozaki Kiichi,
            closes vim/vim#4059)
2912abb3a2
2021-09-19 13:13:44 +08:00
Gregory Anders
924e8e4f2d
fix(diagnostic): only update decorations for loaded buffers (#15715)
When vim.diagnostic.config() is called, the decorations for diagnostics
are re-displayed to use the new configuration. This should only be done
for loaded buffers.
2021-09-18 14:01:03 -07:00
Justin M. Keyes
77399184d7
ci(labeler): diagnostic 2021-09-18 13:29:56 -07:00
hrsh7th
41cfba63cd
feat(lsp): improve vim.lsp.util.apply_text_edits (#15561)
- Fix the cursor position after applying TextEdits
- Support reversed range of TextEdit
- Invoke nvim_buf_set_text one by one
2021-09-18 13:19:21 -07:00
Michael Lingelbach
340f77e78e
Merge pull request #15710 from gpanders/show_line_diagnostics
fix(diagnostic): resolve nil bufnr in show_line_diagnostics
2021-09-18 10:31:40 -07:00
Jaehwang Jerry Jung
de406f651c
vim-patch:8.2.3394: filler lines are wrong when changing text in diff mode (#15547)
Problem:    Filler lines are wrong when changing text in diff mode.
Solution:   Don't change the filler lines on every change.  Check
            scrollbinding when updating the filler lines. (closes vim/vim#8809)
04626c243c
2021-09-18 12:38:58 -04:00
dundargoc
51a98aa0c2
refactor: format #15702 2021-09-18 09:34:23 -07:00
Gregory Anders
752d2d2081 test: add test case for show_line_diagnostics 2021-09-18 10:07:54 -06:00
Gregory Anders
ef52433847 fix(diagnostic): resolve nil bufnr in show_line_diagnostics 2021-09-18 09:44:30 -06:00
Björn Linse
6cad86fffd
Merge pull request #15632 from bfredl/rtptest
runtime: always use DIP_START and remove duplication of start packages in &rtp
2021-09-18 17:14:25 +02:00
Björn Linse
a860f7880f refactor(runtime): handle pack/foo/start/bar/after dirs properly
The order should be:
XDG_CONFIG_HOME/nvim
XDG_DATA_HOME/nvim/site/pack/foo/start/bar/
XDG_CONFIG_HOME/nvim/after
XDG_DATA_HOME/nvim/site/pack/foo/start/bar/after
2021-09-18 13:59:19 +02:00
Björn Linse
396280d303 refactor(runtime): always use DIP_START when searching for runtime files
Now remove the addition of "start/*" packages in 'packpath' as
explicit items in 'runtimepath'. This avoids 'runtimepath' from becoming
very long when using a lot of plugins as packages.

To get the effective search path as a list, use |nvim_list_runtime_paths()|
2021-09-18 13:53:50 +02:00
Mathias Fußenegger
8ef2b56cac
fix(diagnostic): change default severity_sort order 2021-09-18 13:21:54 +02:00
Gregory Anders
0dcf4ab27b fix(diagnostic): remove check on nil return value
vim.diagnostic._set_signs doesn't return anything, so checking the
return value will always fail.
2021-09-17 21:10:10 -06:00
Gregory Anders
445ef41314 refactor(diagnostic): combine config() and set() calls 2021-09-17 21:07:24 -06:00
Gregory Anders
15d501ff7a refactor(diagnostic): group local functions together 2021-09-17 21:07:24 -06:00
dundargoc
1f49268c46
refactor: convert TRUE/FALSE to true/false (#15660) 2021-09-18 00:24:39 +02:00
Gregory Anders
938ed458e2 fix(diagnostic): change default severity_sort order
When severity_sort is true, higher severities should be displayed before
lower severities (e.g. ERROR is displayed over WARN).

Also improved the test case for this.
2021-09-17 14:59:30 -06:00
Michael Lingelbach
ede5695eb1
Merge pull request #15696 from gpanders/diagnostic-sign-fix
Diagnostic hot fixes
2021-09-17 11:31:56 -07:00
ii14
4d7dcbe49f
fix(termdebug): replace mapset with nvim_set_keymap (#15699)
Co-authored-by: ii14 <ii14@users.noreply.github.com>
2021-09-17 19:29:27 +02:00
Oliver Marriott
d9f93e5642
fix(typo): overriden -> overridden (RE: PR #14159) (#15360) 2021-09-17 13:07:00 -04:00
Gregory Anders
32c0631183 fix(diagnostic): support severity_sort 2021-09-17 10:50:25 -06:00
Justin M. Keyes
d8de4eb685
test: reorg #15698
Problem:
Subdirectories like "visual", "insert", "normal" encourage people to
separate *related* tests for no good reason.  Typically the _mode_ is
not the relevant topic of a test (and when it is, _then_ create
an appropriate describe() or it()).

Solution:
- Delete the various `test/functional/<mode>/` subdirectories, move
  their tests to more meaningful topics.
- Rename `…/normal/` to `…/editor/`.
  - Move or merge `…/visual/*` and `…/insert/*` tests into here where
    appropriate.
- Rename `…/eval/` to `…/vimscript/`.
  - Move `…/viml/*` into here also.

* test(reorg): insert/* => editor/mode_insert_spec.lua
* test(reorg): cmdline/* => editor/mode_cmdline_spec.lua
* test(reorg): eval core tests => eval_spec.lua
2021-09-17 09:16:40 -07:00
Gregory Anders
f87779a24d fix(diagnostic): correctly handle folder level diagnostics 2021-09-17 09:28:11 -06:00
Gregory Anders
15fbc9b69e docs(diagnostics): fix typos 2021-09-17 08:57:51 -06:00
Gregory Anders
3fd145007c fix(diagnostic): fix wrong data type in setqflist() 2021-09-17 08:53:08 -06:00
Jan Edmund Lazo
d56002f7b7
Merge pull request #15364 from seandewar/vim-8.2.3337
vim-patch:8.2.{3286,3289,3293,3298,3313,3321,3328,3330,3331,3337,3354,3355,3357,3360,3369,3375}
2021-09-17 10:47:17 -04:00
Gregory Anders
71e0e6cc63 fix(diagnostic): don't overwrite existing sign definitions 2021-09-17 08:44:52 -06:00
dundargoc
867e888599
refactor(style): switch-case formatting, "uncrustify:indent-off" #15669
* refactor: disable formatting for attribute in macro
* fixup: disable/enable uncrustify with uncrustify:indent-off/on
* fixup: stop indenting contents inside braces in case
* fixup: remove case brace if no variable declaration
2021-09-17 07:38:16 -07:00
Jan Edmund Lazo
1ec3d37192
Merge pull request #15580 from seandewar/vim-8.2.3378
vim-patch:8.2.{3378,3379,3384,3386,3398,3400}
2021-09-17 09:39:36 -04:00
zeertzjq
5f144efefa
fix: prevent K_EVENT from stopping Select mode CTRL-O #15688
When using Goneovim, Select mode `CTRL-O` returns back to Select mode
immediately (even with `--clean`). Neovim TUI (with some plugins) also randomly
returns to Select mode even if no keys are pressed when using `CTRL-O` in Select
mode.
2021-09-17 06:17:51 -07:00
Justin M. Keyes
c4b7744704
Merge #15693 fix(diagnostics)
fix(diagnostics): fixup for `show_line_diagnostics` and `lsp.diagnostics.get`
2021-09-17 04:58:31 -07:00
Christian Clason
22d146760e fix(diagnostic): don't convert diagnostic table twice
The recursive implementation of vim.lsp.diagnostic.get() applied
`diagnostic_vim_to_lsp` twice, and the second time gave wrong
results because of the unexpected format.

Fixes https://github.com/neovim/neovim/issues/15689
2021-09-17 13:35:57 +02:00
Christian Clason
3e230da90b fix(diagnostic): show_line_diagnostic with empty lnum
The documentation claims to default to the current line number if
the argument `lnum` is nil, but that was never actually done.

Fixes https://github.com/neovim/neovim/issues/15690
2021-09-17 13:33:54 +02:00
Christian Clason
4881456e83
fix(diagnostic): nvim_echo takes three args (#15687)
Fixup for https://github.com/neovim/neovim/pull/15585
Closes https://github.com/neovim/neovim/issues/15686
2021-09-17 09:21:17 +02:00
Gregory Anders
c13242cf47
fix(diagnostic): remove useless highlight links (#15683)
These links were actually defined backwards: the highlight groups
actually being used for display are the new "Diagnostic*" groups, so
linking the old "LspDiagnostics*" groups to these does absolutely
nothing, since there is nothing actually being highlighted with the
LspDiagnostics* groups.

These links were made in an attempt to preserve backward compatibility
with existing colorschemes. We could reverse the links to maintain this
preservation, but then that disallows us from actually defining default
values for the new highlight groups.

Instead, just remove the links and be done with the old LspDiagnostics*
highlight groups.

This is not technically a breaking change: the breaking change already
happened in #15585, but this PR just makes that explicit.
2021-09-17 08:17:54 +02:00
Sean Dewar
1e0d563967
vim-patch:8.2.3375: using uninitialized memory
Problem:    Using uninitialized memory.
Solution:   Initialize textprop_save_len.
df9070e300

textprop_save_len is N/A.
2021-09-17 02:10:45 +01:00
Sean Dewar
d78f06852e
vim-patch:8.2.3369: auto formatting after "cw" leaves cursor in wrong spot
Problem:    Auto formatting after "cw" leaves cursor in wrong spot.
Solution:   Do not auto-format after the delete. (closes vim/vim#8789)
6b36d2a16d
2021-09-17 02:10:45 +01:00
Sean Dewar
ebd035f08b
vim-patch:8.2.3360: user function completion fails with dict function
Problem:    User function completion fails with dict function.
Solution:   Do not stop sequencing through the list if user functions when
            encountering an empty name. (Naohiro Ono, closes vim/vim#8765,
            closes vim/vim#8774)
5aec755b67
2021-09-17 02:10:44 +01:00
Sean Dewar
26b7faf1f2
vim-patch:8.2.3357: crash when 'virtualedit' is set and window is narrow
Problem:    Crash when 'virtualedit' is set and window is narrow. ()
Solution:   Check that width is not zero. (closes vim/vim#8767)
02f8694a6b
2021-09-17 02:10:44 +01:00
Sean Dewar
2ddfd6b999
vim-patch:8.2.3337: completing "call g:" returns entries with just "g:"
Problem:    Completing "call g:" returns entries with just "g:". (Naohiro Ono)
Solution:   Skip empty strings returned by get_user_func_name(). (closes vim/vim#8753)
069f90852f
2021-09-17 02:10:44 +01:00
Sean Dewar
b24c377c8a
vim-patch:8.2.3330: Coverity reports using uninitialized field
Problem:    Coverity reports using uninitialized field.
Solution:   Initialize the field early.
7deb4115ef
2021-09-17 02:10:43 +01:00
Sean Dewar
17f377b6f9
vim-patch:8.2.3328: Coverity error for not checking return value
Problem:    Coverity error for not checking return value.
Solution:   Check value is not negative.
b85d3627d9
2021-09-17 02:10:43 +01:00
Sean Dewar
2cbbab28d2
vim-patch:8.2.3321: some code is not tested
Problem:    Some code is not tested.
Solution:   Add some more tests. (Dominique Pellé, closes vim/vim#8735)
bd9e796125

Include Test_confirm_write_partial_file() anyway, even though it will
not be run.
2021-09-17 02:10:43 +01:00
Sean Dewar
e9ddff9d8a
vim-patch:8.2.3313: unused code in win_exchange() and frame_remove()
Problem:    Unused code in win_exchange() and frame_remove().
Solution:   Remove the code. (closes vim/vim#8728)
9e2fa4bb9e
2021-09-17 02:10:42 +01:00
Sean Dewar
423150dfa0
vim-patch:8.2.3293: finding completions may cause an endless loop
Problem:    Finding completions may cause an endless loop.
Solution:   Use a better way to check coming back where the search started.
            (Andy Gozas, closes vim/vim#8672, closes vim/vim#8671)
6a230c6b32
2021-09-17 02:10:39 +01:00
Sean Dewar
7ff5f02821
vim-patch:8.2.3286: win_enter_ext() has too many boolean arguments
Problem:    win_enter_ext() has too many boolean arguments.
Solution:   use one flags argument with defined values.
d61f2f772a

Include some style changes to appease the linter.

N/A patches for version.c:

vim-patch:8.2.3289: compiler warning for unused variable with small features

Problem:    Compiler warning for unused variable with small features.
Solution:   Rearrange #ifdefs.
f18e8a969a

vim-patch:8.2.3298: build failure with small features

Problem:    Build failure with small features.
Solution:   Add #ifdef.
6f6d58c380

vim-patch:8.2.3331: Coverity warns for using value without boundary check

Problem:    Coverity warns for using value without boundary check.
Solution:   Add a boundary check.
ed7cb2df35

vim-patch:8.2.3354: build failure with +byte_offset but without +textprop

Problem:    Build failure with +byte_offset but without +textprop. (John
            Marriott)
Solution:   Adjust the #ifdef.
92755bba30

vim-patch:8.2.3355: MS-Windows: compiler warning for 64-32 bit conversion

Problem:    MS-Windows: compiler warning for 64-32 bit conversion.
Solution:   Add type casts.
434df7a401
2021-09-17 01:46:24 +01:00