mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-15 21:37:09 +09:00
Add some commands
This commit is contained in:
@@ -41,6 +41,10 @@ func NewBufWindow(x, y, width, height int, buf *buffer.Buffer) *BufWindow {
|
||||
return w
|
||||
}
|
||||
|
||||
func (w *BufWindow) SetBuffer(b *buffer.Buffer) {
|
||||
w.Buf = b
|
||||
}
|
||||
|
||||
func (v *View) GetView() *View {
|
||||
return v
|
||||
}
|
||||
|
||||
@@ -53,6 +53,10 @@ func (i *InfoWindow) Resize(w, h int) {
|
||||
i.y = h
|
||||
}
|
||||
|
||||
func (i *InfoWindow) SetBuffer(b *buffer.Buffer) {
|
||||
i.InfoBuf.Buffer = b
|
||||
}
|
||||
|
||||
// func (i *InfoWindow) YesNoPrompt() (bool, bool) {
|
||||
// for {
|
||||
// i.Clear()
|
||||
|
||||
@@ -24,3 +24,8 @@ type Window interface {
|
||||
Resize(w, h int)
|
||||
SetActive(b bool)
|
||||
}
|
||||
|
||||
type BWindow interface {
|
||||
Window
|
||||
SetBuffer(b *buffer.Buffer)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user