return off;
}
-size_t buf_bow(Buf* buf, size_t off) {
- for (; risword(buf_getrat(buf, off-1)); off--);
- return off;
-}
-
-size_t buf_eow(Buf* buf, size_t off) {
- for (; risword(buf_getrat(buf, off)); off++);
- return off;
-}
-
void buf_selline(Buf* buf) {
Sel sel = getsel(buf);
sel.beg = buf_bol(buf, sel.end);
selblock(buf, '[', ']');
else if (r == '{' || r == '}')
selblock(buf, '{', '}');
+ else if (r == '<' || r == '>')
+ selblock(buf, '<', '>');
else if (buf->selection.end == bol || r == '\n')
buf_selline(buf);
else if (risword(r))
if (JobFds[njobs].events) njobs++;
}
/* Poll until a job is ready, call the functions based on events */
- //printf("poll(..., %d, %d)", njobs, ms);
long ret = poll(JobFds, njobs, ms);
- //printf(" => %ld\n", ret);
for (int i = 0; i < njobs; i++)
job_process(JobFds[i].fd, JobFds[i].revents);
/* reap zombie processes */
execcmd[2] = cmd;
/* get the selection that the command will operate on */
- if (op && op != '<' && op != '!' && 0 == view_selsize(win_view(EDIT)))
+ if (op && op != '<' && op != '!' && !view_selsize(win_view(EDIT)))
view_selectall(win_view(EDIT));
char* input = view_getstr(win_view(EDIT));
size_t len = (input ? strlen(input) : 0);