diff --git a/build.zig b/build.zig index 444221e..7f1d998 100644 --- a/build.zig +++ b/build.zig @@ -440,7 +440,6 @@ pub fn build_exe( .{ .name = "thespian", .module = thespian_mod }, .{ .name = "cbor", .module = cbor_mod }, .{ .name = "log", .module = log_mod }, - .{ .name = "bin_path", .module = bin_path_mod }, }, }); diff --git a/contrib/test_race.sh b/contrib/test_race.sh deleted file mode 100755 index a2a4b09..0000000 --- a/contrib/test_race.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -e - -if [ "$1" == "--build" ]; then - shift - echo "building..." - zig build -freference-trace --prominent-compile-errors -fi - -for i in {1..60}; do - echo "running $i ..." - flow --exec quit "$@" || exit 1 -done diff --git a/src/keybind/builtin/flow.json b/src/keybind/builtin/flow.json index 4de41a2..29dae9e 100644 --- a/src/keybind/builtin/flow.json +++ b/src/keybind/builtin/flow.json @@ -157,7 +157,6 @@ ["f9", "theme_prev"], ["f10", "theme_next"], ["f11", "toggle_panel"], - ["shift+f11", "toggle_highlight_columns"], ["ctrl+f11", "toggle_inspector_view"], ["f12", "goto_definition"], ["f34", "toggle_whitespace_mode"], diff --git a/src/renderer/vaxis/renderer.zig b/src/renderer/vaxis/renderer.zig index 11b99dd..1b11617 100644 --- a/src/renderer/vaxis/renderer.zig +++ b/src/renderer/vaxis/renderer.zig @@ -95,16 +95,13 @@ pub fn deinit(self: *Self) void { self.event_buffer.deinit(); } -var in_panic: std.atomic.Value(bool) = .init(false); var panic_cleanup: ?struct { allocator: std.mem.Allocator, tty: *vaxis.Tty, vx: *vaxis.Vaxis, } = null; - pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, ret_addr: ?usize) noreturn { _ = error_return_trace; // TODO: what to do with this in zig-0.14? - in_panic.store(true, .release); const cleanup = panic_cleanup; panic_cleanup = null; if (cleanup) |self| { @@ -114,10 +111,6 @@ pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, ret_ return std.debug.defaultPanic(msg, ret_addr orelse @returnAddress()); } -pub fn panic_in_progress() bool { - return in_panic.load(.acquire); -} - pub fn run(self: *Self) Error!void { self.vx.sgr = .legacy; self.vx.conpty_hacks = true; @@ -137,7 +130,6 @@ pub fn run(self: *Self) Error!void { } pub fn render(self: *Self) !void { - if (in_panic.load(.acquire)) return; var bufferedWriter = self.tty.bufferedWriter(); try self.vx.render(bufferedWriter.writer().any()); try bufferedWriter.flush(); diff --git a/src/ripgrep.zig b/src/ripgrep.zig index 102fcaa..c99b625 100644 --- a/src/ripgrep.zig +++ b/src/ripgrep.zig @@ -126,7 +126,6 @@ const Process = struct { "--json", "--smart-case", self.query, - "./.", // never search stdin }); self.sp = tp.subprocess.init(self.allocator, args, module_name, self.stdin_behavior) catch |e| return tp.exit_error(e, @errorReturnTrace()); tp.receive(&self.receiver); diff --git a/src/tui/tui.zig b/src/tui/tui.zig index 607c037..083e715 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -24,7 +24,6 @@ allocator: Allocator, rdr_: renderer, config_: @import("config"), highlight_columns_: []u16, -highlight_columns_configured: []u16, frame_time: usize, // in microseconds frame_clock: tp.metronome, frame_clock_running: bool = false, @@ -131,14 +130,12 @@ fn init(allocator: Allocator) InitError!*Self { idx += 1; break :blk idx; }; - const highlight_columns__ = try allocator.alloc(u16, hl_cols); var self = try allocator.create(Self); self.* = .{ .allocator = allocator, .config_ = conf, - .highlight_columns_ = highlight_columns__, - .highlight_columns_configured = highlight_columns__, + .highlight_columns_ = try allocator.alloc(u16, hl_cols), .rdr_ = try renderer.init(allocator, self, tp.env.get().is("no-alternate"), dispatch_initialized), .frame_time = frame_time, .frame_clock = frame_clock, @@ -224,7 +221,6 @@ fn init_delayed(self: *Self) command.Result { } fn deinit(self: *Self) void { - self.allocator.free(self.highlight_columns_configured); if (self.mouse_idle_timer) |*t| { t.cancel() catch {}; t.deinit(); @@ -792,12 +788,6 @@ const cmds = struct { } pub const toggle_whitespace_mode_meta: Meta = .{ .description = "Next whitespace mode" }; - pub fn toggle_highlight_columns(self: *Self, _: Ctx) Result { - defer self.logger.print("highlight columns {s}", .{if (self.highlight_columns_.len > 0) "enabled" else "disabled"}); - self.highlight_columns_ = if (self.highlight_columns_.len > 0) &.{} else self.highlight_columns_configured; - } - pub const toggle_highlight_columns_meta: Meta = .{ .description = "Toggle highlight columns" }; - pub fn toggle_input_mode(self: *Self, _: Ctx) Result { var it = std.mem.splitScalar(u8, self.config_.input_mode, '/'); self.config_.input_mode = it.first();