@@ -127,23 +127,24 @@ function! flog#floggraph#format#FormatMarkLocalBranch(dict, key) abort
127127 return flog#floggraph#format#FormatCommitLocalBranch (a: dict , l: commit )
128128endfunction
129129
130- function ! flog#floggraph#format#FormatPath () abort
130+ function ! flog#floggraph#format#FormatPath (separate_args ) abort
131131 let l: state = flog#state#GetBufState ()
132132 let l: path = l: state .opts.path
133133
134134 if ! empty (l: state .opts.limit)
135135 let [l: range , l: limit_path ] = flog#args#SplitGitLimitArg (l: state .opts.limit)
136136
137137 if empty (l: limit_path )
138- return ' '
138+ return a: separate_args ? ' -- ' : ' '
139139 endif
140140
141141 let l: path = [l: limit_path ]
142142 elseif empty (l: path )
143- return ' '
143+ return a: separate_args ? ' -- ' : ' '
144144 endif
145145
146- return join (flog#shell#EscapeList (l: path ), ' ' )
146+ let l: paths = join (flog#shell#EscapeList (l: path ), ' ' )
147+ return a: separate_args ? ' -- ' .. l: paths : l: paths
147148endfunction
148149
149150function ! flog#floggraph#format#FormatIndexTree (dict ) abort
@@ -186,7 +187,9 @@ function! flog#floggraph#format#HandleCommandItem(dict, item, end) abort
186187 elseif a: item = ~# " ^%(l'."
187188 let l: formatted_item = flog#floggraph#format#FormatMarkLocalBranch (a: dict , a: item [4 : -2 ])
188189 elseif a: item == # ' %p'
189- let l: formatted_item = flog#floggraph#format#FormatPath ()
190+ let l: formatted_item = flog#floggraph#format#FormatPath (v: false )
191+ elseif a: item == # ' %P'
192+ let l: formatted_item = flog#floggraph#format#FormatPath (v: true )
190193 elseif a: item == # ' %t'
191194 let l: formatted_item = flog#floggraph#format#FormatIndexTree (a: dict )
192195 else
0 commit comments