summaryrefslogtreecommitdiff
path: root/src/echo.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/echo.zig')
-rw-r--r--src/echo.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/echo.zig b/src/echo.zig
index 8c196816..3d2ee060 100644
--- a/src/echo.zig
+++ b/src/echo.zig
@@ -445,7 +445,7 @@ pub const Echo = struct {
/// characters predicted and the cursor after them.
pub fn paint(e: *const Echo, p: *const Pardes, s: *Surface, pane: *const Pane, id: usize, tx: u16, tw: u16, body_y: u16, body_h: u16, active: bool) void {
if (e.n == 0 and e.cursor == null) return;
- if (id != e.pane or pane.serial != e.serial or p.view != e.view or pane.body.mode != .tty) return;
+ if (id != e.pane or pane.serial != e.serial or p.live != e.view or pane.body.mode != .tty) return;
if (!e.visible(p)) return;
const state = pane.terminal orelse return;
const sb = state.vt.screens.active.pages.scrollbar();
@@ -538,10 +538,10 @@ fn atPrompt(pane: *const Pane) bool {
/// The terminal view `view`'s keys go to, in tty mode: none when they go
/// elsewhere (a prompt, a header, window mode, another pane).
fn keyboardPane(c: *const Pardes, view: u8) ?usize {
- const live = c.view == view;
- const part = if (live) null else &(c.parked[view] orelse return null).view;
- const id = if (part) |v| v.active else c.active;
- if (if (part) |v| v.window_pick != null or v.header != null else c.window_pick != null or c.header != null) return null;
+ const live = c.live == view;
+ const v = &(c.views[view] orelse return null);
+ const id = v.active;
+ if (v.window_pick != null or v.header != null) return null;
const pane = c.panes[id] orelse return null;
if (!pane.isTerminal() or pane.terminal == null or pane.prompt != .none) return null;
const mode = if (live) pane.body.mode else pane.pv[view].body.mode;