mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 09:48:19 +00:00
fix(swapfile): handle newlines in swapfile list message #35802
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user