diff options
Diffstat (limited to 'client/window')
| -rw-r--r-- | client/window/window.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/client/window/window.go b/client/window/window.go index 80777cc..c768da9 100644 --- a/client/window/window.go +++ b/client/window/window.go @@ -15,6 +15,7 @@ type Window interface { Kill() Buffer() *buffer.Buffer ShowComposingReply() + OnNavigate() } type Prompt interface { @@ -49,6 +50,12 @@ func (wc *WindowCache) Get(l Location) Window { return wc.windows[l] } +func (wc *WindowCache) ForAll(do func(Window)) { + for _, window := range wc.windows { + do(window) + } +} + type DefaultWindow struct { In tui.TextInput Buf buffer.Buffer @@ -73,3 +80,5 @@ func (w *DefaultWindow) Send(text string) {} func (w *DefaultWindow) ShowStatusLine() {} func (w *DefaultWindow) ShowComposingReply() {} + +func (w *DefaultWindow) OnNavigate() {} |
