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