fix(swapfile): handle newlines in swapfile list message #35802

This commit is contained in:
luukvbaal
2025-09-16 20:28:34 +02:00
committed by GitHub
parent 8c4f0e5331
commit cbfa7f0d7b

View File

@@ -1403,7 +1403,8 @@ int recover_names(char *fname, bool do_list, list_T *ret_list, int nr, char **fn
StringBuilder msg = KV_INITIAL_VALUE;
kv_resize(msg, IOSIZE);
swapfile_info(files[i], &msg);
msg_outtrans(msg.items, 0, false);
bool need_clear;
msg_multiline(cstr_as_string(msg.items), 0, false, false, &need_clear);
kv_destroy(msg);
}
} else {
@@ -3568,7 +3569,8 @@ static char *findswapname(buf_T *buf, char **dirp, char *old_fname, bool *found_
// pretend screen didn't scroll, need redraw anyway
msg_reset_scroll();
} else {
msg_outtrans(msg.items, 0, false);
bool need_clear;
msg_multiline(cstr_as_string(msg.items), 0, false, false, &need_clear);
}
no_wait_return--;
kv_destroy(msg);