Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions plugin/sayonara.vim
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ endfunction
" s:prototype.handle_modified_buffer() {{{1
function! s:prototype.handle_modified_buffer()
if &modified
echo 'Unsaved changes: [w]rite, [s]kip, [b]reak '
echo 'Save changes? [Y]es, [N]o, [C]ancel: '
let choice = nr2char(getchar())
if choice == 'w'
if choice ==? 'y'
try
write
catch /E32/
redraw | echohl ErrorMsg | echomsg 'No file name.' | echohl NONE
return 'return'
endtry
elseif choice == 's'
elseif choice ==? 'n'
return ''
else
redraw!
Expand All @@ -46,7 +46,7 @@ function! s:prototype.handle_quit()
redraw!
if (get(g:, 'sayonara_confirm_quit'))
echo 'No active buffer remaining. Quit Vim? [y/n]: '
if nr2char(getchar()) != 'y'
if nr2char(getchar()) !=? 'y'
redraw!
return 'return'
endif
Expand Down