diff src/ex_docmd.c @ 17708:10696f279e20 v8.1.1851

patch 8.1.1851: crash when sound_playfile() callback plays sound commit https://github.com/vim/vim/commit/28e67e0c1496b7bb166a0acfb176690f219101ca Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 15 23:05:49 2019 +0200 patch 8.1.1851: crash when sound_playfile() callback plays sound Problem: Crash when sound_playfile() callback plays sound. Solution: Invoke callback later from event loop.
author Bram Moolenaar <Bram@vim.org>
date Thu, 15 Aug 2019 23:15:04 +0200
parents 9efb4dda9720
children 316ae5631c1d
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -7692,8 +7692,12 @@ do_sleep(long msec)
 	}
 #endif
 #ifdef FEAT_JOB_CHANNEL
-	if (has_any_channel() && wait_now > 100L)
-	    wait_now = 100L;
+	if (has_any_channel() && wait_now > 20L)
+	    wait_now = 20L;
+#endif
+#ifdef FEAT_SOUND
+	if (has_any_sound_callback() && wait_now > 20L)
+	    wait_now = 20L;
 #endif
 	ui_delay(wait_now, TRUE);
 #ifdef FEAT_JOB_CHANNEL