mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
shada: Do not record removable buffers and marks
This commit is contained in:
parent
200e62efeb
commit
75c9a7e65b
@ -1074,13 +1074,13 @@ static void shada_write(FILE *const newfp, FILE *const oldfp)
|
|||||||
|
|
||||||
size_t buf_count = 0;
|
size_t buf_count = 0;
|
||||||
FOR_ALL_BUFFERS(buf) {
|
FOR_ALL_BUFFERS(buf) {
|
||||||
if (buf->b_ffname != NULL) {
|
if (buf->b_ffname != NULL && !shada_removable(buf->b_ffname)) {
|
||||||
buf_count++;
|
buf_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
msgpack_pack_array(packer, buf_count);
|
msgpack_pack_array(packer, buf_count);
|
||||||
FOR_ALL_BUFFERS(buf) {
|
FOR_ALL_BUFFERS(buf) {
|
||||||
if (buf->b_ffname == NULL) {
|
if (buf->b_ffname == NULL || shada_removable(buf->b_ffname)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
msgpack_pack_map(packer, 3);
|
msgpack_pack_map(packer, 3);
|
||||||
@ -1228,7 +1228,7 @@ static void shada_write(FILE *const newfp, FILE *const oldfp)
|
|||||||
|
|
||||||
// 8. Buffer marks and buffer change list
|
// 8. Buffer marks and buffer change list
|
||||||
FOR_ALL_BUFFERS(buf) {
|
FOR_ALL_BUFFERS(buf) {
|
||||||
if (buf->b_ffname == NULL) {
|
if (buf->b_ffname == NULL || shada_removable(buf->b_ffname)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ShadaEntry *const buffer_marks = list_buffer_marks(buf);
|
ShadaEntry *const buffer_marks = list_buffer_marks(buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user