Skip to content

Commit

Permalink
fix: unneeded option set at cmdline
Browse files Browse the repository at this point in the history
  • Loading branch information
kuuote committed Jun 6, 2024
1 parent 953807b commit dad24e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions autoload/skkeleton.vim
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,6 @@ endfunction
function! skkeleton#disable()
if g:skkeleton#enabled
doautocmd <nomodeline> User skkeleton-disable-pre
" cmdline関係ないオプションだけなので辞書登録時はスキップ
if mode() !=# 'c'
call skkeleton#internal#option#restore()
endif
call skkeleton#internal#map#restore()
let g:skkeleton#mode = ''
doautocmd <nomodeline> User skkeleton-mode-changed
Expand Down
4 changes: 4 additions & 0 deletions autoload/skkeleton/internal/option.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ function s:ensure(dict, key, value)
endfunction

function skkeleton#internal#option#save_and_set()
" cmdline関係ないオプションだけなので辞書登録時はスキップ
if mode() !=# 'c'
call skkeleton#internal#option#restore()
endif
call s:ensure(s:textwidth, bufnr(), &l:textwidth)
call s:ensure(s:virtualedit, win_getid(), &l:virtualedit)
" 不意に改行が発生してバッファが壊れるため 'textwidth' を無効化
Expand Down

0 comments on commit dad24e6

Please sign in to comment.