Current priorities
------------------
-All of these, except Trivial, are references to todo items elsewhere in
+All of these, except Triage, are references to todo items elsewhere in
the file.
-### Trivial
+### Triage
+
+- [ ] If a pane with shift-disabled has cursor past the right edge, the
+ cursor gets positioned outside the window
+- [ ] when find-file dialog shifts left, it doesn't shift back until
+ cursor is v.close to left, even when the rest of the line is blank
+- [ ] line-count in make output is weird. Second line can be thousands
+- [ ] Make sometimes doesn't follow output, though usually it does
+- [ ] If dynamic-complete only finds one completion, does it still want
+ a menu?
+- [ ] When merge makes a change, highlight the new content.
+- [ ] Review the options for editing a merge - it doesn't always do what
+ I want. Maybe have a menu of choices to remind me
+- [ ] cursor is sometimes off-screen when it shouldn't be. I don't know
+ what cause this yet, but I will try to remember to take notes next
+ time.
+ When seaching backwards and result is just above display, the
+ result doesn't get shown. Sometimes.
+- [ ] visiting a new file from a 44 popup is weird.
+- [ ] search in history always finds a new history line. It doesn't
+ check if new patterns still matches this line.
+- [ ] in notmuch cursor should go to search result when changing
+ messages.
+- [ ] menu for address completions in email-compose
- [X] give every pane a link to root/editor main and use that
instead of statics. Then maybe times_up() can use pane_too_long()
#include <wctype.h>
#include <ctype.h>
#include <stdio.h>
+
+#define PANE_DATA_TYPE struct email_view
+
#include "core.h"
#include "misc.h"
+struct email_view {
+ int parts;
+ char *invis safe;
+};
+
+#include "core-pane.h"
+
static inline bool is_orig(int p)
{
return p >= 0 && p % 3 == 0;
return Efail;
}
-struct email_view {
- int parts;
- char *invis safe;
-};
-
DEF_CMD(email_view_free)
{
- struct email_view *evi = ci->home->data;
+ struct email_view *evi = &ci->home->data;
free(evi->invis);
- unalloc(evi, pane);
return 1;
}
int forward, int move)
{
struct pane *p = home;
- struct email_view *evi = p->data;
+ struct email_view *evi = &p->data;
wint_t ret;
int n = -1;
* what is invisible, marking all spacers as invisible
*/
struct pane *p = ci->home;
- struct email_view *evi = p->data;
+ struct email_view *evi = &p->data;
char *invis2 = strsave(p, evi->invis);
int i;
DEF_CMD(email_set_ref)
{
struct pane *p = ci->home;
- struct email_view *evi = p->data;
+ struct email_view *evi = &p->data;
if (!ci->mark)
return Enoarg;
DEF_CMD(email_step_part)
{
struct pane *p = ci->home;
- struct email_view *evi = p->data;
+ struct email_view *evi = &p->data;
if (!ci->mark)
return Enoarg;
{
int p;
char *v;
- struct email_view *evi = ci->home->data;
+ struct email_view *evi = &ci->home->data;
if (!ci->str || !ci->mark)
return Enoarg;
DEF_CMD(email_view_set_attr)
{
int p;
- struct email_view *evi = ci->home->data;
+ struct email_view *evi = &ci->home->data;
if (!ci->str || !ci->mark)
return Enoarg;
if (n <= 0 || n > 1000 )
return Einval;
- alloc(evi, pane);
+ p = pane_register(ci->focus, 0, &email_view_handle.c);
+ if (!p)
+ return Efail;
+ evi = &p->data;
evi->parts = n;
evi->invis = calloc(n+1, sizeof(char));
for (i = 0; i < n; i++) {
/* Everything else default to invisible */
evi->invis[i] = 'i';
}
- p = pane_register(ci->focus, 0, &email_view_handle.c, evi);
- if (!p) {
- free(evi);
- return Efail;
- }
p2 = call_ret(pane, "attach-line-count", p);
if (p2)
p = p2;