runtime(doc): add missing entries for the keys CTRL-W g<Tab> and <C-Tab>
fixes: vim/vim#14777fed01960d2
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: smoothscroll may cause infinite loop, with
very narrow windows
(Jaehwang Jung, after v9.1.0280)
Solution: Check for width1 being negative, verify
that win_linetabsize does not overflow
fixes: vim/vim#14750closes: vim/vim#14772eff20eb35d
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Compiler warning when building Nvim in Release mode:
In function ‘msg_puts_display’,
inlined from ‘disp_sb_line’ at **/src/nvim/message.c:2647:5:
**/src/nvim/message.c:2165:18: warning: ‘strnlen’ specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overread]
2165 | size_t len = strnlen(str, (size_t)maxlen);
| ^
Solution: Use strlen() when maxlen is negative.
Problem:
vim.fs.normalize() normalizes too much vim.loader and is slow.
Solution:
Make it faster by doing less. This reduces the times spent in
vim.fs.normalize in vim.loader from ~13ms -> 1-2ms.
Numbers from a relative benchmark:
- Skipping `vim.validate()`: 285ms -> 230ms
- Skipping `path_resolve_dot()`: 285ms -> 60ms
- Skipping `double_slash`: 60ms -> 35ms
Closes https://github.com/neovim/neovim/issues/28484.
Closes https://github.com/neovim/neovim/issues/28719.
Co-authored-by: Chris <crwebb85@gmail.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Jake B <16889000+jakethedev@users.noreply.github.com>
Co-authored-by: Jonathan Raines <jonathan.s.raines@gmail.com>
Co-authored-by: Yi Ming <ofseed@foxmail.com>
Co-authored-by: Zane Dufour <zane@znd4.me>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Problem:
On the page: https://neovim.io/doc/user/dev_vimpatch.html
The links extend beyond the container and thus end up behind the navigation to the right.
Solution:
Add these lines to get_help_html.lua:
white-space: normal;
word-wrap: break-word;
Re-normalizing a path after a `joinpath` isn't necessary. Calling
`normalize` on each child directory had quite a bit of impact when
traversing a large directory.
A simple test showed:
Before: ~144ms
After: ~80ms
running the following logic against a dir with 4367 child folders and
25826 files:
local files = {}
local start = uv.hrtime()
for name, type in vim.fs.dir(path, { depth = max_depth }) do
table.insert(files, { name, type })
end
local duration = uv.hrtime() - start
Relates to https://github.com/neovim/neovim/issues/23291
ftplugin(python): E16 fix, async keyword support for define (vim/vim#14751)
This change includes the following changes:
- Fix "E16: Invalid range" when using a count with jump to start/end of class/method
- Update define with optional async keyword
- Update maintainer email
86f6e2c2ee
Co-authored-by: Tom Picton <tom@tompicton.com>
runtime(netrw): prefer scp over pscp
regression introduced in ce2ad9ffd79fe6b2307cd46b9
The current logic is a bit funny, in that it checks for an executable of
scp, then pscp and if neither exists, it uses: scp :/
Anyway, let's fall back to the logic used before the above commit.
related: vim/vim#1473943f2edc096
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: The column width 10 for parser name (lang) is too short.
For example, `markdown_inline` has 15 characters, which results in a
slight misalignment with other lines.
e.g. it looked like:
```
- OK Parser: markdown ABI: 14, path: .../parser/markdown.so
- OK Parser: markdown_inline ABI: 14, path: .../parser/markdown_inline.so
- OK Parser: php ABI: 14, path: .../parser/php.so
```
Solution: Use column width 20. As of now, the longest name among those
available in nvim-treesitter has length 18 (`haskell_persistent`).
e.g.:
```
- OK Parser: markdown ABI: 14, path: .../parser/markdown.so
- OK Parser: markdown_inline ABI: 14, path: .../parser/markdown_inline.so
- OK Parser: php ABI: 14, path: .../parser/php.so
```
Problem:
The nvim_win_xx_ns function family introduced in ba0370b1d7
needs more bake-time. Currently it's narrowly defined for windows, but
other scopes ("buffer") and features are likely in the future.
Solution:
- Rename the API with double-underscore to mark it as EXPERIMENTAL.
TODO/FUTURE:
- Rename and change the signature to support more than just "window"
scope, and for other flexibility.
- Open question: we could choose either:
- "store scopes on namespaces", or
- "store namespaces on scopes (w:/b:/…)"
Problem: No scrolling happens with half-page scrolling with line
filling entire window when 'smoothscroll' is disabled.
(Mathias Rav, after v9.1.0285)
Solution: Adjust amount to move cursor by so that it is moved the same
number of lines as was scrolled, even when scrolling different
number of lines than requested with 'nosmoothscroll'.
58448e09be
Problem: Divide by zero with getmousepos() and 'smoothscroll'.
Solution: Don't compute skip_lines when width1 is zero.
(zeertzjq)
closes: vim/vim#14747031a745608
runtime(doc): Add Makefile for the Vim documentation on Windows (vim/vim#13467)
* Makefile for the Vim documentation on Windows
* Corrected comments
b23c1fc596
Co-authored-by: Restorer <69863286+RestorerZ@users.noreply.github.com>
runtime(java): Strive to remain compatible for at least Vim 7.0 (vim/vim#14744)
Also:
- Limit all look-behind regexp patterns.
- Cache regexp capabilities for [:upper:] and [:lower:].
d3952e8cfe
Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
Problem: filetype: zsh module files are not recognized
Solution: Detect '*.mdh' and '*.epro' as C filetype, '*.mdd' as zsh
filetype, determine zsh-modules '*.pro' from from it's content
(Wu, Zhenyu)
closes: vim/vim#14737887a38cee7
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
runtime(java): Stop handpicking syntax groups for @javaTop (vim/vim#14727)
* runtime(java): Stop handpicking syntax groups for @javaTop
Also:
- Remove the obsolete comment for g:java_allow_cpp_keywords.
- Remove the commented out groups java\%[Debug\]StringError.
- Infer and set the preferred formatting Vim options from
the modeline.
Since vim-6-0u, non-contained syntax groups can be referred
to by using the "contains=TOP..." argument.
* Set &encoding and &termencoding to "utf-8" for test files
* Limit non-ASCII charset to [§ƒɐɘʬʭΑ-Τα-μ] for test files
06bdac1580
Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
Problem:
The file watcher backends for Linux have too many limitations and
doesn't work reliably.
Solution:
disable didChangeWatchedFiles on Linux
Ref: #27807, #28058, #23291, #26520
Problem: Invalidated regions that are flushed during startup are
cleared with unitialized "clear_attrs", which is perceived as
flickering.
Solution: Initialize "clear_attrs" with current terminal background color.