Textadept
- Home |
- Download |
- Lua API |
- Source |
- Language Modules |
- Stats |
- Wiki |
- Mailing List
view
The currently focused view.
It also represents the structure of any view table in _G._VIEWS
.
Fields
size
(number)
The position of the split resizer (if this view is part of a split view).
Functions
view:goto_buffer
(n, relative)
Goes to the specified buffer in the indexed view.
Generates BUFFER_BEFORE_SWITCH
and BUFFER_AFTER_SWITCH
events.
Parameters:
n
: A relative or absolute buffer index. An absolute index of-1
goes to the last buffer.relative
: Flag indicating ifn
is a relative index or not. The default value isfalse
.
view:split
(vertical)
Splits the indexed view vertically or horizontally and focuses the new view.
Parameters:
vertical
: Flag indicating a vertical split. The default value isfalse
for horizontal.
Return:
- old view and new view tables.
view:unsplit
()
Unsplits the indexed view if possible.
Return:
- boolean if the view was unsplit or not.
Tables
buffer
The buffer this view contains. (Read-only)