feat: update git status on focus_in events
This commit is contained in:
parent
488efd4605
commit
cf6c9455c7
1 changed files with 7 additions and 0 deletions
|
@ -90,10 +90,17 @@ fn process_event(self: *Self, m: tp.message) error{Exit}!bool {
|
|||
fn receive_git(self: *Self, _: tp.pid_ref, m: tp.message) MessageFilter.Error!bool {
|
||||
return if (try match(m.buf, .{ "git", more }))
|
||||
self.process_git(m)
|
||||
else if (try match(m.buf, .{"focus_in"}))
|
||||
self.process_focus_in()
|
||||
else
|
||||
false;
|
||||
}
|
||||
|
||||
fn process_focus_in(self: *Self) MessageFilter.Error!bool {
|
||||
self.refresh_git_status();
|
||||
return false;
|
||||
}
|
||||
|
||||
fn process_git(self: *Self, m: tp.message) MessageFilter.Error!bool {
|
||||
var value: []const u8 = undefined;
|
||||
if (try match(m.buf, .{ any, any, "workspace_path", null_ })) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue