Famiu Haque
9988d2f214
feat(nvim_create_user_command): pass structured modifiers to commands
...
Adds an `smods` key to `nvim_create_user_command` Lua command callbacks,
which has command modifiers but in a structured format. This removes the
need to manually parse command modifiers. It also reduces friction in
using `nvim_cmd` inside a Lua command callback.
2022-05-29 10:52:30 +06:00
kylo252
7b952793d5
refactor: missing parenthesis may cause unexpected problems ( #17443 )
...
related vim-8.2.{4402,4639}
2022-05-26 10:49:25 +08:00
dundargoc
9fec6dc9a2
refactor(uncrustify): set maximum number of consecutive newlines to 2 ( #18695 )
2022-05-25 12:31:14 -06:00
bfredl
24352cba01
Merge pull request #18528 from lewis6991/setwinopt
...
feat(api): add `win` and `buf` to `nvim_set_option_value`
2022-05-25 17:05:28 +02:00
James McCoy
47d9a393de
fix(cid/352839): USE_AFTER_FREE in create_user_command #18669
2022-05-22 10:29:15 -07:00
bfredl
7f6d2984a8
Merge pull request #18608 from ckipp01/extmarkDocs
...
docs(extmark): remove message about passing in id=0
2022-05-22 19:07:51 +02:00
devbhan singh
646e1c3a3a
feat(ui): clear message history explicitly with msg_history_clear event
2022-05-21 23:22:23 +02:00
kylo252
55246d44f9
fix(autocmds): separate command from desc ( #18617 )
2022-05-21 15:55:48 +02:00
James McCoy
b3453ea4a6
Merge pull request #18648 from jamessan/coverity-fixes
2022-05-20 14:22:15 -04:00
James McCoy
83f42e086a
perf(cid/350479): avoid copying ExtmarkInfo when calling extmark_to_array()
2022-05-20 08:17:39 -04:00
James McCoy
f15122e8a2
fix(cid/351940): free compl_arg in create_user_commands()'s error path exit
2022-05-20 08:15:07 -04:00
Famiu Haque
fb8fa004d8
fix: make nvim_cmd
not suppress errors inside key mapping
...
Closes #18632
2022-05-19 22:23:14 +06:00
ckipp01
86db222469
docs(extmark): remove message about passing in id=0
...
The docs for `nvim_buf_set_extmark` mention that you can create a new
extmark when passing in `id=0`, however if you do this you'll get an
error since the code checks that id is positive.
```
id is not a positive integer
```
This change re-words the sentence to make it clearer.
2022-05-18 21:49:31 +02:00
bfredl
6f0baa0bb7
Merge pull request #18620 from bfredl/multibar
...
fix(ui): make winbar work with floats and multigrid
2022-05-18 21:18:34 +02:00
bfredl
c28192e6f9
refactor: move more grid functions to grid.c. Clean up some variables
2022-05-18 20:16:18 +02:00
Gregory Anders
8a9ab88945
feat(api): enable nvim_exec_autocmds to pass arbitrary data ( #18613 )
...
Add a "data" key to nvim_exec_autocmds that passes arbitrary data (API
objects) to autocommand callbacks.
2022-05-18 09:51:26 -06:00
bfredl
d7dd600716
Merge pull request #18562 from famiu/feat/ui/winbar
...
feat(ui): add `'winbar'`
2022-05-18 13:08:07 +02:00
bfredl
028329850e
refactor: grid->rows and grid->cols
2022-05-18 13:06:02 +02:00
Famiu Haque
e1bdb2a258
feat(ui): add 'winbar'
...
Adds support for a bar at the top of each window, enabled through the
`'winbar'` option.
Co-authored-by: Björn Linse <bjorn.linse@gmail.com >
2022-05-18 09:27:08 +06:00
Lewis Russell
6219331c4d
feat(api): add win and buf to nvim_set_option_value
...
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com >
2022-05-17 14:48:10 +01:00
Famiu Haque
54b5222fbb
docs(api): update v:errmsg behavior #18593
2022-05-17 05:27:33 -07:00
Dundar Goc
f0148de790
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-16 13:27:06 +02:00
Oliver Marriott
5e3b16836a
docs(api): nvim_set_hl attributes #18558
2022-05-15 14:06:06 -07:00
deforde
0a3d615b1c
fix(api): nvim_eval_statusline should validate input #18347
...
Fix #18112
Make an exception for strings starting with "%!".
2022-05-15 13:06:23 -07:00
dundargoc
0a66c4a72a
docs(nvim_set_keymap): specify that optional arguments defaults to false ( #18177 )
...
Closes: https://github.com/neovim/neovim/issues/16919
2022-05-15 16:44:48 +08:00
Famiu Haque
566f8f80d6
refactor(api/nvim_cmd): use kvec_t
for constructing cmdline string
...
Co-authored-by: Björn Linse <bjorn.linse@gmail.com >
2022-05-14 10:25:52 +06:00
Andrey Mishchenko
60b1e314ed
docs: nvim_buf_[get|set]_[text|lines] ( #18404 )
...
- Use consistent formatting for args docs.
- Clarify inclusivity/exclusivity in `nvim_buf_[get|set]_text`.
2022-05-11 17:05:56 -07:00
Famiu Haque
cf68f0a512
fix(api): make nvim_cmd
work correctly with empty arguments list ( #18527 )
...
Closes #18526 .
2022-05-11 10:51:53 -06:00
bfredl
96a125b207
Merge pull request #18366 from famiu/feat/api/nvim_cmd
...
feat(api): add `nvim_cmd`
2022-05-11 10:39:02 +02:00
Famiu Haque
dfcc584665
feat(api): add nvim_cmd
...
Adds the API function `nvim_cmd` which allows executing an Ex-command through a Dictionary which can have the same values as the return value of `nvim_parse_cmd()`. This makes it much easier to do things like passing arguments with a space to commands that otherwise may not allow it, or to make commands interpret certain characters literally when they otherwise would not.
2022-05-11 13:12:16 +06:00
zeertzjq
9aa5647e68
vim-patch:8.2.4911: the mode #defines are not clearly named ( #18499 )
...
Problem: The mode #defines are not clearly named.
Solution: Prepend MODE_. Renumber them to put the mapped modes first.
249591057b
A hunk from the patch depends on patch 8.2.4861, which hasn't been
ported yet, but that should be easy to notice.
2022-05-10 07:58:58 +08:00
Dundar Goc
e31b32a293
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-09 10:03:29 +02:00
bfredl
03471e292d
Merge pull request #18425 from dundargoc/refactor/char_u/1
...
refactor: replace char_u variables and functions with char
2022-05-07 16:40:00 +02:00
Dundar Goc
2a378e6e82
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-07 14:54:01 +02:00
bfredl
5e2346178c
refactor(decor): use decor levels properly
2022-05-07 14:08:21 +02:00
Famiu Haque
14f3383c0d
fix(api): make nvim_parse_cmd
work correctly with both range and count
...
It seems range and count can be used together in commands. This PR fixes
the behavior of `nvim_parse_cmd` for those cases by removing the mutual
exclusivity of "range" and "count". It also removes range line number
validation for `nvim_parse_cmd` as it's not its job to validate the
command.
2022-05-07 12:26:49 +06:00
bfredl
8bbeab9989
Merge pull request #18442 from dundargoc/uncrustify
...
refactor: upgrade uncrustify configuration to version 0.75
2022-05-06 10:41:51 +02:00
bfredl
e3edcd06e3
Merge pull request #18438 from famiu/feat/api/nvim_parse_cmd
...
fix(api): make `nvim_parse_cmd` propagate errors
2022-05-06 10:30:48 +02:00
Dundar Goc
544ef994df
refactor: upgrade uncrustify configuration to version 0.75
2022-05-06 00:46:30 +02:00
bfredl
d14d308ce8
Merge pull request #18431 from famiu/feat/api/nvim_get_autocmds/group_name
...
feat(api): add `group_name` to `nvim_get_autocmds`
2022-05-05 20:17:11 +02:00
Famiu Haque
96289f2416
feat(api): add group_name
to nvim_get_autocmds
2022-05-05 23:17:36 +06:00
Famiu Haque
511f06a56e
fix(api): make nvim_parse_cmd
propagate errors
...
Makes `nvim_parse_cmd` propagate any errors that occur while parsing to
give the user a better idea of what's wrong with the command.
2022-05-05 23:11:57 +06:00
bfredl
d4f47fe17d
Merge pull request #18416 from dundargoc/refactor/remove-char_u
...
refactor/remove char u
2022-05-05 18:42:00 +02:00
Dundar Goc
9a671e6a24
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-05 18:10:46 +02:00
Famiu Haque
7aedcd8feb
refactor(api): make range
in nvim_parse_cmd
an array
...
Changes the `range` value in `nvim_parse_cmd` into an array to describe
range information more concisely. Also makes `range` and `count` be
mutually exclusive by making count `-1` when command takes a range
instead of a count. Additionally corrects the behavior of `count` for
built-in commands by making the default count `0`.
2022-05-05 20:35:14 +06:00
Dundar Goc
f08477789f
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-04 17:49:37 +02:00
Dundar Goc
5576d30e89
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-04 15:25:54 +02:00
Famiu Haque
3ec93ca92c
feat(nvim_parse_cmd): add range, count, reg #18383
...
Adds range, count and reg to the return values of nvim_parse_cmd. Also makes
line1 and line2 be -1 if the command does not take a range. Also moves
nvim_parse_cmd to vimscript.c because it fits better there.
2022-05-04 05:04:01 -07:00
Yatao Li
29a6cda3ff
feat(api/ui): win_extmarks
2022-05-03 22:26:02 +08:00
Dundar Goc
b9bdd0f61e
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-03 10:33:40 +02:00