| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| | |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| | |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| | |
* refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes vim/vim#11792)
https://github.com/vim/vim/commit/1cfb14aa972ccf3235ac67f07b7db1175b7c5384
Partial port as some highlight.c changes depend on previous patches.
Cherry-pick fname_match() change from patch 8.2.4959.
Omit internal_func_check_arg_types(): only used for Vim9 script.
N/A patches for version.c:
vim-patch:9.0.1167: EditorConfig files do not have their own filetype
Problem: EditorConfig files do not have their own filetype.
Solution: Add the "editorconfig" filetype. (Gregory Anders, closes vim/vim#11779)
https://github.com/vim/vim/commit/d41262ed06564cef98a3800e2928e6e0db91abbf
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| | |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
| |\
| | |
| | | |
fix(rpc): don't free args on error in rpc_send_event
|
| | |
| | |
| | |
| | |
| | | |
fixup #21631
fixes #21690
|
| |/
| |
| |
| |
| | |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
| | |
|
| |
| |
| | |
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Code is indented more than needed.
Solution: Use an early return to reduce indentation. (Yegappan Lakshmanan,
closes vim/vim#11769)
https://github.com/vim/vim/commit/dc4daa3a3915fba11ac87d27977240d9a5e0d47d
Omit expand_autoload_callback(): only applies to Vim9 script.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| | |
Only one of "fork" and "system" should be defined.
Also change the line above "win32" to match Vim.
|
| |
| |
| |
| |
| | |
Duplicating get_option_value() logic for an obscure future refactor
isn't really worthwhile, and findoption() isn't used anywhere else
outside the options code.
|
| |
| |
| |
| |
| |
| |
| | |
Problem: `chansend()` on Windows sends lines in reverse order.
Cause: Using \n instead of \r\n for newlines on Windows.
Solution: on Windows, use CRLF newline characters.
Fixes #18501
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#21303)
Problem: Without /dev/urandom srand() seed is too predictable.
Solution: Use micro seconds and XOR with process ID. (Yasuhiro Matsumoto,
closes vim/vim#11656)
https://github.com/vim/vim/commit/f0a9c004825ab686270ee57260652cce25e61049
Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Some source files are too big.
Solution: Move buffer and window related functions to evalbuffer.c and
evalwindow.c. (Yegappan Lakshmanan, closes vim/vim#4898)
https://github.com/vim/vim/commit/261f346f8154c0ec7094a4a211c653c74e9f7c2e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Use of strftime() is not safe.
Solution: Check the return value of strftime(). Use a larger buffer and
correctly pass the available space. (Dominique Pellé, closes
vim/vim#11348)
https://github.com/vim/vim/commit/84d14ccdb50dc9f362066a2c83bfaf331314e5ea
Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Max() and min() can give many error messages.
Solution: Bail out at the first error. (closes vim/vim#1039, closes vim/vim#7778)
https://github.com/vim/vim/commit/ab65fc77c5389f7d3f788bbdc3d931561feab131
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |\
| | |
| | | |
refactor: replace char_u with char 13: remove `STRLEN` part 3
|
| | |
| | |
| | |
| | | |
Work on https://github.com/neovim/neovim/issues/459
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: getbufline() is inefficient for getting a single line.
Solution: Add getbufoneline().
https://github.com/vim/vim/commit/ce30ccc06af7f2c03762e5b18dde37b26ea6ec42
Cherry-pick part of usr_41.txt from patch 8.1.1628.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#21112)
Problem: get(Fn, 'name') on funcref returns special byte code.
Solution: Use the printable name.
https://github.com/vim/vim/commit/1ae8c262df7083dfb4b41485508951c50eccc84c
Cherry-pick printable_func_name() from patch 8.2.0149.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.
Work on https://github.com/neovim/neovim/issues/549, but doesn't close
it since this only works fully for .c files and not headers.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#21038)
Problem: col() and charcol() only work for the current window.
Solution: Add an optional winid argument. (Yegappan Lakshmanan,
closes vim/vim#11466, closes vim/vim#11461)
https://github.com/vim/vim/commit/4c8d2f02b3ce037bbe1d5ee12887e343c6bde88f
Cherry-pick test_functions.vim change from patch 8.2.0633.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |\
| | |
| | | |
refactor: fix clang-tidy warnings
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Enable and fix bugprone-misplaced-widening-cast warning.
Fix some modernize-macro-to-enum and readability-else-after-return
warnings, but don't enable them. While the warnings can be useful, they
are in general too noisy to enable.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- `:write ++p foo/bar/baz.txt` should create parent directories `foo/bar/` if
they do not exist
- Note: `:foo ++…` is usually for options. No existing options have
a single-char abbreviation (presumably by design), so it's safe to
special-case `++p` here.
- Same for `writefile(…, 'foo/bar/baz.txt', 'p')`
- `BufWriteCmd` can see the ++p flag via `v:cmdarg`.
closes #19884
|
| |/
| |
| |
| |
| |
| | |
Problem: deletebufline() does not always return 1 on failure.
Solution: Refactor the code to make it work more predictable. (closes vim/vim#11511)
https://github.com/vim/vim/commit/7af3ee2b83545169d78a28ab1cd89aff1127f8b3
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot have expandcmd() give an error message for mistakes.
Solution: Add an optional argument to give errors. Fix memory leak when
expanding files fails. (Yegappan Lakshmanan, closes vim/vim#10071)
https://github.com/vim/vim/commit/2b74b6805b5c8c4836b66df5d949f5ff6a77f8c7
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: strchars() defaults to counting composing characters.
Solution: Add strcharlen() which ignores composing characters.
https://github.com/vim/vim/commit/70ce8a1561c5396e4c4381f76a005cbb97646f80
Use docs from latest Vim instead.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: cannot pass "true" to split(), str2nr() and strchars().
Solution: Use tv_get_bool_chk(). (closes vim/vim#6884, closes vim/vim#6885, closes vim/vim#6886)
https://github.com/vim/vim/commit/3986b94b090ea258109630008611230a599999ab
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: cannot use "true" with deepcopy().
Solution: Use tv_get_bool_chk(). (closes vim/vim#6867)
https://github.com/vim/vim/commit/44b4a246b62e0622550b963bcf3034dce3bcfc0c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Using 2 where bool is expected may throw an error.
Solution: Make this backwards compatible.
https://github.com/vim/vim/commit/bade44e5cad1b08c85d4a8ba08d94a30458dddfb
In legacy Vim script get_bool functions do the same thing as get_number
functions, so just add aliases using #define.
N/A patches for version.c:
vim-patch:8.2.1506: Vim9: no error when using a number other than 0 or 1 as bool
Problem: Vim9: no error when using a number other than 0 or 1 as bool.
Solution: Check the number is 0 or 1.
https://github.com/vim/vim/commit/d70840ed68296c1144d743e6335003c81c558c24
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: wrong argument for append() results in two errors.
Solution: Check did_emsg. Also for setline(). Adjust the help for
appendbufline().
https://github.com/vim/vim/commit/8b6256f6ec075cca40341e61ebc9f538b4902dd1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Duplicated code for adding buffer lines.
Solution: Move code to a common function. Also move map functions to map.c.
(Yegappan Lakshmanan, closes vim/vim#8665)
https://github.com/vim/vim/commit/4a15504e911bc90a29d862862f0b7a46d8acd12a
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| | |
Co-authored-by: Lewis Russell <me@lewisr.dev>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Crash when using win_move_separator() in other tab page.
Solution: Check for valid window in current tab page.
(closes vim/vim#11479, closes vim/vim#11427)
https://github.com/vim/vim/commit/873f41a0187e81a22aa4622fbf938de72a54abba
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: return type of readfile() is any.
Solution: Add readblob() so that readfile() can be expected to always
return a list of strings. (closes vim/vim#7671)
https://github.com/vim/vim/commit/c423ad77ed763c11ba67729bbf63c1cf0915231f
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
vim-patch:86e6717ace4f
Problem: Crash when using win_move_statusline() in another tab page.
Solution: Check for valid window pointer. (issue vim/vim#11427)
https://github.com/vim/vim/commit/86e6717ace4f5e00eaeb84b59e3fc92bca548155
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot translate messages in a Vim script.
Solution: Add gettext(). Try it out for a few messages in the options
window.
https://github.com/vim/vim/commit/0b39c3fd4c5d1c8ebd2efa85fced7df5e17efd3b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Using uninitialized memory when reading empty file.
Solution: Check for empty file before checking for NL. (Dominique Pellé,
closes vim/vim#9511)
https://github.com/vim/vim/commit/f5d639a8af719eb8ecb141b5c0890627e4d83134
Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* refactor: readability-uppercase-literal-suffix
* refactor: readability-named-parameter
* refactor: bugprone-suspicious-string-compare
* refactor: google-readability-casting
* refactor: readability-redundant-control-flow
* refactor: bugprone-too-small-loop-variable
* refactor: readability-non-const-parameter
* refactor: readability-avoid-const-params-in-decls
* refactor: google-readability-todo
* refactor: readability-inconsistent-declaration-parameter-name
* refactor: bugprone-suspicious-missing-comma
* refactor: remove noisy or slow warnings
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| | |
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Wrong column when calling setcursorcharpos() with zero lnum.
Solution: Set the line number before calling buf_charidx_to_byteidx().
(closes vim/vim#11329)
https://github.com/vim/vim/commit/79f234499b6692cc16970b7455bc9b002242632f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: no error when using "2" for a line number.
Solution: Give an error message if the line number is invalid. (closes vim/vim#7492)
https://github.com/vim/vim/commit/9a963377b4811e4e0419ec8825856ff4b01331ac
N/A patches for version.c:
vim-patch:8.2.1465: Vim9: subscript not handled properly
Problem: Vim9: subscript not handled properly.
Solution: Adjust error message. Remove dead code. Disallow string to
number conversion in scripts.
https://github.com/vim/vim/commit/56acb0943ede35cd9d2f6667cde2442819ccbf59
|