aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/extmark.c
Commit message (Collapse)AuthorAge
* refactor: convert function comments to doxygen format (#17710)dundargoc2022-03-24
|
* refactor(uncrustify): format all c filesDundar Göc2022-03-10
|
* refactor(signcol): smarter invalidation (#17533)Lewis Russell2022-03-06
| | | | | | | | | | Previously b_signcols was invalidated whenever a sign was added/removed or when a buffer line was added/removed. This change introduces a sentinel linenr_T into the buffer state which is a line number used to determine the signcolumn. With this information, we can invalidate the signcolumn less often. Now the signcolumn is only invalidated when a sign or line at the sentinel line number is removed.
* feat(decorations): support signsLewis Russell2022-03-05
| | | | | | | | | | | | Add the following options to extmarks: - sign_text - sign_hl_group - number_hl_group - line_hl_group - cursorline_hl_group Note: ranges are unsupported and decorations are only applied to start_row
* feat(api): expose extmark right_gravity and end_right_gravitynotomo2022-01-24
|
* refactor(extmarks): use a more efficient representationBjörn Linse2022-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | marktree.c was originally constructed as a "generic" datatype, to make the prototyping of its internal logic as simple as possible and also as the usecases for various kinds of extmarks/decorations was not yet decided. As a consequence of this, various extra indirections and allocations was needed to use marktree to implement extmarks (ns/id pairs) and decorations of different kinds (some which is just a single highlight id, other an allocated list of virtual text/lines) This change removes a lot of indirection, by making Marktree specialized for the usecase. In particular, the namespace id and mark id is stored directly, instead of the 64-bit global id particular to the Marktree struct. This removes the two maps needed to convert between global and per-ns ids. Also, "small" decorations are stored inline, i.e. those who doesn't refer to external heap memory anyway. That is highlights (with priority+flags) are stored inline, while virtual text, which anyway occurs a lot of heap allocations, do not. (previously a hack was used to elide heap allocations for highlights with standard prio+flags) TODO(bfredl): the functionaltest-lua CI version of gcc is having severe issues with uint16_t bitfields, so splitting up compound assignments and redundant casts are needed. Clean this up once we switch to a working compiler version.
* fix(extmark): fix missing virt_lines when using id param of set_extmarkBjörn Linse2021-11-01
|
* 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): move extmark API to its own fileBjörn Linse2021-10-25
|
* feat(decorations): support more than one virt_lines blockBjörn Linse2021-10-23
|
* refactor(decorations): mark decorations directly on the marktreeBjörn Linse2021-10-23
| | | | | | | | | | | | | This allows to more quickly skip though regions which has non-decorative marks when redrawing. This might seem like a gratuitous micro-optimization in isolation. But! Soon decorations are gonna crop into other hot inner-loop paths, including the plines.c code for calculating the horizontal and vertical space of text. Then we want to quickly skip over regions with "only" overlaying decorations (which do not affect text size)
* refactor: remove redundant castsDundar Göc2021-10-07
|
* feat(decorations): support virtual lines (for now: only one block at a time)Björn Linse2021-09-26
|
* refactor: format with uncrustify #15726dundargoc2021-09-20
|
* 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(extmark): remove pointer indirection for extmark use of mapsBjörn Linse2021-08-22
|
* fix(decorations): crash when :bdelete (extmark_free_all) after clear_namespaceBjörn Linse2021-07-29
| | | | fixes #15212
* chore: use codespell to spell check #15016dundargoc2021-07-07
|
* flush curbuf->deleted_bytes2 after calling do_movechentau2021-04-14
|
* change gravity to be a boolean flag, and add corresponding flag for end ↵chentau2021-01-05
| | | | position of extmark
* allow for extmark gravity to be set through apichentau2021-01-03
|
* api: set_text: rebase, update to new api, and add more testsTony Chen2021-01-01
|
* gcc/analyzer: fix false positives for NULL (#13248)Jan Edmund Lazo2020-11-08
| | | Close https://github.com/neovim/neovim/issues/13158
* 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.
* extmark: fix decoration ploblems with extmarkerw72020-10-02
| | | | | | 54ce101 changed the way undo entries are created when adding decorations. This creates all sorts of problems.This change fixes the problem by reverting to the previous behavior.
* buf_updates: fix updates for empty buffers (#12926)Thomas Vigouroux2020-09-17
| | | On empty buffers, when editing the first line, the line is buffered, causing offset to be < 0. While the buffer is not actually empty, the buffered line has not been flushed (and should not be) yet, so the call is valid but an edge case.
* luahl: temporary workaround for virt_text ownership ambiguityBjörn Linse2020-09-13
|
* luahl: global the luahlBjörn Linse2020-09-13
|
* 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!
* extmark: use resonable names in extmark_spliceBjörn Linse2020-09-09
|
* extmark: separate extmark_splice_cols for column-only changeBjörn Linse2020-09-09
| | | | as the byte logic will be the same for all of these
* decor: sketch new decorations APIBjörn Linse2020-09-03
| | | | | | | | return decorations back lol no nvim_buf_get_virtual_text share decorations that are hl only to avoid alloc avalanche
* extmark: refiy "Decoration" abstractionBjörn Linse2020-09-03
| | | | one very important thought
* extmark: introduce extmark_splice_colsMatthieu Coudron2020-04-24
| | | | to ease up notations.
* pvs/v595: check if extmark not NULLJan Edmund Lazo2020-04-13
|
* 'clang/Logic error': zero-init MarkTreeIter varsJan Edmund Lazo2020-03-01
|
* treesitter: cleanup some luahl stuffBjörn Linse2020-02-10
|
* treesitter: use internal "decorations" bufferBjörn Linse2020-02-10
|
* extmarks: fix crash due to invalid column values in inccommand previewBjörn Linse2020-02-02
| | | | | This used to use -1 and MAXCOL values. Make sure in range values are used.
* shed biking: it's always extmarks, never marks extendedBjörn Linse2020-01-20