File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,8 @@ These are the fields you can configure by passing them to the `require('blame').
7676- ` max_summary_width ` - If date_message is used, cut the summary if it excedes this number of characters
7777- ` colors ` - list of RGB strings to use instead of randomly generated RGBs for highlights
7878- ` blame_options ` - list of blame options to use for git blame. If nil, then no options are used
79- - ` commit_detail_view ` - string - "tab"|"split"|"vsplit"|"current" - Open commit details in a new tab, split, vsplit or current buffer
79+ - ` commit_detail_view ` - string or function - "tab"|"split"|"vsplit"|"current" - Open commit details in a new tab, split, vsplit or current buffer
80+ ` function(commit_hash) ... end ` - Calls function and passes commit hash to it
8081- ` format_fn ` - format function that is used for processing of porcelain lines. See below for details
8182 ( built-in: ` ("blame.formats.default_formats").date_message ` and ` ("blame.formats.default_formats").commit_date_author_fn ` )
8283- ` mappings ` - custom mappings for various actions, you can pass in single or multiple mappings for an action.
Original file line number Diff line number Diff line change @@ -342,6 +342,10 @@ function WindowView:show_full_commit()
342342 local row , _ = unpack (vim .api .nvim_win_get_cursor (self .blame_window ))
343343 local commit = self .blamed_lines [row ]
344344 local view = self .config .commit_detail_view or " tab"
345+ if type (view ) == ' function' then
346+ view (commit .hash )
347+ return
348+ end
345349
346350 local err_cb = function (err )
347351 vim .notify (err , vim .log .levels .INFO )
You can’t perform that action at this time.
0 commit comments