mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 20:10:05 +08:00
Improve gtags layer (#4172)
This commit is contained in:
parent
2d0506c566
commit
00ffd4a5ae
@ -23,10 +23,6 @@ let g:gtags_global_command = get(g:, 'gtags_global_command',
|
||||
\ empty($GTAGSGLOBAL) ? 'global' : $GTAGSGLOBAL
|
||||
\ )
|
||||
|
||||
""
|
||||
" Enable/Disable default mappings. By default it is disabled.
|
||||
let g:gtags_auto_map = get(g:, 'gtags_auto_map', 0)
|
||||
|
||||
""
|
||||
" This setting will open the |quickfix| list when adding entries. A value of 2 will
|
||||
" preserve the cursor position when the |quickfix| window is
|
||||
@ -308,12 +304,15 @@ function! s:ExecLoad(option, long_option, pattern) abort
|
||||
" Parse the output of 'global -x or -t' and show in the quickfix window.
|
||||
let l:efm_org = &efm
|
||||
let &efm = g:Gtags_Efm
|
||||
if l:result =~# '\n.'
|
||||
cgetexpr l:result
|
||||
else
|
||||
cexpr! l:result
|
||||
endif
|
||||
|
||||
cgetexpr l:result
|
||||
|
||||
let &efm = l:efm_org
|
||||
|
||||
" If there is only one item, jump to the position.
|
||||
if len(getqflist()) ==# 1
|
||||
cnext
|
||||
endif
|
||||
endfunction
|
||||
|
||||
let s:prev_windows = []
|
||||
|
@ -20,9 +20,6 @@ CONFIGURATION *gtags-config*
|
||||
Set the global command name. If it is not set, will use $GTAGSGLOBAL, and if
|
||||
$GTAGSGLOBAL still is an empty string, then will use 'global'.
|
||||
|
||||
*g:gtags_auto_map*
|
||||
Enable/Disable default mappings. By default it is disabled.
|
||||
|
||||
*g:gtags_open_list*
|
||||
This setting will open the |quickfix| list when adding entries. A value of 2
|
||||
will preserve the cursor position when the |quickfix| window is opened.
|
||||
|
Loading…
Reference in New Issue
Block a user