Skip to content

Commit ba1f580

Browse files
authored
Merge pull request #351 from vds2212/ctrlsfclose-check
Check the correct buffer to detect change in the CtrlSFClose command
2 parents 32236a8 + 6e42b76 commit ba1f580

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

autoload/ctrlsf/buf.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ endf
8787
" WarnIfChanged()
8888
"
8989
func! ctrlsf#buf#WarnIfChanged() abort
90-
if getbufvar('%', '&modified')
90+
let bufnr = bufnr('__CtrlSF__')
91+
if getbufvar(bufnr, '&modified')
9192
call ctrlsf#log#Warn("Will discard ALL unsaved changes, continue? (y/N)")
9293
let confirm = nr2char(getchar()) | redraw!
9394
if !(confirm ==? "y")

0 commit comments

Comments
 (0)