summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-06-20 22:38:21 +0200
committerBram Moolenaar <Bram@vim.org>2018-06-20 22:38:21 +0200
commit4551c0a9fcdbdef52836d4852686d54b5e47fdaf (patch)
treead8c9cd625b250195115851a2de3fd67a0c3035a /src/undo.c
parent9b0c5c23bd5260caef82a4f3dcc945c129857c52 (diff)
downloadvim-git-4551c0a9fcdbdef52836d4852686d54b5e47fdaf.tar.gz
patch 8.1.0091: MS-Windows: Cannot interrupt gdb when program is runningv8.1.0091
Problem: MS-Windows: Cannot interrupt gdb when program is running. Solution: Add debugbreak() and use it in the terminal debugger. Respect 'modified' in a prompt buffer.
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/undo.c b/src/undo.c
index 6e3381f8c..117321ea6 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -3539,7 +3539,9 @@ bufIsChanged(buf_T *buf)
int
bufIsChangedNotTerm(buf_T *buf)
{
- return !bt_dontwrite(buf)
+ // In a "prompt" buffer we do respect 'modified', so that we can control
+ // closing the window by setting or resetting that option.
+ return (!bt_dontwrite(buf) || bt_prompt(buf))
&& (buf->b_changed || file_ff_differs(buf, TRUE));
}