Class ui.Viewer

A viewer widget.

This widget doesn’t currently expose many exciting properties and methods. You can use ui.Panel.bind and :command, though.

Properties

ui.Viewer.filename r The filename associated with the buffer.
ui.Viewer.top_line r The number of the first line displayed.


Properties

ui.Viewer.filename r
The filename associated with the buffer.

Returns nil if no filename is associated with the buffer (e.g., if the data comes from a pipe).

ui.Viewer.top_line r

The number of the first line displayed.

Example:

-- Launches the editor with F4.

ui.Viewer.bind("f4", function(vwr)
  mc.edit(
    abortive(vwr.filename, T"You cannot edit a pipe!"),
    vwr.top_line
  )
end)

-- See a more complete implementation at snippets/viewer_edit.lua.
generated by LDoc 1.4.3 Last updated 2016-08-23 17:29:40