diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-02 14:03:36 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-02 14:03:36 -0500 |
| commit | fe33ae88d3610eceeb79d5ecb2729aa1a6e81828 (patch) | |
| tree | 323cfed94898ce9d225809c9a89da1d7f1227521 /client/window/window.go | |
| parent | 8c4e3c81890f26f056eff7b3344f23fed4c1d970 (diff) | |
put default window functionality in concrete type
Diffstat (limited to 'client/window/window.go')
| -rw-r--r-- | client/window/window.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/client/window/window.go b/client/window/window.go index ba72026..014bb7a 100644 --- a/client/window/window.go +++ b/client/window/window.go @@ -47,3 +47,26 @@ func (wc *WindowCache) Evict(l Location) { func (wc *WindowCache) Get(l Location) Window { return wc.windows[l] } + +type DefaultWindow struct { + In tui.TextInput + Buf buffer.Buffer +} + +func (dw *DefaultWindow) Location() Location { + return nil +} + +func (w *DefaultWindow) Buffer() *buffer.Buffer { + return &w.Buf +} + +func (dw *DefaultWindow) Kill() {} + +func (w *DefaultWindow) Input() *tui.TextInput { + return &w.In +} + +func (w *DefaultWindow) Send(text string) {} + +func (w *DefaultWindow) ShowStatusLine() {} |
