Skip to content

Commit

Permalink
commit 9c25f2f
Browse files Browse the repository at this point in the history
9c25f2f fix(typings): getDocument return type. (#5132)
d4ff928 feat(language-client): modify log time format (#5130)
53e21a9 fix(snippet): deviation in snippet select in the first column (#5104)
0e6a8c7 feat(codeLens): add codeLens.display (#5129)
704295e fix(handler): correct current winid (#5128)
aabfc23 fix: ignore failed config file reads (#5118)
56ea360 feat: expose more properties quick list (#5114)
37f98a1 feat(util): adjust to vim's Patch 9.1.327 (#5122)
80e9f1b chore(package): upgrade micromatch (#5127)
98fa66a chore(packages): lock ESLint versions for now (#5108)
bf3d1f6 Add `coc.preferences.formatterExtension` configuration (#5102)
38697bc chore(handle): typo toggle inlayHint (#5105)
  • Loading branch information
fannheyward committed Sep 2, 2024
1 parent ae1a557 commit 69b16f8
Show file tree
Hide file tree
Showing 6 changed files with 392 additions and 279 deletions.
6 changes: 3 additions & 3 deletions autoload/coc/snippet.vim
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function! coc#snippet#select(start, end, text) abort
if coc#pum#visible()
call coc#pum#close()
endif
if mode() == 's'
if mode() ==? 's'
call feedkeys("\<Esc>", 'in')
endif
if &selection ==# 'exclusive'
Expand All @@ -124,7 +124,7 @@ function! coc#snippet#select(start, end, text) abort
call cursor([cursor[0], cursor[1] - 1])
let len = strchars(a:text) - 1
let cmd = ''
let cmd .= mode()[0] ==# 'i' ? "\<Esc>l" : ''
let cmd .= mode()[0] ==# 'i' ? "\<Esc>".(col('.') == 1 ? '' : 'l') : ''
let cmd .= printf('v%s', len > 0 ? len . 'h' : '')
let cmd .= "o\<C-g>"
endif
Expand All @@ -133,7 +133,7 @@ endfunction

function! coc#snippet#move(position) abort
let m = mode()
if m == 's'
if m ==? 's'
call feedkeys("\<Esc>", 'in')
endif
let pos = coc#snippet#to_cursor(a:position)
Expand Down
8 changes: 7 additions & 1 deletion autoload/coc/util.vim
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,13 @@ function! coc#util#get_config_home()
if s:is_win
return resolve($HOME."/vimfiles")
endif
return resolve($HOME.'/.vim')
if isdirectory(resolve($HOME.'/.vim'))
return resolve($HOME.'/.vim')
endif
if exists('$XDG_CONFIG_HOME') && isdirectory(resolve($XDG_CONFIG_HOME))
return resolve($XDG_CONFIG_HOME.'/vim')
endif
return resolve($HOME.'/.config/vim')
endif
endfunction

Expand Down
6 changes: 3 additions & 3 deletions autoload/coc/window.vim
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ function! coc#window#close(winid) abort
endif
endfunction

function! coc#window#visible_range(bufnr) abort
let winid = bufwinid(a:bufnr)
if winid == -1
function! coc#window#visible_range() abort
let winid = win_getid()
if winid == 0
return v:null
endif
let info = getwininfo(winid)[0]
Expand Down
Loading

0 comments on commit 69b16f8

Please sign in to comment.