summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/channel.c13
-rw-r--r--src/version.c2
2 files changed, 12 insertions, 3 deletions
diff --git a/src/channel.c b/src/channel.c
index cdb956e7cf..4326ca7c11 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -2927,9 +2927,16 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
seq_nr = 0;
if (d != NULL)
{
- di = dict_find(d, (char_u *)"id", -1);
- if (di != NULL && di->di_tv.v_type == VAR_NUMBER)
- seq_nr = di->di_tv.vval.v_number;
+ // When looking for a response message from the LSP server,
+ // ignore new LSP request and notification messages. LSP
+ // request and notification messages have the "method" field in
+ // the header and the response messages do not have this field.
+ if (!dict_has_key(d, "method"))
+ {
+ di = dict_find(d, (char_u *)"id", -1);
+ if (di != NULL && di->di_tv.v_type == VAR_NUMBER)
+ seq_nr = di->di_tv.vval.v_number;
+ }
}
argv[1] = *listtv;
diff --git a/src/version.c b/src/version.c
index 5f362340ec..7e8589b05c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -700,6 +700,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1922,
+/**/
1921,
/**/
1920,