summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmon Sha <amon.sha@gmail.com>2022-02-21 15:07:12 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-21 15:07:12 +0000
commit101979358f9addfac1414579c4191682e9e42468 (patch)
tree6ab7366563dc9d9891e4e4321d49c9d62509b1db
parentc2f17f7e64bb1bf872dbc6f3b8f0d8751e275287 (diff)
downloadvim-git-8.2.4430.tar.gz
patch 8.2.4430: GTK: crash when using 'guiligatures' and reading from stdinv8.2.4430
Problem: GTK: crash when using 'guiligatures' and reading from stdin. Solution: Make a copy of the message. (Amon Sha, closes #9719, closes #9814)
-rw-r--r--src/fileio.c9
-rw-r--r--src/version.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 73fa11b31..21417c27f 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -759,8 +759,13 @@ readfile(
// Also write a message in the GUI window, if there is one.
if (gui.in_use && !gui.dying && !gui.starting)
{
- p = (char_u *)_("Reading from stdin...");
- gui_write(p, (int)STRLEN(p));
+ // make a copy, gui_write() may try to change it
+ p = vim_strsave((char_u *)_("Reading from stdin..."));
+ if (p != NULL)
+ {
+ gui_write(p, (int)STRLEN(p));
+ vim_free(p);
+ }
}
#endif
}
diff --git a/src/version.c b/src/version.c
index 2a8afcec9..f3b54f0f5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4430,
+/**/
4429,
/**/
4428,