aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/buffer.c
Commit message (Collapse)AuthorAge
...
* api: Allow blacklist functions that shouldn't be accesible from evalBjörn Linse2016-08-31
| | | | Blacklist deprecated functions and functions depending on channel_id
* api: When calling get/set_lines from vimL, don't convert between "\n" and "\0".Björn Linse2016-08-31
|
* api: handle null string in buffer_add_highlightBjörn Linse2016-08-17
|
* api: Add warnings about the returned value to \*del_var functionsZyX2016-04-18
|
* api/documentation: Add a warning that nil may mean v:nullZyX2016-04-18
|
* api: Replace set_var(name, NIL) with del_var(name)ZyX2016-04-18
|
* api/buffer: deprecate old line and line slice functionsBjörn Linse2016-04-01
|
* api/buffer: introduce buffer_[gs]et_lines with new indexing convention.Björn Linse2016-04-01
| | | | | | | -1 is index past the end, and -2 is the index of the last element. This eliminates the need for include_start/include_end. Allow the handling of out-of-bounds to be configurable.
* bufhl: new mechanism for plugins to add highlights to a bufferBjörn Linse2016-02-23
|
* Remove unnecessary includes for errno.hRui Abreu Ferreira2015-11-25
|
* Fix append() without line argumentEnrico Ghirardi2015-09-20
| | | | | We want to switch include_start/end when the index is positive or negative.
* api: buffer_insert: fix bounds. #3315Enrico Ghirardi2015-09-09
| | | | | | | | buffer_insert calls buffer_set_line_slice excluding the start line number and including the end, but it should be the opposite. Closes https://github.com/neovim/neovim/issues/3212 Closes https://github.com/neovim/python-client/issues/103
* msgpack: Replace FUNC_ATTR_DEFERRED by FUNC_ATTR_ASYNCThiago de Arruda2015-08-13
| | | | | | | | | | | API functions exposed via msgpack-rpc now fall into two categories: - async functions, which are executed as soon as the request is parsed - sync functions, which are invoked in nvim main loop when processing the `K_EVENT special key Only a few functions which can be safely executed in any context are marked as async.
* api: return error when starting a slice out of bounds.Nick Hynes2015-07-11
|
* api: return empty array when slicing out of bounds.Nick Hynes2015-07-11
|
* memory: Add `free` wrapper and refactor project to use itThiago de Arruda2015-04-13
| | | | | | We already use wrappers for allocation, the new `xfree` function is the equivalent for deallocation and provides a way to fully replace the malloc implementation used by Neovim.
* api: Move switch_to_win_for_buf/restore_win_for_buf to api helpersThiago de Arruda2015-03-25
|
* illumos requires the use of limits.h for things like INT_MAX #2049Mike Zeller2015-02-26
|
* api/*.c: Comment cleanupMichael Reed2015-01-26
| | | | | | - @justinmk: Clarify comments - Match verbiage used in other api/*.c files - Fix a few typos/missing words
* api: Handle NULs and newlines in buffer_*_line.Scott Prager2014-12-06
|
* api: Add FUNC_ATTR_DEFERRED attribute to a number of functionsThiago de Arruda2014-10-21
| | | | | Any function that can directly mutate the screen or execute vimscript had the attribute applied.
* Use line-specific method names where possible to remove ambiguity and ↵Paul Jolly2014-10-01
| | | | possibility of future clashes
* api/msgpack-rpc: Improve error infrastructureThiago de Arruda2014-09-18
| | | | | | | | | | | | | | | | - Add error type information to `Error` - Rename `set_api_error` to `api_set_error` for consistency with other api_* functions/macros. - Refactor the api_set_error macro to accept formatted strings and error types - Improve error messages - Wrap error messages with gettext macro - Refactor msgpack-rpc serialization to transform Error instances into [type, message] arrays - Add error type information to API metadata - Normalize nvim->client and client->nvim error handling(change channel_send_call to accept an Error pointer instead of the `errored` boolean pointer) - Use macro to initialize Error structures
* api metadata: Allow typed container information in api functionsThiago de Arruda2014-09-12
| | | | | | | | Adapt gendeclarations.lua/msgpack-gen.lua to allow the `ArrayOf(...)` and `DictionaryOf(...)` types in function headers. These are simple macros that expand to Array and Dictionary respectively, but the information is kept in the metadata object, which is useful for building clients in statically typed languages.
* api/msgpack-rpc: Remove Position type, using arrays instead.Thiago de Arruda2014-09-12
|
* api/msgpack-rpc: Remove specialized array typesThiago de Arruda2014-09-12
| | | | | | | | | | | | | | | | | Specialized array types(BufferArray, WindowArray, etc) were added to the API for two main reasons: - msgpack used to lack a way of serializing appliaction-specific types and there was no obvious way of making an API function accept/return arrays of custom objects such as buffers(which are represented as integers, so clients didn't have a way to distinguish from normal numbers) - Let clients in statically-typed languages that support generics have a better typed API With msgpack 2.0 EXT type the first item is no longer a factor and this commit starts by removing the specialized array types. The second item will be addressed in the future by making the API metadata return extra useful information for statically-typed languages.
* Return bool from find_win_for_buf #1023Wayne Rowcliffe2014-08-07
|
* api: make buffer_{get,set}_slice automatically assume `include_end`Thiago de Arruda2014-07-17
| | | | | This is for compatibility with python-vim interface: When passing an end index with a value higher than the last index, assume the `include_end` flag
* Include stdbool.h in some files which use itPavel Platto2014-07-11
| | | | | | | Done by manual inspection of the output of this script: grep -r -l -w "bool\|true\|false" * | grep 'c$\|h$' > has_bool grep -r -l "stdbool.h" * | grep 'c$\|h$' > has_include grep -F -x -v -f has_include has_bool
* move errno.h include out of vim.hBrandon Coleman2014-07-09
|
* api: Rename find_{buffer,window,tabpage}Thiago de Arruda2014-06-18
| | | | | They were renamed to find_{buffer,window,tabpage}_by_handle to avoid conflicts with existing functions of the same name.
* api: unify string conversions, simplify interopNicolas Hillegeer2014-06-08
| | | | | | | | | | | | | - The data member of String's can now be passed directly to functions expecting C strings, as we now guarantee that they are NUL-terminated. This obviates the need to use xstrndup and free, simplifying code and enhancing performance. - Use xmemdupz instead of xstrndup for converting String's into C strings. It's faster because it doesn't calculate strlen(string.data) (which is unnecesary as that information is already provided in string.size anyway). - Use cstr_to_string to convert from C strings to String, it is both shorter and faster than the usual strlen/xstrndup combo, which calls strlen twice. cstr_to_string internally calls strlen and then xmemdupz.
* Add automatic generation of headersZyX2014-06-02
| | | | | | | | | | | | | | | | | - The 'stripdecls.py' script replaces declarations in all headers by includes to generated headers. `ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'` was used for this. - Add and integrate gendeclarations.lua into the build system to generate the required includes. - Add -Wno-unused-function - Made a bunch of old-style definitions ANSI This adds a requirement: all type and structure definitions must be present before INCLUDE_GENERATED_DECLARATIONS-protected include. Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is the only exception.
* Move documentation from function declarations to definitionsZyX2014-06-02
| | | | Uses a perl script to move it (scripts/movedocs.pl)
* Initialize Object, PositionJustin M. Keyes2014-05-31
| | | | | fix #778 thanks @genisaguilar
* Extract cursor.h from misc{1,2}.h and memline.hHinidu2014-05-28
|
* API: Bugfix: Remove possible double-free in buffer_get_lineThiago de Arruda2014-05-28
|
* API: Bugfix: Remove memory leak from buffer_get_lineThiago de Arruda2014-05-26
|
* API: Bugfix: Remove memory leak from buffer_set_nameThiago de Arruda2014-05-26
|
* API: Bugfix: Remove memory leak from buffer_set_sliceThiago de Arruda2014-05-26
|
* API: Refactor: Duplicate/free string arguments coming from msgpackThiago de Arruda2014-05-26
| | | | | | | | | When receiving strings *from* msgpack, we don't need to duplicate/free since the data only lives in the msgpack parse buffer until the end of the call. But in order to reuse `msgpack_rpc_free_object` when sending event data(which is sent *to* msgpack), Strings must be freed, which means they must also be allocated separately.
* API: Refactor: Fix buffer_get_markThiago de Arruda2014-05-23
|
* API: Refactor: Use macro for initializing all arraysThiago de Arruda2014-05-23
|
* API: Refactor: Implement buffer_get_numberThiago de Arruda2014-05-23
|
* API: Refactor: Move non-public files to private subdirectoryThiago de Arruda2014-05-23
|
* API: Bugfix: Remove wrong increment statement from buffer_set_sliceThiago de Arruda2014-05-23
|
* API: Bugfix: Check that error isn't set in buffer_get_lineThiago de Arruda2014-05-23
|
* API: Cleanup: Remove unnecessary NULL checksThiago de Arruda2014-05-23
|
* api/helpers: implement C string to String helperNicolas Hillegeer2014-05-18
| | | | Use it in buffers.c
* Replace unnecessary `xcalloc` call by `xmalloc`Thiago de Arruda2014-05-17
|