Compare commits
No commits in common. "2fd347d0eba169b2c750894913203bd714ec5100" and "720bb9515fe0be2013f6b58f42d6dc5fb0a1f3fa" have entirely different histories.
2fd347d0eb
...
720bb9515f
3 changed files with 7 additions and 11 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
.{
|
.{
|
||||||
.name = .flow,
|
.name = .flow,
|
||||||
.version = "0.6.0",
|
.version = "0.2.0",
|
||||||
.minimum_zig_version = "0.15.1",
|
.minimum_zig_version = "0.14.1",
|
||||||
.fingerprint = 0x52c0d670590aa80f,
|
.fingerprint = 0x52c0d670590aa80f,
|
||||||
|
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
|
|
|
||||||
|
|
@ -93,11 +93,9 @@ pub fn get(file_type_name: []const u8) !?@This() {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_config_file_path(allocator: std.mem.Allocator, file_type: []const u8) ![]u8 {
|
pub fn get_config_file_path(allocator: std.mem.Allocator, file_type: []const u8) ![]u8 {
|
||||||
const config_dir_path = try get_config_dir_path(allocator);
|
var stream: std.Io.Writer.Allocating = .initOwnedSlice(allocator, try get_config_dir_path(allocator));
|
||||||
var stream: std.Io.Writer.Allocating = .initOwnedSlice(allocator, config_dir_path);
|
|
||||||
defer stream.deinit();
|
defer stream.deinit();
|
||||||
const writer = &stream.writer;
|
const writer = &stream.writer;
|
||||||
writer.end = config_dir_path.len;
|
|
||||||
_ = try writer.writeAll(file_type);
|
_ = try writer.writeAll(file_type);
|
||||||
_ = try writer.writeAll(".conf");
|
_ = try writer.writeAll(".conf");
|
||||||
return stream.toOwnedSlice();
|
return stream.toOwnedSlice();
|
||||||
|
|
|
||||||
|
|
@ -562,14 +562,12 @@ const BindingSet = struct {
|
||||||
|
|
||||||
for (self.press.items) |binding| {
|
for (self.press.items) |binding| {
|
||||||
const cmd = binding.commands[0].command;
|
const cmd = binding.commands[0].command;
|
||||||
var end: usize = 0;
|
var hint: std.Io.Writer.Allocating = if (hints_map.get(cmd)) |previous|
|
||||||
var hint: std.Io.Writer.Allocating = if (hints_map.get(cmd)) |previous| blk: {
|
.initOwnedSlice(allocator, previous)
|
||||||
end = previous.len;
|
else
|
||||||
break :blk .initOwnedSlice(allocator, previous);
|
.init(allocator);
|
||||||
} else .init(allocator);
|
|
||||||
defer hint.deinit();
|
defer hint.deinit();
|
||||||
const writer = &hint.writer;
|
const writer = &hint.writer;
|
||||||
writer.end = end;
|
|
||||||
if (hint.written().len > 0) try writer.writeAll(", ");
|
if (hint.written().len > 0) try writer.writeAll(", ");
|
||||||
const count = binding.key_events.len;
|
const count = binding.key_events.len;
|
||||||
for (binding.key_events, 0..) |key_, n| {
|
for (binding.key_events, 0..) |key_, n| {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue