plugins.diffview.hooks.diffBufRead

{diff_buf_read} (fun(bufnr: integer, ctx: table))

Emitted after a new diff buffer is ready (the first time it's
created and loaded into a window). Diff buffers are all
buffers with |diff-mode| enabled. That includes buffers of
local files (not created from git).

This is always called with the new buffer as the current
buffer and the correct diff window as the current window such
that |:setlocal| will apply settings to the relevant buffer /
window.

Callback Parameters:
    {bufnr} (`integer`)
        The buffer number of the new buffer.
    {ctx} (`table`)
        • {symbol} (string)
          A symbol that identifies the window's position in
          the layout. These symbols correspond with the
          figures under |diffview-config-view.x.layout|.
        • {layout_name} (string)
          The name of the current layout.

Type: null or string

Default: null

Declared by:

plugins.diffview.hooks.diffBufWinEnter

{diff_buf_win_enter} (fun(bufnr: integer, winid: integer, ctx: table))

Emitted after a diff buffer is displayed in a window.

This is always called with the new buffer as the current
buffer and the correct diff window as the current window such
that |:setlocal| will apply settings to the relevant buffer /
window.

Callback Parameters:
    {bufnr} (`integer`)
        The buffer number of the new buffer.
    {winid} (`integer`)
        The window id of window inside which the buffer was
        displayed.
    {ctx} (`table`)
        • {symbol} (string)
          A symbol that identifies the window's position in
          the layout. These symbols correspond with the
          figures under |diffview-config-view.x.layout|.
        • {layout_name} (string)
          The name of the current layout.

Type: null or string

Default: null

Declared by:

plugins.diffview.hooks.viewClosed

{view_closed} (fun(view: View))

Emitted after closing a view.

Callback Parameters:
    {view} (`View`)
        The `View` instance that was closed.

Type: null or string

Default: null

Declared by:

plugins.diffview.hooks.viewEnter

{view_enter} (fun(view: View))

Emitted just after entering the tabpage of a view.

Callback Parameters:
    {view} (`View`)
        The `View` instance that was entered.

Type: null or string

Default: null

Declared by:

plugins.diffview.hooks.viewLeave

{view_leave} (fun(view: View))

Emitted just before leaving the tabpage of a view.

Callback Parameters:
    {view} (`View`)
        The `View` instance that's about to be left.

Type: null or string

Default: null

Declared by:

plugins.diffview.hooks.viewOpened

{view_opened} (fun(view: View))

Emitted after a new view has been opened. It’s called after initializing the layout in the new tabpage (all windows are ready).

Callback Parameters: {view} (View) The View instance that was opened.

Type: null or string

Default: null

Declared by:

plugins.diffview.hooks.viewPostLayout

{view_post_layout} (fun(view: View))

Emitted after the window layout in a view has been adjusted.

Callback Parameters:
    {view} (`View`)
        The `View` whose layout was adjusted.

Type: null or string

Default: null

Declared by: