* tide: Ctrl+D should not pass tag name as arg when executing tag commands
* tide: should re-register with the registrar when a new registrar is launched
* tide: Line - Get the current line number(s) containing the selection
-* tide: Kill - add a 'Kill' tag to kill the most recent job
* tide: gap buffer does not handle UTF-8 currently
## BACKLOG
void (*readfn)(Job *job);
};
+Job* job_list(void);
+void job_kill(Job* job);
bool job_poll(int ms);
void job_spawn(int fd, jobfn_t readfn, jobfn_t writefn, void* data);
void job_start(char** cmd, char* data, size_t ndata, View* dest);
} Tag;
char* ARGV0;
-static Tag Builtins[16];
+static Tag Builtins[17];
static Time Now;
static struct XConf X;
static int KeyBtnState;
exec(cmd);
}
+static void tag_kill(char* cmd) {
+ (void)cmd;
+ Job* job = job_list();
+ if (job && job->fd != ConnectionNumber(X.display))
+ job_kill(job);
+}
+
/* Main Routine
******************************************************************************/
-static Tag Builtins[16] = {
+static Tag Builtins[17] = {
{ .tag = "Cut", .action = cut },
{ .tag = "Copy", .action = copy },
{ .tag = "Del", .action = quit },
{ .tag = "Tabs", .action = tabs },
{ .tag = "Undo", .action = tag_undo },
{ .tag = "Font", .action = win_font },
+ { .tag = "Kill", .action = tag_kill },
{ .tag = NULL, .action = NULL }
};