Skip to content

Instantly share code, notes, and snippets.

@kuuote
Created June 30, 2021 11:16
Show Gist options
  • Save kuuote/dfe1b8cb60835f38cb71f4903d0c8b0c to your computer and use it in GitHub Desktop.
Save kuuote/dfe1b8cb60835f38cb71f4903d0c8b0c to your computer and use it in GitHub Desktop.
SafeStateを使ったScrollChangedもどき
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