Documentation ¶
Index ¶
- func SetStatusInfoFnLua(fn string)
- type BWindow
- type BufWindow
- func (w *BufWindow) Bottomline() int
- func (w *BufWindow) Clear()
- func (w *BufWindow) Display()
- func (w *BufWindow) GetView() *View
- func (w *BufWindow) IsActive() bool
- func (w *BufWindow) LocFromVisual(svloc buffer.Loc) buffer.Loc
- func (w *BufWindow) Relocate() bool
- func (w *BufWindow) Resize(width, height int)
- func (w *BufWindow) SetActive(b bool)
- func (w *BufWindow) SetBuffer(b *buffer.Buffer)
- func (w *BufWindow) SetView(view *View)
- type InfoWindow
- func (i *InfoWindow) Clear()
- func (i *InfoWindow) Display()
- func (i *InfoWindow) GetView() *View
- func (i *InfoWindow) IsActive() bool
- func (i *InfoWindow) LocFromVisual(vloc buffer.Loc) buffer.Loc
- func (i *InfoWindow) Relocate() bool
- func (i *InfoWindow) Resize(w, h int)
- func (i *InfoWindow) SetActive(b bool)
- func (i *InfoWindow) SetBuffer(b *buffer.Buffer)
- func (i *InfoWindow) SetView(v *View)
- type StatusLine
- type TabWindow
- type TermWindow
- func (w *TermWindow) Clear()
- func (w *TermWindow) Display()
- func (w *TermWindow) GetView() *View
- func (w *TermWindow) IsActive() bool
- func (w *TermWindow) LocFromVisual(vloc buffer.Loc) buffer.Loc
- func (w *TermWindow) Relocate() bool
- func (w *TermWindow) Resize(width, height int)
- func (w *TermWindow) SetActive(b bool)
- func (w *TermWindow) SetView(v *View)
- type UIWindow
- type View
- type Window
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetStatusInfoFnLua ¶
func SetStatusInfoFnLua(fn string)
Types ¶
type BufWindow ¶
type BufWindow struct { *View // Buffer being shown in this window Buf *buffer.Buffer // contains filtered or unexported fields }
The BufWindow provides a way of displaying a certain section of a buffer
func NewBufWindow ¶
NewBufWindow creates a new window at a location in the screen with a width and height
func (*BufWindow) Bottomline ¶
Bottomline returns the line number of the lowest line in the view You might think that this is obviously just v.StartLine + v.Height but if softwrap is enabled things get complicated since one buffer line can take up multiple lines in the view
func (*BufWindow) Clear ¶
func (w *BufWindow) Clear()
Clear resets all cells in this window to the default style
func (*BufWindow) Display ¶
func (w *BufWindow) Display()
Display displays the buffer and the statusline
func (*BufWindow) LocFromVisual ¶
LocFromVisual takes a visual location (x and y position) and returns the position in the buffer corresponding to the visual location Computing the buffer location requires essentially drawing the entire screen to account for complications like softwrap, wide characters, and horizontal scrolling If the requested position does not correspond to a buffer location it returns the nearest position
type InfoWindow ¶
func NewInfoWindow ¶
func NewInfoWindow(b *info.InfoBuf) *InfoWindow
func (*InfoWindow) Clear ¶
func (i *InfoWindow) Clear()
func (*InfoWindow) Display ¶
func (i *InfoWindow) Display()
func (*InfoWindow) GetView ¶
func (i *InfoWindow) GetView() *View
func (*InfoWindow) IsActive ¶
func (i *InfoWindow) IsActive() bool
func (*InfoWindow) LocFromVisual ¶
func (i *InfoWindow) LocFromVisual(vloc buffer.Loc) buffer.Loc
func (*InfoWindow) Relocate ¶
func (i *InfoWindow) Relocate() bool
func (*InfoWindow) Resize ¶
func (i *InfoWindow) Resize(w, h int)
func (*InfoWindow) SetActive ¶
func (i *InfoWindow) SetActive(b bool)
func (*InfoWindow) SetBuffer ¶
func (i *InfoWindow) SetBuffer(b *buffer.Buffer)
func (*InfoWindow) SetView ¶
func (i *InfoWindow) SetView(v *View)
type StatusLine ¶
type StatusLine struct { Info map[string]func(*buffer.Buffer) string // contains filtered or unexported fields }
StatusLine represents the information line at the bottom of each window It gives information such as filename, whether the file has been modified, filetype, cursor location
func NewStatusLine ¶
func NewStatusLine(win *BufWindow) *StatusLine
NewStatusLine returns a statusline bound to a window
func (*StatusLine) Display ¶
func (s *StatusLine) Display()
Display draws the statusline to the screen
func (*StatusLine) FindOpt ¶
func (s *StatusLine) FindOpt(opt string) interface{}
FindOpt finds a given option in the current buffer's settings
type TabWindow ¶
func NewTabWindow ¶
type TermWindow ¶
func NewTermWindow ¶
func NewTermWindow(x, y, w, h int, term *shell.Terminal) *TermWindow
func (*TermWindow) Clear ¶
func (w *TermWindow) Clear()
func (*TermWindow) Display ¶
func (w *TermWindow) Display()
Display displays this terminal in a view
func (*TermWindow) GetView ¶
func (w *TermWindow) GetView() *View
func (*TermWindow) IsActive ¶
func (w *TermWindow) IsActive() bool
func (*TermWindow) LocFromVisual ¶
func (w *TermWindow) LocFromVisual(vloc buffer.Loc) buffer.Loc
func (*TermWindow) Relocate ¶
func (w *TermWindow) Relocate() bool
func (*TermWindow) Resize ¶
func (w *TermWindow) Resize(width, height int)
Resize informs the terminal of a resize event
func (*TermWindow) SetActive ¶
func (w *TermWindow) SetActive(b bool)
func (*TermWindow) SetView ¶
func (w *TermWindow) SetView(v *View)
type UIWindow ¶
type UIWindow struct {
// contains filtered or unexported fields
}
func NewUIWindow ¶
type View ¶
type View struct {
X, Y int // X,Y location of the view
Width, Height int // Width and height of the view
// Start line and start column of the view (vertical/horizontal scroll)
// note that since the starting column of every line is different if the view
// is scrolled, StartCol is a visual index (will be the same for every line)
StartLine, StartCol int
}