Compare commits

..

No commits in common. "36e6d6a69fedc21232aba41275056298d502412e" and "47aefb6f2445392e5816691287c0366f6888c1b9" have entirely different histories.

6 changed files with 1 additions and 35 deletions

View file

@ -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 },
},
});

View file

@ -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

View file

@ -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"],

View file

@ -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();

View file

@ -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);

View file

@ -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();