Commit Graph

20740 Commits

Author SHA1 Message Date
Sean Dewar
f6cc604af2
fix(api): convert blob to NUL-terminated API string
Looks like I did an oopsie; although API strings carry a size field, they should
still be usable as C-strings! (even though they may contain embedded NULs)
2022-02-26 14:18:34 +00:00
bfredl
850b3e19c9 refactor(lua): cleanup and docs for threads 2022-02-26 15:00:13 +01:00
bfredl
639ec044b7
Merge pull request #16845 from seandewar/floaty-aucmd-win
fix(aucmd_win): ensure aucmd_win stays floating
2022-02-26 14:53:50 +01:00
bfredl
4b834a9f7c
Merge pull request #17414 from zeertzjq/api-set-cursor-redraw
fix(api): nvim_win_set_cursor() redraw for cursorline and statusline
2022-02-26 14:52:24 +01:00
bfredl
634c3addd2
Merge pull request #17337 from dundargoc/refactor/pvs/v560
refactor(PVS/V560): part of conditional expression is always true/false
2022-02-26 14:48:12 +01:00
zeertzjq
41f309adeb
Merge pull request #17527 from zeertzjq/test-pending-win32
test: use helpers.pending_win32(pending) instead of iswin()
2022-02-26 21:17:38 +08:00
Björn Linse
acf38245d8 refactor(lua): use references directly on main thread 2022-02-26 14:01:38 +01:00
erw7
b87867e69e feat(lua): add proper support of luv threads 2022-02-26 14:01:38 +01:00
Christian Clason
d0f8f76224
vim-patch:8.2.4464: Dtrace files are recognized as filetype D (#17518)
Problem:    Dtrace files are recognized as filetype D.
Solution:   Add a pattern for Dtrace files. (Teubel György, closes vim/vim#9841)
            Add some more testing.
4d56b971cb
2022-02-26 14:01:37 +01:00
Christian Clason
2703cf95dd
Merge pull request #17219 from clason/bump-luvit
build(deps): bump libuv and luv
2022-02-26 14:00:46 +01:00
zeertzjq
cfcc40cd48
Merge pull request #17479 from dundargoc/docs/usr04/update-Y-description
docs: update explanation of Y to reflect new defaults
2022-02-26 20:51:47 +08:00
bfredl
8dd3d40f5c
Merge pull request #17472 from lewis6991/signcol_improvements
signcol improvements
2022-02-26 13:37:01 +01:00
zeertzjq
0545bd2180 test: use helpers.pending_win32(pending) instead of iswin() 2022-02-26 19:40:11 +08:00
Christian Clason
2da9450de5 build(deps): bump libuv to 1.43.0+7ae0c95 2022-02-26 12:06:02 +01:00
Christian Clason
b857bc770b build(deps): bump luv to 1.43.0-0 2022-02-26 12:00:45 +01:00
Jade Lovelace
e5b5cbd19c feat(hardcopy): check gui colours for highlights first
Previously, :hardcopy would only use terminal highlight colours, with a
fixed mapping table, despite internally supporting true colour. This
patch looks at the guifg colour first while coming up with the printing
highlight colours, then falls back to the terminal ones.

I have passed through the modec argument in this change because it was
there before, but it could be deleted and hardcoded to 'c' since nobody
sets it to anything else anywhere.
2022-02-25 18:51:16 -08:00
James McCoy
005a7aa167
Merge pull request #17467 from dundargoc/ci/remove-failing-windows
ci: remove failing windows CI tests
2022-02-25 07:10:29 -05:00
Lewis Russell
9d53791cf8 fix(signcol): update cursor when signcol changes
Fixes #14195
2022-02-24 22:36:00 +00:00
Lewis Russell
eb6e5d0991 refactor(signcol): store signcol in win_T 2022-02-24 22:36:00 +00:00
Lewis Russell
e67cd22c38 fix(signcol): handle edge case with maximum value
50250542 failed to consider that the maximum passed to buf_signcols
is window scoped whereas the signcols value is buffer scoped. This can
lead to a bug where the signcolumn becomes incorrect if:
- global signcolumn is set to auto:N
- signcolumn in a window is changed locally to auto:M where M > N
- the buffer has a line with M or greater signs.
2022-02-24 22:35:59 +00:00
Gregory Anders
fdea15723f
feat(filetype): support scripts.vim with filetype.lua (#17517)
When filetype.vim is disabled, create the autocommand that runs
scripts.vim in filetype.lua.
2022-02-24 10:02:17 -07:00
Lewis Russell
b5bf4877c0
feat(highlight): support for blend in nvim_set_hl (#17516) 2022-02-24 09:50:05 -07:00
James McCoy
73da7cef7b
Merge pull request #17390 from RenFraser/feature/packaging
ci: improve cpack packaging
2022-02-24 06:46:07 -05:00
Dundar Göc
1630ec742d docs: update explanation of Y to reflect new defaults
Closes https://github.com/neovim/neovim/issues/17435
2022-02-24 18:13:44 +08:00
Henry Fraser
087aad3dcd ci: improved cpack packaging
Addresses: #12571

- Added the following installers through CMake files:
    - Windows NSIS.
    - Windows MSI.
    - Windows zip.
    - MacOs tarball.
    - Linux tarball.
    - Linux Deb package.
- Tweaked pipeline CPack commands to build using new CMakeLists.txt configuration file.
- Added icons and relevant packaging files.
- Updated notes.md to reflect new installation instructions.

This isn't meant to be the perfect solution, it's simply a first pass at using a
simple packaging system to build Windows installers. A Debian package has also
been added since it's very easy but other packages have been left out due to
limiting the scope. Hopefully we can build further upon this and improve it
over time with code signing, better icons and more user-friendly installation
graphics and so on.
2022-02-24 19:54:44 +10:00
Gregory Anders
15004473b5
fix(api)!: correctly handle negative line numbers for nvim_buf_set_text (#17498)
nvim_buf_set_text does not handle negative row numbers correctly: for
example,

    nvim_buf_set_text(0, -2, 0, -1, 20, {"Hello", "world"})

should replace the 2nd to last line in the buffer with "Hello" and the
first 20 characters of the last line with "world". Instead, it reports
"start_row out of bounds". This happens because when negative line
numbers are used, they are incremented by one additional number to make
the non-negative line numbers end-exclusive. However, the line numbers
for nvim_buf_set_text should be end-inclusive.

In #15181 we handled this for nvim_buf_get_text by adding a new
parameter to `normalize_index`. We can solve the problem with
nvim_buf_set_text by simply availing ourselves of this new argument.

This is a breaking change, but makes the semantics of negative line
numbers much clearer and more obvious (as well as matching
nvim_buf_get_text).

BREAKING CHANGE: Existing usages of nvim_buf_set_text that use negative
line numbers will be off-by-one.
2022-02-23 22:19:47 +00:00
Sean Dewar
c07b5b5de6
vim-patch:partial 944697ae196 (#17493)
Update runtime files
944697ae19

Doc changes:

Include remote_*() (even though +clientserver and remote.txt isn't ported yet)
Omit screenpos() (need v8.2.4389)
Other changes are N/A or cannot be directly applied
2022-02-23 12:22:18 +00:00
Sean Dewar
430371da5b
refactor(aucmd_win): remove need to restore window layout
There are some places that mess with the window layout in preparation for moving
a window to a different split (win_split_ins called with new_wp != NULL).

This means the window layout can change slightly even if win_split_ins fails.

This is why it was still needed to restore the window layout in
aucmd_{prep,rest}buf even if we disallow win_split_ins from making aucmd_win
non-floating by moving it into a split.

We can just skip messing with the layout in such places if we're dealing with
the aucmd_win.
2022-02-23 00:13:17 +00:00
Sean Dewar
2deffb5ea8
fix(aucmd_win): ensure aucmd_win stays floating
Nvim uses a floating window for the autocmd window, but in certain situations,
it can be made non-floating (`:wincmd J`), which can cause issues due to the
previous setup and cleanup logic for a non-floating aucmd_win being removed from
aucmd_prepbuf and aucmd_restbuf.

This can cause glitchiness and crashes due to the aucmd_win's frame being
invalid after closing its tabpage, for example.

Ensure aucmd_win cannot be made non-floating. The only place this happens is in
win_split_ins if new_wp != NULL.
2022-02-23 00:09:27 +00:00
Gregory Anders
11f7aeed7a
feat(api): implement nvim_buf_get_text (#15181)
nvim_buf_get_text is the mirror of nvim_buf_set_text. It differs from
nvim_buf_get_lines in that it allows retrieving only portions of lines.

While this can typically be done easily enough by API clients,
implementing this function provides symmetry between the get/set
text/lines APIs, and also provides a nice convenience that saves API
clients the work of having to slice the result of nvim_buf_get_lines
themselves.
2022-02-22 20:19:21 +00:00
Christian Clason
30c9c8815b
vim-patch:partial 944697ae1968 (#17490)
Update runtime files
944697ae19

skip: docs
skip: translations
2022-02-21 23:01:22 +01:00
Christian Clason
10a46a20ce
refactor(highlight)!: optional arguments for highlight.range as table (#17462)
also update documentation

BREAKING CHANGE: signature of highlight.range is now
     vim.highlight.range(bufnr, ns, hlgroup, start, finish,
         { regtype = regtype, inclusive = inclusive, priority = priority })

Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
2022-02-21 21:21:42 +01:00
Lewis Russell
1e7cb2dcd9
fix(highlight): accept NONE as a color name (#17487)
... for when `ns=0`.

Also update the documentation of nvim_set_hl to clarify the set
behaviour.

Fixes #17478
2022-02-21 13:17:36 -07:00
James McCoy
fc7fc14bd2
Merge pull request #17484 from dundargoc/ci/skip-ci-on-doc-changes
ci: skip ci workflow on only documentation changes
2022-02-21 06:39:59 -05:00
Dundar Göc
07a5a85323 ci: skip ci workflow on only documentation changes 2022-02-21 10:12:07 +01:00
zeertzjq
726ec7fb17
Merge pull request #17403 from zeertzjq/vim-8.1.1955
vim-patch:8.1.{1846,1955},8.2.0156
2022-02-21 08:02:45 +08:00
Aetf
aeb390e28f
docs: clarify ftdetect scripts loading during packadd (#17465)
The old description doesn't match the current behavior anymore.
2022-02-20 15:58:31 -07:00
zeertzjq
9fa46d3fd4
Merge pull request #17480 from zeertzjq/vim-8.2.4427
vim-patch:8.2.4427: getchar() may return modifiers if no character is available
2022-02-21 06:46:59 +08:00
zeertzjq
3828fb7ea4 vim-patch:8.2.4427: getchar() may return modifiers if no character is available
Problem:    getchar() may return modifiers if no character is available.
Solution:   Do not process modifiers when there is no character. (closes vim/vim#9806)
ad6c45f625
2022-02-21 06:06:01 +08:00
Michael Lingelbach
d80c9b9259
fix(diagnostic): use botright copen for qflist (#17475)
This matches the LSP handlers, and forces the qflist for diagnostics to
span across the horizontal space, below all open windows.
2022-02-20 13:44:14 -08:00
Dundar Göc
864e51a1dd test: correct emmylua annotations
This will fix the warnings sumneko language server outputs.
2022-02-20 21:14:27 +01:00
Michael Lingelbach
6a3acccd8b
fix(lsp): use botright copen for all handlers (#17471) 2022-02-20 11:09:01 -08:00
James McCoy
4b3fb4b177
Merge pull request #17469 from jamessan/use-sysdeps-for-lint-ci
Use system dependencies for lint CI
2022-02-20 07:35:35 -05:00
James McCoy
13b13dcaa0
Merge pull request #17470 from dundargoc/ci/remove-success
ci: remove success check since it's the default
2022-02-20 07:34:50 -05:00
Dundar Göc
4ea8201356 ci: remove success check since it's the default 2022-02-20 13:17:55 +01:00
Dundar Göc
82c5a02050 ci: skip tests that fail on windows 2022-02-20 10:22:39 +01:00
James McCoy
2550212b25 ci(win): use vswhere to automatically setup required vsdev env vars 2022-02-20 10:18:45 +01:00
James McCoy
921162a4b1 ci: bump Windows image to windows-2019
The VS 2019 CMake generator no longer has different generator types for
different architectures.  Now, the architecture is specified via CMake's
`-A` switch.  However, this requires we also propagate
`${CMAKE_GENERATOR_PLATFORM}` to the bundled deps, so they build for the
same architecture as Nvim.
2022-02-20 10:18:45 +01:00
James McCoy
2446b25c6b
ci: only cache third-party deps if they exist 2022-02-19 20:36:29 -05:00
James McCoy
0adbe58bb2
ci: ensure ~/.cache exists 2022-02-19 20:36:29 -05:00