diff options
author | erw7 <erw7.github@gmail.com> | 2019-05-23 05:15:04 +0900 |
---|---|---|
committer | erw7 <erw7.github@gmail.com> | 2020-02-12 15:16:32 +0900 |
commit | 783aecd501de2719f3059252e8444ef00c7c3d4a (patch) | |
tree | 22d5767893e21a5c1a092b41d75a0c4952932d33 /src/nvim/buffer.c | |
parent | 3ca0343fb99b7f7412fca73be6f94df252b6f0a3 (diff) | |
download | rneovim-783aecd501de2719f3059252e8444ef00c7c3d4a.tar.gz rneovim-783aecd501de2719f3059252e8444ef00c7c3d4a.tar.bz2 rneovim-783aecd501de2719f3059252e8444ef00c7c3d4a.zip |
vim-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.
https://github.com/vim/vim/commit/891e1fd894720d0b99a9daefa41e8181844f819a
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 91a96d1195..a9b37af917 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -5293,6 +5293,9 @@ char_u *buf_spname(buf_T *buf) if (buf->b_fname != NULL) { return buf->b_fname; } + if (bt_prompt(buf)) { + return (char_u *)_("[Prompt]"); + } return (char_u *)_("[Scratch]"); } if (buf->b_fname == NULL) { |