diff src/buffer.c @ 14037:afce2005fdc8 v8.1.0036

patch 8.1.0036: not restoring Insert mode if leaving prompt buffer with mouse commit https://github.com/vim/vim/commit/891e1fd894720d0b99a9daefa41e8181844f819a Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 6 18:02:39 2018 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Wed, 06 Jun 2018 18:15:05 +0200
parents dc67449d648c
children 1d25a3e8e03c
line wrap: on
line diff
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5733,6 +5733,10 @@ buf_spname(buf_T *buf)
 #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]");
     }