Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 26f428f

Browse files
tadpolvim-scripts
authored andcommitted
Version 0.5: Dotan Halevi fixed the path handling when used on Windows systems.
1 parent 7e37ffb commit 26f428f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎plugin/autoload_cscope.vim‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim global plugin for autoloading cscope databases.
2-
" Last Change: Mon Nov 15 08:23:41 CST 2010
2+
" Last Change: Wed Jan 26 10:28:52 Jerusalem Standard Time 2011
33
" Maintainer: Michael Conrad Tadpol Tilsra <tadpol@tadpol.org>
4-
" Revision: 0.4
4+
" Revision: 0.5
55

66
if exists("loaded_autoload_cscope")
77
finish
@@ -27,11 +27,14 @@ endif
2727
" windowdir
2828
" Gets the directory for the file in the current window
2929
" Or the current working dir if there isn't one for the window.
30+
" Use tr to allow that other OS paths, too
3031
function s:windowdir()
3132
if winbufnr(0) == -1
32-
return getcwd()
33+
let unislash = getcwd()
34+
else
35+
let unislash = fnamemodify(bufname(winbufnr(0)), ':p:h')
3336
endif
34-
return fnamemodify(bufname(winbufnr(0)), ':p:h')
37+
return tr(unislash, '\', '/')
3538
endfunc
3639
"
3740
"==

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /