Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.

Commit c3275db

Browse files
committed
better condition on recommendation
1 parent a9ae9ce commit c3275db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
```
44
```vim
55
" Feel free to use this alternative to the plugin's core autosave and session management features:
6-
au BufLeave,CursorHold,CursorHoldi,FocusLost * if (&buftype == '') | do BufWritePre | silent! update | do BufWritePost | endif
7-
au VimEnter * nested if (len(v:argv) == 1) | silent! source Session.vim | mksession! | endif
6+
au BufLeave,CursorHold,FocusLost * if(getbufinfo('%')[0].changed) | do BufWritePre | sil! up | do BufWritePost | endif
7+
au VimEnter * nested if (len(v:argv) == 1) | silent! source Session.vim | endif
88
au VimLeave * if (len(v:argv) == 1) | mksession! | endif
9+
" available since v8.1.2233 (2019-10-28), v:argv doubles for both stdin and argful cases (instead of argc() and a StdinReadPre autocmd flag)
910
" v:argv length check may need to be 2 if using Neovim since it includes an --embed argument on launch
10-
" v:argv doubles for both stdin and argful cases (instead of argc() and a StdinReadPre autocmd flag)
1111
```
1212
---
1313
<p align="center">

0 commit comments

Comments
 (0)