plugins.dropbar.settings.symbol.jump.reorient

Function to reorient the source window when jumping to symbol given the source window win and the range of the symbol range.

Type: null or raw lua code

Default: null

Plugin default:

lib.nixvim.mkRaw ''
  function(win, range)
    local view = vim.fn.winsaveview()
    local win_height = vim.api.nvim_win_get_height(win)
    local topline = range.start.line - math.floor(win_height / 4)
    if
      topline > view.topline
      and topline + win_height < vim.fn.line('$')
    then
      view.topline = topline
      vim.fn.winrestview(view)
    end
  end
''

Declared by: