]> git.neil.brown.name Git - edlib.git/commitdiff
linecount: fix mark used for 'goto'.
authorNeilBrown <neil@brown.name>
Sun, 2 Jul 2023 11:39:47 +0000 (21:39 +1000)
committerNeilBrown <neil@brown.name>
Wed, 12 Jul 2023 22:17:52 +0000 (08:17 +1000)
The mark passed to CountLines/goto:line as 'mark' is handed to
doc:GotoLine as 'mark2', but that function expects 'mark'.

This works as the doc: function always gets point for mark if nothing
else is given.  But it is wrong. Let's fix it.

Signed-off-by: NeilBrown <neil@brown.name>
lib-linecount.c

index 9aa3e8887e41b1714a52a84fc40f38d47499a3ff..07a7f9e77a55f1ed39097e843c967ff6fd2ff3d9 100644 (file)
@@ -404,8 +404,8 @@ DEF_CMD(count_lines)
        if (ci->mark) {
                if (ci->str && strcmp(ci->str, "goto:line") == 0 &&
                    ci->num != NO_NUMERIC) {
-                       call("doc:notify:doc:GotoLine", ci->focus, ci->num, NULL, NULL,
-                            0, ci->mark);
+                       call("doc:notify:doc:GotoLine", ci->focus, ci->num,
+                            ci->mark);
                }
                call("doc:notify:doc:CountLines", ci->focus, async, NULL, NULL,
                     0, ci->mark);