Skip to content

Commit c0c0926

Browse files
committed
fix(bcommits): visual range regression from ad5e33a
fixes #2375
1 parent a13c5c5 commit c0c0926

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lua/fzf-lua/providers/git.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ M.bcommits = function(opts)
134134
local _, sel = utils.get_visual_selection()
135135
if not sel then return end
136136
range = string.format("-L %d,%d:%s --no-patch", sel.start.line, sel["end"].line, file)
137+
-- when range is specified remove "end of options" marker (#2375)
138+
opts.cmd = opts.cmd:gsub("%s+%-%-%s-$", " "):gsub("%-%-%s+[<{]file[}>]", " {file}")
137139
end
138140
if opts.cmd:match("[<{]file") then
139141
opts.cmd = opts.cmd:gsub("[<{]file[}>]", range or file)

0 commit comments

Comments
 (0)