diff options
Diffstat (limited to 'src/undo.c')
-rw-r--r-- | src/undo.c | 4 |
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)); } |