aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lib
Commit message (Collapse)AuthorAge
* Change QUEUE_FOREACH macro to use while instead of forerw72021-03-30
|
* nsmarks: initial committimeyyy2019-11-11
|
* kvec.h: kv_destroy: reinitialize after freeJustin M. Keyes2019-05-25
|
* refactor: introduce XFREE_CLEAR()Justin M. Keyes2019-05-25
| | | | | | | | | | | | | | | Unfortunately we cannot indiscriminately replace xfree() with XFREE_CLEAR(), because comparing pointers after freeing them is a common pattern. Example in `tv_list_remove_items()`: xfree(li); if (li == item2) { break; } Instead we can do it selectively/explicitly. ref #1375
* kbtree.h: assert valid range #10022Justin M. Keyes2019-05-18
| | | ref #10012
* kbtree: pointer UB and unitialized value fixesBjörn Linse2019-05-18
| | | | | | | - don't underflow itr->p pointer (C standard only allows one past the end, not one before the beginning) - make sure itr->p->i is always initialized (even when not used) - don't rely on `NULL < &object` (likely UB)
* os/env: use libuv v1.12 getenv/setenv APIJustin M. Keyes2019-02-27
| | | | | | | | | | | - Minimum required libuv is now v1.12 - Because `uv_os_getenv` requires allocating, we must manage a map (`envmap` in `env.c`) to maintain the old behavior of `os_getenv` . - free() map-items after removal. khash.h does not make copies of anything, so even its keys must be memory-managed by the caller. closes #8398 closes #9267
* ui: use line-based rather than char-based updates in screen.cBjörn Linse2018-07-21
| | | | | | | | | | | | | Add ext_newgrid and ext_hlstate extensions. These use predefined highlights and line-segment based updates, for efficiency and simplicity.. The ext_hlstate extension in addition allows semantic identification of builtin and syntax highlights. Reimplement the old char-based updates in the remote UI layer, for compatibility. For the moment, this is still the default. The bulitin TUI uses the new line-based protocol. cmdline uses curwin cursor position when ext_cmdline is active.
* kvec: Silence PVS/V512: it is not needed to fill the whole arrayZyX2018-04-15
|
* build/msvc: Fix missing restrict keywordb-r-o-c-k2018-02-28
| | | | MSVC has the __restrict keyword and a marco is defined for it in `win_defs.h`.
* build/gcc: disable -Warray-bounds entirely #7923Justin M. Keyes2018-02-19
| | | | | | | | | | | | | | | We need to disable -Warray-bounds locally for kbtree.h, but we can't because _Pragma("GCC diagnostic pop") is broken in GCC 5.x+. So this commit disables -Warray-bounds entirely (for GCC only). GCC bug: "_Pragma diagnostic 'ignored' in macro with strict-overflow not suppressing warning fully with -Werror" https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66099 ref https://github.com/neovim/neovim/pull/7083#issuecomment-326323599 closes #7921
* klee: Start preparing for klee testsZyX2017-10-08
| | | | | | | | | | | First stage: something compiling without klee, but with a buch of dirty hacks - done. Second stage: something running under klee, able to emit useful results, but still using dirty hacks - done. Third stage: make CMake care about clang argumnets - not done, may be omitted if proves to be too hard. Not that klee can be run on CI in any case.
* kvec: Add kv_Z which is like kv_A, but zero is the last valueZyX2017-10-08
|
* kvec: Add kv_drop() which is to be used like `(void)kv_pop(kvec)`ZyX2017-09-29
|
* bufhl: fix moveBjörn Linse2017-06-24
|
* kbtree: make warning free and delete deprecated macrosBjörn Linse2017-06-24
|
* kbtree: eliminate unneccesary heap allocationBjörn Linse2017-06-24
|
* kbtree: use proper structsBjörn Linse2017-06-24
|
* kbtree: allow iterators to start at arbitrary positionBjörn Linse2017-06-24
|
* kbtree.htimeyyy2017-06-24
|
* tui: "backpressure": Drop messages to avoid flooding.Justin M. Keyes2016-12-09
| | | | | | | | | Closes #1234 multiqueue: - Implement multiqueue_size() - Rename MultiQueueItem.parent to MultiQueueItem.parent_item, to avoid confusion with MultiQueue.parent.
* kvec: Do not bother with making capacity a power of 2ZyX2016-06-24
| | | This avoids gcc warnings about undefined behaviour.
* *: Also fix the adjacent errorsZyX2016-06-11
|
* *: Fix errors from new linter checksZyX2016-06-11
|
* kvec,typval_encode: Add new vector: the one with preallocated arrayZyX2016-05-30
|
* Merge pull request #4843 from ZyX-I/refactor-queueJustin M. Keyes2016-05-30
|\ | | | | lib/queue: Refactor queue.h
| * lib/queue: Actually remove all _QUEUE macrosZyX2016-05-30
| |
| * lib/queue: Refactor queue.hZyX2016-05-30
| | | | | | | | | | | | | | | | | | | | | | | | Changes: 1. Linter finds no errors now. 2. Most of macros changed to `static inline … FUNC_ATTR_ALWAYS_INLINE` functions (that was the purpose: they are easier to debug). 3. Queue is now not a pair of void* pointers, but a struct with two QUEUE pointers, next and prev. This should not affect anything, except that _QUEUE private macros can really be avoided without reducing readability and they do not need any casts.
* | lib/kvec: Fix remaining linter errorsZyX2016-05-30
| |
* | lib/kvec: Make code cleanerZyX2016-05-30
| |
* | lib/kvec: Do not use kv_init unless neededZyX2016-05-30
| |
* | lib/kvec: Remove useless type argument from kv_push macrosZyX2016-05-30
|/
* eval: Add jsondecode() functionZyX2016-04-18
|
* bufhl: fix unittests and lintBjörn Linse2016-02-23
| | | | msgpack_rpc_dispatch doesn't exist anymore
* bufhl: new mechanism for plugins to add highlights to a bufferBjörn Linse2016-02-23
|
* *: Fix lint errors found in new code in previously ignored filesZyX2015-10-08
|
* shada: Fix linter errorsZyX2015-10-08
|
* shada: Allocate all hashes on stackZyX2015-10-08
|
* shada: Add support for merging everything like described in the docZyX2015-10-08
|
* shada: Add support for dumping/restoring bufs changes and win jumpsZyX2015-10-08
|
* shada: Initial support for merging historyZyX2015-10-08
| | | | Currently only merges history when reading ShaDa file. No tests yet.
* lib: Include libuv circularly linked listThiago de Arruda2015-08-13
| | | | | This is simpler and more efficient than klist.h for implementing queues that support insertion or removal at arbitrary positions.
* job: Replace by a better process abstraction layerThiago de Arruda2015-07-17
| | | | | | | | | | | | | - New libuv/pty process abstraction with simplified API and no globals. - Remove nvim/os/job*. Jobs are now a concept that apply only to programs spawned by vimscript job* functions. - Refactor shell.c/channel.c to use the new module, which brings a number of advantages: - Simplified API, less code - No slots in the user job table are used - Not possible to acidentally receive data from vimscript - Implement job table in eval.c, which is now a hash table with unilimited job slots and unique job ids.
* klib: Improve klist.hThiago de Arruda2015-07-01
| | | | | | | | | | | - Add `kl_shift_at` macro and backing function. This can be used to shift elements at arbitrary positions. `kl_shift` is now defined on top of the new macro. - Change shift/push API, now `kl_push` accepts an object as parameter and `kl_shift` returns the object instead of a status. An assertion against shifting at the end of a list(or empty lists) was added. - Add `kl_iter` and `kl_iter_at` macros. `kl_iter_at` is for starting the iteration at arbitrary positions.
* 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.
* eval: Defer execution of JobActivity autocommandsThiago de Arruda2014-10-21
| | | | | | JobActivity autocommands run vimscript and must be executed on Nvim main loop. Since the previous commit removed automatic calls to `event_push` on RStream/Job callbacks, this adds it back, but in eval.c where job control is implemented.
* memory.h: don't include vim.h in header filesNicolas Hillegeer2014-07-16
| | | | | Also include stdint.h in khash.h. It was transitively included by vim.h via memory.h before. khash.h accidentally relied on that.
* Remove stdbool.h from files which don't need 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_bool has_include
* api: Enable usage of Arrays and Dictionaries as [k]vectorsThiago de Arruda2014-06-18
| | | | | - Rename a/n/m to items/size/capactity in kvec.h - Add capactity field to Arrays/Dictionaries
* Add REAL_FATTR_ macros to func_attr.h, use them in lib/k*ZyX2014-06-02
| | | | Otherwise FUNC_ATTR_* macros may appear empty