mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +00:00

Problem: Text properties crossing lines not handled correctly.
Solution: When saving for undo include an extra line when needed and do not
adjust properties when undoing. (Axel Forsman, closes vim/vim#5875)
ML_DEL_UNDO, ML_APPEND_UNDO are no-opt because textprop feature is N/A.
a9d4b84d97
Co-authored-by: Bram Moolenaar <Bram@vim.org>
26 lines
763 B
C
26 lines
763 B
C
#pragma once
|
|
|
|
#include "nvim/ascii_defs.h"
|
|
#include "nvim/eval/typval_defs.h" // IWYU pragma: keep
|
|
#include "nvim/memline_defs.h" // IWYU pragma: keep
|
|
#include "nvim/pos_defs.h" // IWYU pragma: keep
|
|
#include "nvim/types_defs.h" // IWYU pragma: keep
|
|
|
|
#include "memline.h.generated.h"
|
|
|
|
/// LINEEMPTY() - return true if the line is empty
|
|
#define LINEEMPTY(p) (*ml_get(p) == NUL)
|
|
|
|
// Values for the flags argument of ml_delete_flags().
|
|
enum {
|
|
ML_DEL_MESSAGE = 1, // may give a "No lines in buffer" message
|
|
// ML_DEL_UNDO = 2, // called from undo
|
|
};
|
|
|
|
// Values for the flags argument of ml_append_int().
|
|
enum {
|
|
ML_APPEND_NEW = 1, // starting to edit a new file
|
|
ML_APPEND_MARK = 2, // mark the new line
|
|
// ML_APPEND_UNDO = 4, // called from undo
|
|
};
|