- [ ] should Efallthrough be an exception?
- [ ] Print error name when there is a python error
- [ ] edlib.log can crash if there are '%' if the buffer.
-- [ ] expose rexel constants
+- [X] expose rexel constants
- [ ] report error if release mark which isn't ours.
- [X] create a library of support functions like doc_next, doc_prev etc.
- [ ] Log loading of modules - Can I provide version info?
};
#include "core.h"
#include "misc.h"
+#include "rexel.h"
#define SAFE_CI {.key=safe_cast NULL,\
.home=safe_cast NULL,\
PyModule_AddIntMacro(m, TIME_IDLE);
PyModule_AddIntMacro(m, TIME_REFRESH);
+ PyModule_AddIntMacro(m, RXL_ANCHORED);
+ PyModule_AddIntMacro(m, RXL_BACKTRACK);
+
+
PyModule_AddIntConstant(m, "WEOF", 0x1FFFFF);
call_comm("global-set-command", ed, &python_load, 0, NULL, "python-load");
call_comm("global-set-command", ed, &python_load_module,
except edlib.commandfailed:
focus.call("Message", "Not on a diff hunk - no '@@' line")
return 1
- cmd = focus.call("make-search", ptn, 3, ret='comm')
+ cmd = focus.call("make-search", ptn,
+ edlib.RXL_ANCHORED|edlib.RXL_BACKTRACK, ret='comm')
m2 = m.dup()
focus.call("doc:content", m2, cmd)
f = cmd("getcapture", "len", focus, 1)-1
edlib.Pane.__init__(self, focus)
self.vars = {}
self.varcnt = 0
- self.getvar = focus.call("make-search", "> ([a-z0-9]+) = ", 3, ret='comm')
+ self.getvar = focus.call("make-search", "> ([a-z0-9]+) = ",
+ edlib.RXL_ANCHORED|edlib.RXL_BACKTRACK,
+ ret='comm')
def handle_enter(self, key, focus, mark, **a):
"handle-list/K:Enter/K:M:Enter"
if c and c == '\n':
c = focus.following(m)
if c and c == '>':
- self.getvar("reinit", focus, 3)
+ self.getvar("reinit", focus,
+ edlib.RXL_ANCHORED | edlib.RXL_BACKTRACK)
focus.call("doc:content", m.dup(), self.getvar)
nm = self.getvar("interp", focus, "\\1", ret='str')
# replace this line