Patch 8.2.0452
Problem: channel_parse_messages() fails when called recursively.
Solution: Return for a recursive call. (closes #5835)
Files: src/channel.c
*** ../vim-8.2.0451/src/channel.c 2020-03-24 20:35:14.741080390 +0100
--- src/channel.c 2020-03-26 15:56:02.939711511 +0100
***************
*** 4428,4441 ****
int ret = FALSE;
int r;
ch_part_T part = PART_SOCK;
#ifdef ELAPSED_FUNC
elapsed_T start_tv;
-
- ELAPSED_INIT(start_tv);
#endif
++safe_to_invoke_callback;
// Only do this message when another message was given, otherwise we get
// lots of them.
if ((did_repeated_msg & REPEATED_MSG_LOOKING) == 0)
--- 4428,4449 ----
int ret = FALSE;
int r;
ch_part_T part = PART_SOCK;
+ static int recursive = FALSE;
#ifdef ELAPSED_FUNC
elapsed_T start_tv;
#endif
+ // The code below may invoke callbacks, which might call us back.
+ // That doesn't work well, just return without doing anything.
+ if (recursive)
+ return FALSE;
+ recursive = TRUE;
++safe_to_invoke_callback;
+ #ifdef ELAPSED_FUNC
+ ELAPSED_INIT(start_tv);
+ #endif
+
// Only do this message when another message was given, otherwise we get
// lots of them.
if ((did_repeated_msg & REPEATED_MSG_LOOKING) == 0)
***************
*** 4513,4518 ****
--- 4521,4527 ----
}
--safe_to_invoke_callback;
+ recursive = FALSE;
return ret;
}
*** ../vim-8.2.0451/src/version.c 2020-03-26 15:39:50.223238189 +0100
--- src/version.c 2020-03-26 15:56:59.759509505 +0100
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 452,
/**/
--
Windows
M!uqoms
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202003261505.02QF5V0c000459%40masaka.moolenaar.net.