File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed
Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -203,17 +203,18 @@ Each enabled buffer has the following buffer-local variables which can be
203203used in custom statusline to show an overview of hunks in current buffer:
204204
205205- `vim .b .minidiff_summary` is a table with the following fields:
206- - `source_name` - name of the active source.
206+ - `source_name` - name of the active source. This is the only present field
207+ if buffer's reference text is not (yet) set.
207208 - `n_ranges` - number of hunk ranges (sequences of contiguous hunks).
208209 - `add ` - number of added lines.
209210 - `change ` - number of changed lines.
210211 - `delete ` - number of deleted lines.
211212
212213- `vim .b .minidiff_summary_string` is a string representation of summary
213- with a fixed format. It is expected to be used as is. To achieve
214- different formatting, use ` vim . b .minidiff_summary` to construct one.
215- The best way to do this is by overriding ` vim . b .minidiff_summary_string`
216- in the callback for | MiniDiff-update-event | event : >lua
214+ with a fixed format. Empty string if there is no reference text (yet).
215+ It is expected to be used as is. To achieve different formatting, use
216+ ` vim . b .minidiff_summary` to construct one. The best way to do this is by
217+ overriding ` vim . b .minidiff_summary_string` inside | MiniDiff-update-event | : >lua
217218
218219 local format_summary = function(data)
219220 local summary = vim.b[data.buf].minidiff_summary
Original file line number Diff line number Diff line change 200200--- used in custom statusline to show an overview of hunks in current buffer:
201201---
202202--- - `vim.b.minidiff_summary` is a table with the following fields:
203- --- - `source_name` - name of the active source.
203+ --- - `source_name` - name of the active source. This is the only present field
204+ --- if buffer's reference text is not (yet) set.
204205--- - `n_ranges` - number of hunk ranges (sequences of contiguous hunks).
205206--- - `add` - number of added lines.
206207--- - `change` - number of changed lines.
207208--- - `delete` - number of deleted lines.
208209---
209210--- - `vim.b.minidiff_summary_string` is a string representation of summary
210- --- with a fixed format. It is expected to be used as is. To achieve
211- --- different formatting, use `vim.b.minidiff_summary` to construct one.
212- --- The best way to do this is by overriding `vim.b.minidiff_summary_string`
213- --- in the callback for |MiniDiff-update-event| event : >lua
211+ --- with a fixed format. Empty string if there is no reference text (yet).
212+ --- It is expected to be used as is. To achieve different formatting, use
213+ --- `vim.b.minidiff_summary` to construct one. The best way to do this is by
214+ --- overriding `vim.b.minidiff_summary_string` inside |MiniDiff-update-event|: >lua
214215---
215216--- local format_summary = function(data)
216217--- local summary = vim.b[data.buf].minidiff_summary
You can’t perform that action at this time.
0 commit comments