aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/private/helpers.c
Commit message (Collapse)AuthorAge
...
* refactor: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* refactor(api): break out vim_to_object/object_to_vim to own fileBjörn Linse2021-10-29
|
* refactor(api): move extmark API to its own fileBjörn Linse2021-10-25
|
* feat(api): evaluate statusline string #16020Famiu Haque2021-10-18
| | | | | | Adds API function `nvim_eval_statusline` to allow evaluating a statusline string and obtaining information regarding it. Closes https://github.com/neovim/neovim/issues/15849
* refactor: reduce number of unique char casts (#15995)dundargoc2021-10-12
|
* refactor: format all C files under nvim/ #15977dundargoc2021-10-12
| | | | | | | | * refactor: format all C files under nvim * refactor: disable formatting for Vim-owned files: * src/nvim/indent_c.c * src/nvim/regexp.c * src/nvim/regexp_nfa.c * src/nvim/testdir/samples/memfile_test.c
* refactor(api): cleanup modify_keymap and parse_keymap_optsBjörn Linse2021-10-07
|
* feat(api): named marks set, get, delete #15346Javier Lopez2021-10-05
| | | | | | | | | | | | | | | | | | | | | | | Adds the following API functions. - nvim_buf_set_mark(buf, name, line, col) * Set marks in a buffer. - nvim_buf_del_mark(buf, name) * Delete a mark that belongs to buffer. - nvim_del_mark(name) * Delete a global mark. - nvim_get_mark(name) * Get a global mark. Tests: - Adds test to all the new api functions, and adds more for the existing nvim_buf_get_mark. * Tests include failure cases. Documentation: - Adds documentation for all the new functions, and improves the existing fucntion docs.
* Merge pull request #15901 from bfredl/apiorgBjörn Linse2021-10-04
|\ | | | | refactor(api): re-organanize public and private API functions
| * refactor(api): move window config related functions to own fileBjörn Linse2021-10-04
| |
* | refactor: remove redundant char casts #15888dundargoc2021-10-04
|/
* refactor(api): handle option dicts properlyBjörn Linse2021-10-03
| | | | | | | Do not copy a lot of lua strings (dict keys) to just strequal() them Just compare them directly to a dedicated hash function. feat(generators): HASHY McHASHFACE
* feat(decorations): support virtual lines (for now: only one block at a time)Björn Linse2021-09-26
|
* fix(api): fix crash after set_option_value_for() #15390gmntroll2021-09-25
| | | | | | | | | | | | | | | | | | | | | Problem: This crashes Nvim: tabedit call nvim_win_set_option(1000, 'statusline', 'status') split wincmd J wincmd j Solution: - Change `no_display` parameter value to be the same as in matching `restore_win_noblock` call. In case of different values `topframe` isn't restored to `curtab->tp_topframe`. - Call `restore_win_noblock` if `switch_win_noblock` returns `FAIL` (`switch_win` must always have matching `restore_win`) - Change `switch_win`/`restore_win` to `_noblock` versions to allow autocommands. fixes #14097 fixes #13577
* refactor: format #15702dundargoc2021-09-18
|
* feat(api): convert Blobs to API stringsSean Dewar2021-09-15
| | | | Note that these are not NUL-terminated; the API supports this.
* vim-patch:8.1.0735: cannot handle binary dataSean Dewar2021-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot handle binary data. Solution: Add the Blob type. (Yasuhiro Matsumoto, closes vim/vim#3638) https://github.com/vim/vim/commit/6e5ea8d2a995b32bbc5972edc4f827b959f2702f Nvim-specific Blob conversions are implemented in future commits. Refactor write_blob() to use a FileDescriptor, as f_writefile() was refactored to use one (does not apply to read_blob()). Use var_check_lock() in f_add() for Blobs from v8.1.0897. Add a modeline to test_blob.vim and fix some doc typos. Include if_perl.txt's VIM::Blob() documentation. Interestingly, this function already worked before this port, as it just returns a Blob string literal, not an actual Blob object. N/A patches for version.c: vim-patch:8.1.0741: viminfo with Blob is not tested Problem: Viminfo with Blob is not tested. Solution: Extend the viminfo test. Fix reading a blob. Fixed storing a special variable value. https://github.com/vim/vim/commit/8c8b8bb56c724cc1bfc3d8520eec33f2d399697c vim-patch:8.1.1022: may use NULL pointer when out of memory Problem: May use NULL pointer when out of memory. (Coverity) Solution: Check for blob_alloc() returning NULL. https://github.com/vim/vim/commit/e142a9467a7f6845a426d8db6efedf246d3c13ac
* perf(api): avoid spurious allocations when converting small objectsBjörn Linse2021-08-28
| | | | | | | Converter functions use a heap-allocated stack to handle complex nested objects. However, these are often called with simple, primitive values like integers or bools wrapped in an Object. Avoid the memory allocation in this case using kvec_withinit_t
* refactor(map): remove extra-allocating map_new/map_free functionsBjörn Linse2021-08-22
| | | | | | | | | | Note: the reason for removing them is not that there after this refactor is no use of them, but rather that having them available is an anti-pattern: they manange an _extra_ heap allocation which has nothing to do with the functionality of the map itself (khash manages the real buffers internally). In case there happens to be a reason to allocate the map structure itself later, this should be made explicit using xcalloc/xfree calls.
* refactor(api): remove unneccesary indirection around handlesBjörn Linse2021-08-22
| | | | | These things are just maps to pointers, no need to perform a huge song and dance around it.
* refactor(map): get rid of spurious subsystem_init() functions due to mapsBjörn Linse2021-08-22
|
* refactor: PVS/V501: removed duplicate sub-expression 'chunk.size > 2'Dundar Göc2021-07-30
|
* feat(decorations): deprecate nvim_buf_set_virtual_textBjörn Linse2021-07-29
| | | | Full virt_text functionality is provided by nvim_buf_set_extmark
* refactor(decorations): merge the two different code paths for virt_textBjörn Linse2021-07-29
| | | | | | test(bufhl): CHANGE of tested behaviour (inb4 a proper priority mechanism) test(decoration): change of test; previous behavior was buggy (ghost buffer text)
* feat(decorations): allow more than one stacked highlight in a virt_textBjörn Linse2021-07-29
|
* clang/'Dead initialization': don't assign unused value to variable "string" ↵dundargoc2021-07-07
| | | | #15015
* feat(float): add rounded borders presetChristian Clason2021-06-14
| | | | | | | | Add `borders = "rounded"` preset for `nvim_open_win`, equivalent to border = {"╭", "─", "╮", "│", "╯", "─", "╰", "│"} Also add undocumented "solid" preset to docs.
* api(parse_float_config): use api_object_to_bool()Sean Dewar2021-06-01
|
* api(nvim_open_win): add "noautocmd" optionSean Dewar2021-06-01
| | | | | | This option, when set, stops nvim_open_win() from potentially firing buffer-related autocmd events (BufEnter, BufLeave and BufWinEnter in the case of nvim_open_win()).
* lua: use proper conversion of vim.g valuesBjörn Linse2021-05-19
|
* floats: z-indexBjörn Linse2021-05-15
|
* float: add "solid" border style (#14310)Marco Hinz2021-04-12
| | | | | | It looks solid with the default `FloatBorder` group. If you set the bgcolor of FloatBorder to the same color as for FloatNormal, you effectively get an "1-cell padding".
* Border: allow to enable/disable specific border edgesBjörn Linse2021-04-04
|
* luaref: free decoration providersBjörn Linse2021-04-03
|
* floats: add borders (MS-DOS MODE)Björn Linse2021-03-22
|
* wheel: move non-window code out of window.cBjörn Linse2021-03-22
|
* api: nvim_echonotomo2021-01-20
|
* fix: check for valid buffer handles in modify_keymap (#13543)Thomas Vigouroux2021-01-03
| | | | Fixes #13541 Neovim would crash when trying to map a key on non existant buffer
* decoration: split out "decoration" from "extmark" moduleBjörn Linse2020-11-07
| | | | | Decorations will only grow more complex. move the to a separate file, so that extmark.c remains about extmarks.
* api: add API for themesBjörn Linse2020-11-01
| | | | | | | | | | co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
* fixup: fixup: fixup: fixup:TJ DeVries2020-10-22
|
* fixup: some small nit picksTJ DeVries2020-10-22
|
* fixup: bfredl commentsTJ DeVries2020-10-22
|
* api: multiple decoration providers at onceBjörn Linse2020-10-10
|
* luahl: global the luahlBjörn Linse2020-09-13
|
* luahlBjörn Linse2020-09-13
|
* lua: cleanup naming conventions of executor functionsBjörn Linse2020-09-10
|
* vim-patch:8.2.0111: VAR_SPECIAL is also used for booleansBilly Su2020-06-06
| | | | | | Problem: VAR_SPECIAL is also used for booleans. Solution: Add VAR_BOOL for better type checking. https://github.com/vim/vim/commit/9b4a15d5dba354d2e1e02871470bad103f34769a
* PVS/V618: fix printf-style args #11888Justin M. Keyes2020-02-22
| | | | We intentionally do not translate API errors. ref: https://github.com/neovim/neovim/issues/6150
* shed biking: it's always extmarks, never marks extendedBjörn Linse2020-01-20
|