- [X] From start-of-file move to end, then up, then down.
Display jumps. Why?
- [ ] Add menubar menu with recent documents?
-- [ ] why does clicking on status line go to top-of-file?
+- [X] why does clicking on status line go to top-of-file?
- [ ] should Docs menu go on doc name in status bar?
- [X] search hangs when seeking "^( *)"
- [ ] selection-menu item to show git-commit from list of known git
Core features
-------------
+- [ ] If a pane wants to block mouse events from parents, as lib-view
+ does, it shouldn't need to catch all the combinations, or it
+ should be much easier
- [ ] gather memory usage stats per-pane and allow a dump
- [ ] show doc size in doc list - include undo size?
- [ ] Ensure all panes that should use "Free" properly, and find some
{
struct pane *p = ci->home;
struct view_data *vd = p->data;
+ struct pane *c = vd->child;
int mid = vd->scroll_bar_y;
int lh = vd->line_height;
int num;
cih = pane_mapxy(ci->focus, ci->home, ci->x, ci->y, False);
- if (cih.x >= vd->border_width)
+ if (ci->focus != p)
+ /* Event was in the child */
return Efallthrough;
+ if (!c)
+ return 1;
+ /* Ignore if not in scroll-bar, which it to left of child */
+ if (cih.y < c->y || // above child
+ cih.y >= c->y + c->h || // below child
+ cih.x >= c->x) // Not to right of child
+ return 1;
+
if (p->h <= 4)
- return Efallthrough;
+ /* scroll bar too small to be useful */
+ return 1;
scale = 100; /* 10% for small movements */
num = RPT_NUM(ci);
return 1;
}
+DEF_CMD(view_release)
+{
+ /* Make sure release doesn't go to parent if not in child */
+
+ if (ci->focus != ci->home)
+ /* Event was in the child */
+ return Efallthrough;
+ return 1;
+}
+
DEF_CMD(view_scroll)
{
if (strcmp(ci->key, "M:Press-4") == 0)
key_add(view_map, "M:Click-1", &view_click);
key_add(view_map, "M:Press-1", &view_click);
+ key_add(view_map, "M:Release-1", &view_release);
+ key_add(view_map, "M:DPress-1", &view_click);
+ key_add(view_map, "M:TPress-1", &view_click);
key_add(view_map, "M:Press-4", &view_scroll);
key_add(view_map, "M:Press-5", &view_scroll);
key_add(view_map, "Window:border", &view_border);