aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer_updates.c
Commit message (Collapse)AuthorAge
* refactor: iwyu #31637Justin M. Keyes2024-12-23
| | | Result of `make iwyu` (after some "fixups").
* refactor(lua): use Arena when converting from lua stack to API argsbfredl2024-02-13
| | | | | | | | | | | | and for return value of nlua_exec/nlua_call_ref, as this uses the same family of functions. NB: the handling of luaref:s is a bit of a mess. add api_luarefs_free_XX functions as a stop-gap as refactoring luarefs is a can of worms for another PR:s. as a minor feature/bug-fix, nvim_buf_call and nvim_win_call now preserves arbitrary return values.
* refactor(api): use an arena for nvim_buf_get_lines and buffer updatesbfredl2024-02-11
| | | | | Refactor some earlier "temporary Array" code in buffer_updates.c to use the modern style of MAXSIZE_TEMP_ARRAY and ADD_C
* refactor(IWYU): fix headersdundargoc2024-01-11
| | | | | | Remove `export` pramgas from defs headers as it causes IWYU to believe that the definitions from the defs headers comes from main header, which is not what we really want.
* refactor: run IWYU on entire repodundargoc2023-12-21
| | | | Reference: https://github.com/neovim/neovim/issues/6371.
* build: don't define FUNC_ATTR_* as empty in headers (#26317)zeertzjq2023-11-30
| | | | | | FUNC_ATTR_* should only be used in .c files with generated headers. Defining FUNC_ATTR_* as empty in headers causes misuses of them to be silently ignored. Instead don't define them by default, and only define them as empty after a .c file has included its generated header.
* refactor: move some constants out of vim_defs.h (#26298)zeertzjq2023-11-29
|
* refactor: fix headers with IWYUdundargoc2023-11-28
|
* refactor: rename types.h to types_defs.hdundargoc2023-11-27
|
* build(IWYU): fix includes for undo_defs.hdundargoc2023-11-27
|
* build(IWYU): fix includes for func_attr.hdundargoc2023-11-27
|
* refactor: move Arena and ArenaMem to memory_defs.h (#26240)zeertzjq2023-11-27
|
* build: remove PVSdundargoc2023-11-12
| | | | | | | We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable.
* fix(buffer_updates): save and restore current window cursor (#16732)zeertzjq2023-03-09
| | | | | | | | When a buffer update callback is called, textlock is active so buffer text cannot be changed, but cursor can still be moved. This can cause problems when the buffer update is in the middle of an operator, like the one mentioned in #16729. The solution is to save cursor position and restore it afterwards, like how cursor is saved and restored when evaluating an <expr> mapping.
* refactor(api): do not allocate temporaries for internal eventsbfredl2023-01-03
|
* fix(treesitter): properly restore `'syntax'` (#21358)Lewis Russell2022-12-14
|
* fix(api): nvim_buf_get_text regression (#21071)Lewis Russell2022-11-15
|
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | 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.
* feat(lua-api): avoid unnecessary allocations (#19877)Lewis Russell2022-11-14
| | | | Lua makes (or reuses) an internal copy of strings, so we can safely push buf pointers onto the stack.
* feat(lua): vim.ui_attach to get ui events from luabfredl2022-08-31
| | | | Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
* refactor(object): get rid of redundant FIXED_TEMP_ARRAYbfredl2022-07-20
| | | | | use the MAXSIZE_TEMP_ARRAY + ADD_C pattern instead, as exemplified by the changes in this commit.
* feat: add preview functionality to user commandsFamiu Haque2022-05-31
| | | | Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)zeertzjq2022-05-10
| | | | | | | | Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first. https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 A hunk from the patch depends on patch 8.2.4861, which hasn't been ported yet, but that should be easy to notice.
* fix(extmarks): revert to int for extmark rowzeertzjq2022-05-07
|
* refactor: enable -Wconversion warning for edit.cDundar Goc2022-05-06
| | | | Work on https://github.com/neovim/neovim/issues/567
* refactor: add pure attribute to pure functionsDundar Göc2022-04-13
| | | | | This will allow compilers that support the pure attribute to make further optimizations to functions.
* refactor: format with uncrustify #15722dundargoc2021-09-19
|
* fix: fix incorrect call sites of xcallocGregory Anders2021-07-24
| | | | The number of elements comes first and the size of each element second.
* chore: use codespell to spell check #15016dundargoc2021-07-07
|
* luaref: free all references in buffer_updatesBjörn Linse2021-04-03
|
* buffer updates: add on_reload callback and handle it in treesitter parserBjörn Linse2021-02-10
|
* feat(buffer_updates): allow ignoring when previewingThomas Vigouroux2020-12-15
| | | | | Also adds a test that we actually subscribe to buffer events when in CMDPREVIEW.
* Merge pull request #12889 from vigoux/bytetrack-open-lineBjörn Linse2020-09-11
|\ | | | | Fix invalid events with `o` `<CR>` and `autoindent`
| * fix(bufupdates): avoid sending empty updatesThomas Vigouroux2020-09-11
| |
* | lua: cleanup naming conventions of executor functionsBjörn Linse2020-09-10
|/
* fix lintsThomas Vigouroux2020-09-09
|
* api/buffer: add "on_bytes" callback to nvim_buf_attachBjörn Linse2020-09-09
| | | | | | This implements byte-resolution updates of buffer changes. Note: there is no promise that the buffer state is valid inside the callback!
* treesitter: cleanup some luahl stuffBjörn Linse2020-02-10
|
* extmarks/bufhl: reimplement using new marktree data structureBjörn Linse2020-01-16
| | | | | | | | | | | | | | | | | | | | Add new "splice" interface for tracking buffer changes at the byte level. This will later be reused for byte-resolution buffer updates. (Implementation has been started, but using undocumented "_on_bytes" option now as interface hasn't been finalized). Use this interface to improve many edge cases of extmark adjustment. Changed tests indicate previously incorrect behavior. Adding tests for more edge cases will be follow-up work (overlaps on_bytes tests) Don't consider creation/deletion of marks an undoable event by itself. This behavior was never documented, and imposes complexity for little gain. Add nvim__buf_add_decoration temporary API for direct access to the new implementation. This should be refactored into a proper API for decorations, probably involving a huge dict. fixes #11598
* tree-sitter: implement query functionality and highlighting prototype ↵Björn Linse2019-12-22
| | | | [skip.lint]
* lua: support getting UTF-32 and UTF-16 sizes of replaced textBjörn Linse2019-08-06
|
* lua: add {old_byte_size} to on_lines buffer change eventBjörn Linse2019-08-06
|
* api/lua: add on_detach to nvim_buf_attachBjörn Linse2019-06-15
|
* api: allow nvim_buf_attach from lua using callbacksBjörn Linse2019-06-04
|
* add func_attr_printf in :MichaHoffmann2018-09-24
| | | | | | | | | | | | | | | | | | | | | | log.c message.c strings.c fixed some printf warnings in: src/nvim/undo.c src/nvim/eval.c src/nvim/eval/encode.c src/nvim/eval/typval.c src/nvim/ex_getln.c src/nvim/fileio.c src/nvim/lua/executor.c src/nvim/main.c src/nvim/regexp_nfa.c src/nvim/shada.c src/nvim/spellfile.c src/nvim/tui/terminfo.c src/nvim/garray.h
* *: Replace b_changedtick with new always-inline functionsZyX2018-06-22
| | | Ref #8474
* refactor: buf_collect_lines (#8509)Justin M. Keyes2018-06-09
| | | Move redundant common logic into a function.
* Merge #7917 'API: buffer updates'Justin M. Keyes2018-06-08
|
* Rename some more, fixe borked renamingKillTheMule2018-05-23
|