mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 02:21:51 +00:00
feat(ui)!: emit prompt "messages" as cmdline events #31525
Problem: Prompts are emitted as messages events, where cmdline events
are more appropriate. The user input is also emitted as
message events in fast context, so cannot be displayed with
vim.ui_attach().
Solution: Prompt for user input through cmdline prompts.
This commit is contained in:
@@ -350,7 +350,7 @@ static int check_mtime(buf_T *buf, FileInfo *file_info)
|
||||
msg_silent = 0; // Must give this prompt.
|
||||
// Don't use emsg() here, don't want to flush the buffers.
|
||||
msg(_("WARNING: The file has been changed since reading it!!!"), HLF_E);
|
||||
if (ask_yesno(_("Do you really want to write to it"), true) == 'n') {
|
||||
if (ask_yesno(_("Do you really want to write to it")) == 'n') {
|
||||
return FAIL;
|
||||
}
|
||||
msg_scroll = false; // Always overwrite the file message now.
|
||||
|
||||
Reference in New Issue
Block a user