diff src/channel.c @ 18102:0d9ec3a2821f v8.1.2046

patch 8.1.2046: SafeState may be triggered at the wrong moment Commit: https://github.com/vim/vim/commit/69198cb8c08f124729c41a4681f2d142228a9139 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 16 21:58:13 2019 +0200 patch 8.1.2046: SafeState may be triggered at the wrong moment Problem: SafeState may be triggered at the wrong moment. Solution: Move it up higher to after where messages are processed. Add a SafeStateAgain event to tigger there.
author Bram Moolenaar <Bram@vim.org>
date Mon, 16 Sep 2019 22:00:04 +0200
parents a2870e6f5b45
children e59ff7b5d7a7
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -3593,10 +3593,6 @@ channel_read_json_block(
 
     ch_log(channel, "Blocking read JSON for id %d", id);
 
-    // Not considered a safe state here, since we are processing a JSON message
-    // and parsing other messages while waiting.
-    enter_unsafe_state();
-
     if (id >= 0)
 	channel_add_block_id(chanpart, id);
 
@@ -3666,9 +3662,6 @@ channel_read_json_block(
     if (id >= 0)
 	channel_remove_block_id(chanpart, id);
 
-    // This may trigger a SafeState autocommand.
-    leave_unsafe_state();
-
     return retval;
 }