Merge branch 'chat-safe-tab' (#2053)

* origin/chat-safe-tab:
  chat: give terminal bell on tab in an empty buffer
  chat: don't crash on tab in an empty buffer

Signed-off-by: Jared Tobin <jared@tlon.io>
This commit is contained in:
Jared Tobin 2019-12-07 17:03:44 +08:00
commit fa4544406e
No known key found for this signature in database
GPG Key ID: 0E4647D58F8A69E4

View File

@ -379,8 +379,12 @@
++ tab
|= pos=@ud
^- (quip card state)
?. =(';' (snag 0 buf.state.cli))
[~ all-state]
?: ?| =(~ buf.state.cli)
!=(';' -.buf.state.cli)
==
:_ all-state
[(effect:sh-out [%bel ~]) ~]
::
=+ (get-id:auto pos (tufa buf.state.cli))
=/ needle=term
(fall id '')
@ -398,7 +402,7 @@
=? moves ?=(^ options)
[(tab:sh-out options) moves]
=| fxs=(list sole-effect:sole-sur)
|-
|- ^- (quip card state)
?~ to-send
[(flop moves) all-state]
=^ char state.cli