* registrar: doesnt match open windows when new file created and is then opened for edit or line number
* registrar: group by hostname or group env var in registrar
-* tide: gap buffer does not handle UTF-8 currently
* registrar: should cleanup invalid windows
+* tide: gap buffer does not handle UTF-8 currently
+* tide: search should not warp pointer when nothing found
## BACKLOG
View* win_view(WinRegion id);
Buf* win_buf(WinRegion id);
bool win_keymodsset(int mask);
+void win_setln(int line_num);
if (row->cols[i].off == view->buffer.selection.end) {
csr_drawn = draw_csr(x, view, fg, fheight, posx, y, csr_drawn);
if (csrsync) {
- XWarpPointer(x->display, x->self, x->self, 0, 0, x->width, x->height, posx-4, y + fheight/2);
+ XWarpPointer(x->display, None, x->self, 0, 0, x->width, x->height, posx-4, y + fheight/2);
csrsync = false;
}
}
continue;
xresize(x, &ev);
} while (ev.type != MapNotify);
+ XWarpPointer(x->display, None, x->self, 0, 0, x->width, x->height, x->width/2, x->height/2);
}
XftFont* x11_font_load(XConf* x, char* name) {
if ((Atom)(e->xclient.data.l[0]) == XInternAtom(x->display, "WM_DELETE_WINDOW", False))
win_quit();
else if (e->xclient.message_type == XInternAtom(x->display, "GOTO", False))
- view_setln(win_view(EDIT), e->xclient.data.l[0]);
+ win_setln(e->xclient.data.l[0]);
}
static void xupdate(Job* job) {
return ((KeyBtnState & mask) == mask);
}
+void win_setln(int line_num) {
+ view_setln(win_view(EDIT), line_num);
+ SyncMouse = true;
+}
+
/* Tag/Cmd Execution
******************************************************************************/
static Tag* tag_lookup(char* cmd) {
static void jump_to(char* arg) {
if (arg) {
size_t line = strtoul(arg, NULL, 0);
- if (line) {
- view_setln(win_view(EDIT), line);
- SyncMouse = true;
- } else {
+ if (line)
+ win_setln(line);
+ else
pick_symbol(arg);
- }
}
}
char* path = realpath(*argv, NULL);
if (!path) path = strdup(*argv); /* if file doesnt exist, use the original name */
view_init(win_view(EDIT), path);
- view_setln(win_view(EDIT), line_num);
+ win_setln(line_num);
win_title(path);
win_prop_set("FILE", "file", path);
free(path);