patch 8.1.0036: not restoring Insert mode if leaving prompt buffer with mouse
Problem: Not restoring Insert mode if leaving a prompt buffer by using a
mouse click.
Solution: Set b_prompt_insert appropriately. Also correct cursor position
when moving cursor to last line.
diff --git a/src/buffer.c b/src/buffer.c
index 1c55acb..68b4a04 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5733,6 +5733,10 @@
#endif
if (buf->b_fname != NULL)
return buf->b_fname;
+#ifdef FEAT_JOB_CHANNEL
+ if (bt_prompt(buf))
+ return (char_u *)_("[Prompt]");
+#endif
return (char_u *)_("[Scratch]");
}