this repo has no description
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

update vaxis, use listview cursor

+8 -14
+2 -2
build.zig.zon
··· 7 7 .hash = "1220affeb3fe37ef09411b5a213b5fdf9bb6568e9913bade204694648983a8b2776d", 8 8 }, 9 9 .vaxis = .{ 10 - .url = "git+https://github.com/rockorager/libvaxis#89b44f541f6dbea892a4c71e4076bdd8d3823ef5", 11 - .hash = "1220fe082e8b390030fd3a6eeaf54b947b996ab638f05cf9a6826832431ebb51538c", 10 + .url = "git+https://github.com/rockorager/libvaxis#cf7c2da082a160b0f21d380fedae7f0f7fe7efbd", 11 + .hash = "122038e68a66cd160c494430559346a4d660732719dd1fa1f1f25d18de22b6974104", 12 12 }, 13 13 .zeit = .{ 14 14 .url = "git+https://github.com/rockorager/zeit?ref=main#d943bc4bfe9e18490460dfdd64f48e997065eba8",
+5 -11
src/completer.zig
··· 37 37 }; 38 38 } 39 39 40 - fn getWidget(ptr: *const anyopaque, idx: usize, cursor: usize) ?vxfw.Widget { 41 - const self: *Completer = @constCast(@ptrCast(@alignCast(ptr))); 40 + fn getWidget(ptr: *const anyopaque, idx: usize, _: usize) ?vxfw.Widget { 41 + const self: *const Completer = @ptrCast(@alignCast(ptr)); 42 42 if (idx < self.options.items.len) { 43 43 const item = &self.options.items[idx]; 44 - if (idx == cursor) { 45 - item.style = selected; 46 - } else { 47 - item.style = style; 48 - } 49 44 return item.widget(); 50 45 } 51 46 return null; ··· 57 52 .userdata = self, 58 53 .buildFn = Completer.getWidget, 59 54 } }, 60 - .draw_cursor = false, 61 55 }; 62 56 self.start_idx = if (std.mem.lastIndexOfScalar(u8, line, ' ')) |idx| idx + 1 else 0; 63 57 self.word = line[self.start_idx..]; ··· 160 154 for (commands) |cmd| { 161 155 if (std.mem.eql(u8, cmd, "lua_function")) continue; 162 156 if (std.ascii.startsWithIgnoreCase(cmd, self.word[1..])) { 163 - try self.options.append(.{ .text = cmd }); 157 + try self.options.append(.{ .text = cmd, .softwrap = false }); 164 158 } 165 159 } 166 160 var iter = Command.user_commands.keyIterator(); 167 161 while (iter.next()) |cmd| { 168 162 if (std.ascii.startsWithIgnoreCase(cmd.*, self.word[1..])) { 169 - try self.options.append(.{ .text = cmd.* }); 163 + try self.options.append(.{ .text = cmd.*, .softwrap = false }); 170 164 } 171 165 } 172 166 self.list_view.cursor = @intCast(self.options.items.len -| 1); ··· 181 175 182 176 for (keys, values) |shortcode, glyph| { 183 177 if (std.mem.indexOf(u8, shortcode, self.word[1..])) |_| 184 - try self.options.append(.{ .text = glyph }); 178 + try self.options.append(.{ .text = glyph, .softwrap = false }); 185 179 } 186 180 self.list_view.cursor = @intCast(self.options.items.len -| 1); 187 181 self.list_view.item_count = @intCast(self.options.items.len);
+1 -1
src/irc.zig
··· 605 605 606 606 if (self.completer_shown) { 607 607 const widest: u16 = @intCast(self.completer.widestMatch(ctx)); 608 - const completer_ctx = ctx.withConstraints(ctx.min, .{ .height = 10, .width = widest }); 608 + const completer_ctx = ctx.withConstraints(ctx.min, .{ .height = 10, .width = widest + 2 }); 609 609 const surface = try self.completer.list_view.draw(completer_ctx); 610 610 const height: u16 = @intCast(@min(10, self.completer.options.items.len)); 611 611 try children.append(.{