mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
extmarks/bufhl: reimplement using new marktree data structure
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
This commit is contained in:
@@ -3,10 +3,11 @@
|
||||
|
||||
#include "nvim/vim.h"
|
||||
|
||||
/* flags for set_indent() */
|
||||
#define SIN_CHANGED 1 /* call changed_bytes() when line changed */
|
||||
#define SIN_INSERT 2 /* insert indent before existing text */
|
||||
#define SIN_UNDO 4 /* save line for undo before changing it */
|
||||
// flags for set_indent()
|
||||
#define SIN_CHANGED 1 // call changed_bytes() when line changed
|
||||
#define SIN_INSERT 2 // insert indent before existing text
|
||||
#define SIN_UNDO 4 // save line for undo before changing it
|
||||
#define SIN_NOMARK 8 // don't adjust extmarks
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "indent.h.generated.h"
|
||||
|
Reference in New Issue
Block a user