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

Commit

Permalink
cmdlineに対応
Browse files Browse the repository at this point in the history
  • Loading branch information
kuuote committed Jul 25, 2021
1 parent a7208e9 commit d9abad7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions autoload/skkeleton.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
function! s:getlinepos() abort
if mode() ==# 'i'
return [getline('.'), col('.') - 2]
else
return [getcmdline(), getcmdpos() - 2]
endif
endfunction

function! skkeleton#get_henkan_str() abort
let line = getline('.')
let idx = col('.') - 2
let [line, idx] = s:getlinepos()
let henkan_point = strridx(line, '', idx)
if henkan_point == -1
return ''
Expand Down

0 comments on commit d9abad7

Please sign in to comment.