╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ main_wasm.zig ────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
242 fn setTextInputValue(focus_id: u32, bytes: []const u8) !void { 243 const root_ptr = if (root) |*r| r else return error.NotStarted; 244 const root_focus = root_ptr.getFocus(); 245 const child = root_focus.children.get(focus_id) orelse return error.UnknownFocusId; 246 switch (child.focus.kind) { 247 .text_input, .text_input_password => {}, 248 else => return error.NotATextInput, 249 } 250 const ti = session.text_inputs.get(focus_id) orelse return error.UnknownFocusId; 251 try ti.setContent(allocator, bytes); 252 // mirror the TTY behavior in Login.View.input: editing an input clears 253 // the stale failure flag so the "(invalid)" label doesn't linger after 254 // the user has typed a correction 255 session.data.login_failure = null; 256 } 257