Created
June 30, 2021 11:16
-
-
Save kuuote/dfe1b8cb60835f38cb71f4903d0c8b0c to your computer and use it in GitHub Desktop.
SafeStateを使ったScrollChangedもどき
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:test() abort | |
let oldline = get(b:, 'test', -1) | |
let curline = line('w0') | |
if oldline != curline | |
echomsg curline | |
let b:test = curline | |
endif | |
endfunction | |
augroup mytest | |
autocmd! | |
autocmd SafeState * call s:test() | |
augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment