Skip to content

Commit

Permalink
fix: use for "File has been changed" prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
murtaza64 committed Jun 13, 2024
1 parent 0231265 commit de33f3f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
8 changes: 5 additions & 3 deletions src/nvim/bufwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,11 @@ static int check_mtime(buf_T *buf, FileInfo *file_info)
&& time_differs(file_info, buf->b_mtime_read, buf->b_mtime_read_ns)) {
msg_scroll = true; // Don't overwrite messages here.
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!!!"), HL_ATTR(HLF_E));
if (ask_yesno(_("Do you really want to write to it"), true) == 'n') {
if (vim_dialog_yesno(VIM_WARNING,
NULL,
_(
"WARNING: The file has been changed since reading it. Do you really want to write to it?"),
2) == VIM_NO) {
return FAIL;
}
msg_scroll = false; // Always overwrite the file message now.
Expand Down
16 changes: 3 additions & 13 deletions src/nvim/po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -2387,19 +2387,9 @@ msgstr "[no hay fin de línea]"
msgid "[Incomplete last line]"
msgstr "[Última línea incompleta]"

# don't overwrite messages here
# must give this prompt
# don't use emsg() here, don't want to flush the buffers
#. don't overwrite messages here
#. must give this prompt
#. don't use emsg() here, don't want to flush the buffers
#: ../fileio.c:3865
msgid "WARNING: The file has been changed since reading it!!!"
msgstr "ADVERTENCIA: ¡¡¡El archivo ha cambiado desde que se leyó!!!"

#: ../fileio.c:3867
msgid "Do you really want to write to it"
msgstr "¿Desea realmente escribir al archivo?"
#: ../bufwrite.c:362
msgid "WARNING: The file has been changed since reading it. Do you really want to write to it?"
msgstr "ADVERTENCIA: El archivo ha cambiado desde que se leyó. ¿Desea realmente escribir en él?"

#: ../fileio.c:4648
#, c-format
Expand Down

0 comments on commit de33f3f

Please sign in to comment.