diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-09-05 23:02:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-05 23:02:01 +0800 |
commit | fb39bba5a6d279101ca6925aa7b4ebf13f8238e4 (patch) | |
tree | 30ff58ac402c6a636731bf181b78eef1ec6aea91 /src/nvim/memory.c | |
parent | a220650fd6ef6490a787eb7efcab24b4bf13dab8 (diff) | |
parent | f6a8d395a72da61c9305cd242f38bd8137c4f5b0 (diff) | |
download | rneovim-fb39bba5a6d279101ca6925aa7b4ebf13f8238e4.tar.gz rneovim-fb39bba5a6d279101ca6925aa7b4ebf13f8238e4.tar.bz2 rneovim-fb39bba5a6d279101ca6925aa7b4ebf13f8238e4.zip |
Merge pull request #20088 from zeertzjq/vim-9.0.0386
vim-patch:9.0.0386: some code blocks are nested too deep
N/A patches for version.c:
vim-patch:9.0.0385: GUI: when CTRL-D is mapped in Insert mode it gets inserted
Diffstat (limited to 'src/nvim/memory.c')
-rw-r--r-- | src/nvim/memory.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/nvim/memory.c b/src/nvim/memory.c index e5fea027cb..03cfde6160 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -506,16 +506,18 @@ bool striequal(const char *a, const char *b) // Did_outofmem_msg is reset when a character is read. void do_outofmem_msg(size_t size) { - if (!did_outofmem_msg) { - // Don't hide this message - emsg_silent = 0; + if (did_outofmem_msg) { + return; + } - /* Must come first to avoid coming back here when printing the error - * message fails, e.g. when setting v:errmsg. */ - did_outofmem_msg = true; + // Don't hide this message + emsg_silent = 0; - semsg(_("E342: Out of memory! (allocating %" PRIu64 " bytes)"), (uint64_t)size); - } + // Must come first to avoid coming back here when printing the error + // message fails, e.g. when setting v:errmsg. + did_outofmem_msg = true; + + semsg(_("E342: Out of memory! (allocating %" PRIu64 " bytes)"), (uint64_t)size); } /// Writes time_t to "buf[8]". |