Björn Linse
c40f992e10
api: simplify nvim_buf_get_offset function
2018-11-01 22:00:40 +01:00
Björn Linse
281da0dd59
api: implement nvim_buf_get_offset_for_line
...
Like line2byte, but works for any buffer, and uses zero-based
indexing (API conventions).
2018-11-01 15:05:05 +01:00
Björn Linse
3d84cf6ff4
api: make nvim_buf_set_virtual_text handle invalid chars
...
Clients are supposed to supply only valid text, but if it is
invalid, translate it rather than messing up the screen
2018-10-13 16:37:17 +02:00
Björn Linse
45f53b370b
buffer: add support for virtual text annotations
2018-09-17 10:41:29 +02:00
Peter Hodge
10bb11e8d1
API: update docs WRT behaviours/methods for unloaded buffers #7688
2018-07-25 15:07:13 +10:00
Peter Hodge
8ff0872cf7
API: add nvim_buf_is_loaded() #7688
2018-07-25 15:07:13 +10:00
Peter Hodge
40e2d6b59b
API: buf_get_lines, buf_line_count handle unloaded buffers #7688
2018-07-25 15:07:13 +10:00
Justin M. Keyes
1999919c31
doc
2018-07-18 13:38:06 +02:00
ZyX
eaf2a25f12
*: Replace b_changedtick with new always-inline functions
...
Ref #8474
2018-06-22 00:44:31 +03:00
Justin M. Keyes
b94b59e4e8
refactor: buf_collect_lines ( #8509 )
...
Move redundant common logic into a function.
2018-06-09 09:32:49 +02:00
KillTheMule
333679ad0e
Add empty options dict to buf_attach
2018-05-23 22:07:27 +02:00
KillTheMule
0bee3925ab
Send changedtick as first event if buffer contents weren't requested
2018-05-23 22:07:27 +02:00
KillTheMule
e7451f8a91
Some renamings and doc changes
2018-05-23 22:07:27 +02:00
KillTheMule
2106bada5b
Enable -Wconversion
2018-05-23 22:07:27 +02:00
KillTheMule
6bdcbef2f5
The grand renaming
2018-05-23 22:07:27 +02:00
KillTheMule
37b8e95fd6
Lint
2018-05-23 22:07:27 +02:00
KillTheMule
8bcc011959
Make separate functions to start/stop live updates
2018-05-23 22:07:27 +02:00
KillTheMule
71816e584c
Adjust FUNC_API_SINCE for nvim_buf_live_updates
2018-05-23 22:07:27 +02:00
KillTheMule
bafae1c427
Add argument to not send a buffers content when updates are enabled
...
Add a test.
2018-05-23 22:07:27 +02:00
Peter Hodge
edcc73e766
API: Implement buffer updates
...
Originally written by @phodge in
https://github.com/neovim/neovim/pull/5269 .
2018-05-23 22:07:27 +02:00
Justin M. Keyes
137eedb4ed
API: nvim_get_commands(): return Dictionary
2018-05-12 07:29:21 +02:00
Justin M. Keyes
cb6672853a
API: nvim_get_commands(): builtin is irrelevant for buffer-local
...
builtin commands are never buffer-local, so we can return empty for that
case.
2018-05-12 07:29:21 +02:00
Justin M. Keyes
738bffea2c
API: nvim_get_commands(): more attributes
...
Support more :command attributes:
-bang
-bar
-register
2018-05-11 13:50:00 +02:00
Justin M. Keyes
9fa7727ce0
API: nvim_get_commands(): always return keys
...
- Always return all keys, with at least NIL value.
- Require `opts` param to be {"builtin":false}
- Validate `opts` param
2018-05-11 13:20:43 +02:00
Nimit Bhardwaj
25b6304840
API: nvim_get_commands()
2018-05-11 13:20:19 +02:00
b-r-o-c-k
7170de1971
api: Make nvim_set_option() update :verbose set ...
...
Make `:verbose set ...` show when an option was last modified by an
API client or Lua script/chunk. In the case of an API client, the
channel ID is displayed.
2018-05-03 21:05:20 -05:00
ZyX
5660482406
api/buffer: Fix PVS/V547: use correct border for lnum
...
Should actually be silencing that for the sake of the case when `long` is
actually not 64-bit. But it appears that Vim had already defined maximal line
number. And even declared that exact value invalid, so no need in silencing.
2018-04-02 00:41:00 +03:00
George Zhao
06994e0e21
Fix warning about conversion on mingw64
2018-01-18 21:30:03 +08:00
mkotha
ac87d9de69
Fix an off-by-one error in the documentation of nvim_buf_clear_highlight ( #7853 )
2018-01-15 21:45:10 +01:00
Justin M. Keyes
ad9c2d3cb9
doc
...
closes #7622
2017-12-10 17:13:22 +01:00
Justin M. Keyes
280943d9b9
doc: API (generated)
2017-11-06 04:51:34 +01:00
Justin M. Keyes
73fabf4f15
doc: nvim_buf_add_highlight(): zero-indexed lines
2017-11-06 01:56:04 +01:00
Björn Linse
dfe806ea8b
bufhl: support creating new groups
2017-10-19 11:59:32 +02:00
Björn Linse
8b375cf471
bufhl: fix move
2017-06-24 11:09:10 +02:00
Daniel Hahler
d0ff2000b2
vim-patch:8.0.0607 ( #6879 )
...
Problem: When creating a bufref, then using :bwipe and :new it might get
the same memory and bufref_valid() returns true.
Solution: Add br_fnum to check the buffer number didn't change.
45e5fd135d
2017-06-11 15:03:02 +02:00
Björn Linse
3f553ac0b9
lint: fix indentation of FUNC_ATTR lines
2017-06-03 08:17:22 +02:00
TJ DeVries
45626de63f
get_keymap API ( #6236 )
...
* Add api function get keymap
nvim_get_keymap(mode)
nvim_buf_get_keymap(buffer, mode)
2017-05-25 12:41:53 +02:00
ZyX
09f849b600
Merge branch 'master' into luaviml'/lua
2017-05-08 15:43:45 +03:00
Björn Linse
97126bfa02
api: deprecate obsolete nvim_buf_get_number function
2017-04-30 11:04:10 +02:00
Justin M. Keyes
086c354a0a
api: Do not translate error messages.
...
Also re-word some error messages:
- "Key does not exist: %s"
- "Invalid channel: %<PRIu64>"
- "Request array size must be 4 (request) or 3 (notification)"
- "String cannot contain newlines"
References #6150
2017-04-24 00:11:27 +02:00
Justin M. Keyes
3fbc660d57
api_set_error(): rename
2017-04-23 23:44:57 +02:00
Justin M. Keyes
2ed91f222f
api/internal: Remove set
field from Error type.
2017-04-23 23:44:32 +02:00
Justin M. Keyes
2a49163103
api_clear_error()
2017-04-23 23:44:32 +02:00
Sander Bosma
5c9860a0a2
api: Do not truncate errors <1 MB. #6237
...
Closes #5984
2017-04-23 23:44:29 +02:00
ZyX
c2f3e361c5
*: Add comment to all C files
2017-04-19 19:11:50 +03:00
ZyX
1d7fde39a6
api/buffer: Validate replacement array in a separate cycle
...
Should not really change anything, but code should be more efficient by using
more optimized libc functions (memchrsub is not libc, but it uses memchr) in
place of a cycle.
2017-04-12 00:31:01 +03:00
ZyX
043d8ff9f2
Merge branch 'master' into luaviml'/lua
2017-04-08 01:54:58 +03:00
ZyX
114eaa15f0
eval/typval,api/buffer: Fix review comments
2017-03-29 10:08:46 +03:00
ZyX
4bcee96347
*: Fix some Windows-specific warnings
...
Also fixed an error in path_fnamecmp().
2017-03-29 10:08:42 +03:00
ZyX
5c1b9a0d2a
api: Reserve more numbers for internal calls
...
Reasoning; currently INTERNAL_CALL is mostly used to determine whether it is
needed to deal with NL-used-as-NUL problem. This code is useful for nvim_… API
calls done from VimL, but not for API calls done from lua, yet lua needs to
supply something as channel_id.
2017-03-27 00:11:28 +03:00