Skip to content

Commit

Permalink
Avoid nasty crashes in othervim
Browse files Browse the repository at this point in the history
  • Loading branch information
puremourning authored and bstaletic committed Jun 9, 2024
1 parent 9d8d267 commit 6c3832d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion autoload/youcompleteme/hierarchy.vim
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set cpoptions&vim
scriptencoding utf-8

let s:popup_id = -1
let s:lines_and_handles = v:none
let s:lines_and_handles = v:null
" 1-based index of the selected item in the popup
" -1 means none set
" 0 means nothing, (Invalid)
Expand All @@ -35,6 +35,11 @@ let s:ingored_keys = [
\ ]

function! youcompleteme#hierarchy#StartRequest( kind )
if !py3eval( 'vimsupport.VimSupportsPopupWindows()' )
echo 'Sorry, this feature is not supported in your editor'
return
endif

call youcompleteme#symbol#InitSymbolProperties()
py3 ycm_state.ResetCurrentHierarchy()
if a:kind == 'call'
Expand Down

0 comments on commit 6c3832d

Please sign in to comment.