global pak.window#

The visimp package manager’s popup manager


methods#


M.init#


function M.init() ->  nil

Initializes the window module relative to the size of the vi window

M.open#


function M.open() ->  nil

Opens the floating window and relative buffer

M.close#


function M.close() ->  nil

Closes the floating window

M.set_content#


function M.set_content(str: string[]) ->  nil

@param str - A list of strings

Updates the whole content to the given list of strings

M.set_line#


function M.set_line(
  line: integer,
  str: string[]
) ->  nil

@param line - The index of the line which needs updating

@param str - The new line string

Updates the given single line with the provided new one

M.set_title#


function M.set_title(str: string) ->  nil

@param str - The title string

Sets the title of the dialog

M.set_lines#


function M.set_lines(
  start: integer,
  end_: integer,
  str: string[]
) ->  nil

@param start - The start of the replacement

@param end_ - The end of the replacement

@param str - The list of strings which will serve as a replacement

Updates a list of lines between start and end

M.lock#


function M.lock() ->  nil

Locks the floating window buffer

M.unlock#


function M.unlock() ->  nil

Unlocks the floating window buffer

fields#


M.config#


M.config: table

Configuration for the popup floating window

M.buf#


M.buf : nil

The current buffer of the floating window

M.buflen#


M.buflen: integer = 1

M.win#


M.win : nil

The current floating window pointer

M.title#


M.title: string = "Package Management"

M.width#


M.width : integer

M.height#


M.height : integer