Skip to content

Commit 3e2619e

Browse files
committed
Make xolox#misc#option#eval_tags() respect 'd' in &cpoptions
This is intended to fix xolox/vim-easytags#92. If the feedback there indicates this works then I'll update the vim-easytags documentation to clarify that changing 'cpoptions' is required to get the behavior requested in that issue.
1 parent c063196 commit 3e2619e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

autoload/xolox/misc.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" The version of my miscellaneous scripts.
22
"
33
" Author: Peter Odding <[email protected]>
4-
" Last Change: March 15, 2015
4+
" Last Change: April 1, 2015
55
" URL: http://peterodding.com/code/vim/misc/
66

7-
let g:xolox#misc#version = '1.17.2'
7+
let g:xolox#misc#version = '1.17.3'

autoload/xolox/misc/option.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim and plug-in option handling.
22
"
33
" Author: Peter Odding <[email protected]>
4-
" Last Change: June 2, 2013
4+
" Last Change: April 1, 2015
55
" URL: http://peterodding.com/code/vim/misc/
66

77
function! xolox#misc#option#get(name, ...) " {{{1
@@ -94,7 +94,8 @@ function! xolox#misc#option#eval_tags(value, ...) " {{{1
9494
" Make buffer relative pathnames absolute.
9595
if pattern =~ '^\./'
9696
let suffix = matchstr(pattern, '^./\zs.*$')
97-
let pattern = xolox#misc#path#merge(expand('%:p:h'), suffix)
97+
let directory = (&cpoptions =~ 'd') ? getcwd() : expand('%:p:h')
98+
let pattern = xolox#misc#path#merge(directory, suffix)
9899
endif
99100
" Make working directory relative pathnames absolute.
100101
if xolox#misc#path#is_relative(pattern)

0 commit comments

Comments
 (0)