File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,12 +18,12 @@ for any git rev.
1818
1919USAGE *diffview-usage*
2020
21- Quick-start: `:DiffviewOpen` to open a Diffview that compares against the
21+ Quick-start: `:DiffviewOpen` or `:DiffviewToggle` to open a Diffview that compares against the
2222index.
2323
2424You can have multiple Diffviews open, tracking different git revs. Each Diffview
25- opens in its own tabpage. To close and dispose of a Diffview, call either
26- `:DiffviewClose` or `:tabclose ` while a Diffview is the current tabpage.
25+ opens in its own tabpage. To close and dispose of a Diffview, call
26+ `:DiffviewClose` , `:DiffviewToggle` or `:tabclose ` while a Diffview is the current tabpage.
2727Diffviews are automatically updated:
2828
2929 • Every time you enter a Diffview
@@ -370,6 +370,13 @@ COMMANDS *diffview-commands*
370370 *:DiffviewClose*
371371:DiffviewClose Close the active Diffview.
372372
373+ *:DiffviewToggle*
374+ :DiffviewToggle [git-rev] [options] [ -- {paths...} ]
375+
376+ Alias for `:DiffviewOpen` when the current tabpage is not a Diffview,
377+ otherwise acts as an alias for `:DiffviewClose` . Accepts the same
378+ arguments as `:DiffviewOpen` .
379+
373380 *:DiffviewToggleFiles*
374381:DiffviewToggleFiles Toggles the file panel.
375382
Original file line number Diff line number Diff line change @@ -133,7 +133,6 @@ function M.open(args)
133133 end
134134end
135135
136-
137136--- @param range ? { [1] : integer , [2] : integer }
138137--- @param args string[]
139138function M .file_history (range , args )
You can’t perform that action at this time.
0 commit comments