On 03.02.2019 03:05, Andrey Butirsky wrote:
> On 29.01.2019 04:28, Shigio YAMAGUCHI wrote:
>> Hello all,
>> I have added new custom variable 'Gtags_Emacs_Like_Mode' to gtags.vim.
>> The concept of this mode is the idea of Andrey Butirsky. Thank you Andrey!
> Hello Shigio, here is some notes:

The fixes:

patch --ignore-whitespace --dry-run << HERE
--- plugin/gtags.vim.orig       2019-01-30 06:18:56.000000000 +0300
+++ plugin/gtags.vim    2019-02-03 18:55:37.435463649 +0300
@@ -385,15 +385,9 @@
 "
 " Get global command string.
 "
-function! s:GlobalCommand(...)
-    let l:result = ''
-    if a:0 > 0
-        let l:option = ' ' . a:1
-    else
-        let l:option = ''
-    endif
+function! s:GlobalCommand()
     if g:Gtags_Emacs_Like_Mode == 1 && expand('%') != ''
-        let l:result = 'cd ' . expand('%:p:h:S') . ' && ' . s:global_command . 
l:option
+        let l:result = 'cd ' . expand('%:p:h:S') . ' && ' . s:global_command . 
' --path-style=absolute'
     else
         let l:result = s:global_command
     endif
@@ -422,9 +416,9 @@
     let l:option = l:option . '--result=' . g:Gtags_Result . ' -q'
     let l:option = l:option . s:TrimOption(a:option)
     if l:isfile == 1
-        let l:cmd = s:GlobalCommand('--path-style=absolute') . ' ' . l:option 
. ' ' . g:Gtags_Shell_Quote_Char . a:pattern . g:Gtags_Shell_Quote_Char
+        let l:cmd = s:GlobalCommand() . ' ' . l:option . ' ' . 
g:Gtags_Shell_Quote_Char . a:pattern . g:Gtags_Shell_Quote_Char
     else
-        let l:cmd = s:GlobalCommand('--path-style=absolute') . ' ' . l:option 
. 'e ' . g:Gtags_Shell_Quote_Char . a:pattern . g:Gtags_Shell_Quote_Char 
+        let l:cmd = s:GlobalCommand() . ' ' . l:option . 'e ' . 
g:Gtags_Shell_Quote_Char . a:pattern . g:Gtags_Shell_Quote_Char 
     endif
 
     let l:result = system(l:cmd)
HERE

_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global

Reply via email to