]> git.neil.brown.name Git - edlib.git/commitdiff
Remove any suggestion that num2 is significant for doc:render-line
authorNeilBrown <neil@brown.name>
Fri, 28 Apr 2023 23:29:20 +0000 (09:29 +1000)
committerNeilBrown <neil@brown.name>
Fri, 28 Apr 2023 23:29:57 +0000 (09:29 +1000)
render-line does doesn't use num2, only 'num'.

Signed-off-by: NeilBrown <neil@brown.name>
lib-markup.c
python/module-notmuch.py

index ae990e05c9b257fd27882ab4c244540109b41d86..d2328e0e60fad8a82ee297051ff4bdd243383b67 100644 (file)
@@ -272,7 +272,7 @@ static int want_vis_newline(struct attr_stack *as)
 DEF_CMD(render_line)
 {
        /* Render the line from 'mark' to the first '\n' or until
-        * 'num2' chars.
+        * 'num' chars.
         * Convert '<' to '<<' and if a char has the 'highlight' attribute,
         * include that between '<>'.
         */
@@ -318,7 +318,7 @@ DEF_CMD(render_line)
                return Efail;
        if ((attr = pane_mark_attr(focus, m, "markup:func")) != NULL) {
                /* An alternate function handles this line */
-               ret = call_comm(attr, focus, ci->comm2, o, m, NULL, ci->num2, pm);
+               ret = call_comm(attr, focus, ci->comm2, o, m, NULL, 0, pm);
                if (ret)
                        return ret;
        }
index b8ebee7f5c6c25c139c40ab18cff691078e008e0..79837a3cc9cf2f20bc54f4502bc06bc661c61f0f 100644 (file)
@@ -3493,7 +3493,7 @@ class notmuch_message_view(edlib.Pane):
                     comm2("cb", focus, mark, 0, "bg:"+bg, 102)
             return edlib.Efallthrough
 
-    def handle_render_line(self, key, focus, num, num2, mark, mark2, comm2, **a):
+    def handle_render_line(self, key, focus, num, mark, mark2, comm2, **a):
         "handle:doc:render-line"
         # If between active quote marks, render a simple marker
         p = self.vmark_at_or_before(self.qview, mark)
@@ -3509,7 +3509,7 @@ class notmuch_message_view(edlib.Pane):
             comm2("cb", focus, "<fg:yellow,bg:blue+30>%d quoted lines</>%s" % (int(p['quote-length']), eol))
         return 1
 
-    def handle_render_line_prev(self, key, focus, num, num2, mark, comm2, **a):
+    def handle_render_line_prev(self, key, focus, num, mark, comm2, **a):
         "handle:doc:render-line-prev"
         # If between active quote marks, move to start first
         p = self.vmark_at_or_before(self.qview, mark)