Mercurial > vim
comparison src/window.c @ 34144:27b3a4fe9c5e v9.1.0033
patch 9.1.0033: Insert mode not stopped if closing prompt buffer modifies hidden buffer
Commit: https://github.com/vim/vim/commit/96958366ad6159efe708b694055320ed19357e61
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Jan 16 17:19:59 2024 +0100
patch 9.1.0033: Insert mode not stopped if closing prompt buffer modifies hidden buffer
Problem: Insert mode not stopped if an autocommand modifies a hidden
buffer while closing a prompt buffer.
Solution: Don't set b_prompt_insert if stop_insert_mode is already set.
(zeertzjq)
closes: #13872
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 16 Jan 2024 17:30:08 +0100 |
parents | 0c40b031e7d8 |
children | a522c6c0127b |
comparison
equal
deleted
inserted
replaced
34143:095baafb4fb8 | 34144:27b3a4fe9c5e |
---|---|
2360 restart_edit = NUL; | 2360 restart_edit = NUL; |
2361 | 2361 |
2362 // When leaving the window (or closing the window) was done from a | 2362 // When leaving the window (or closing the window) was done from a |
2363 // callback we need to break out of the Insert mode loop and restart Insert | 2363 // callback we need to break out of the Insert mode loop and restart Insert |
2364 // mode when entering the window again. | 2364 // mode when entering the window again. |
2365 if (State & MODE_INSERT) | 2365 if ((State & MODE_INSERT) && !stop_insert_mode) |
2366 { | 2366 { |
2367 stop_insert_mode = TRUE; | 2367 stop_insert_mode = TRUE; |
2368 if (win->w_buffer->b_prompt_insert == NUL) | 2368 if (win->w_buffer->b_prompt_insert == NUL) |
2369 win->w_buffer->b_prompt_insert = 'A'; | 2369 win->w_buffer->b_prompt_insert = 'A'; |
2370 } | 2370 } |