0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0844: text properties crossing lines not handled correctly

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 #5875)
This commit is contained in:
Bram Moolenaar
2020-05-30 14:46:52 +02:00
parent 0016fd2e29
commit a9d4b84d97
5 changed files with 129 additions and 47 deletions

View File

@@ -742,6 +742,15 @@ typedef struct memline
#endif
} memline_T;
// Values for the flags argument of ml_delete_flags().
#define ML_DEL_MESSAGE 1 // may give a "No lines in buffer" message
#define ML_DEL_UNDO 2 // called from undo, do not update textprops
// Values for the flags argument of ml_append_int().
#define ML_APPEND_NEW 1 // starting to edit a new file
#define ML_APPEND_MARK 2 // mark the new line
#define ML_APPEND_UNDO 4 // called from undo
/*
* Structure defining text properties. These stick with the text.