]> git.neil.brown.name Git - edlib.git/commitdiff
renderlines: Move-Line should return Efalse not Efail
authorNeilBrown <neil@brown.name>
Mon, 30 Oct 2023 04:12:15 +0000 (15:12 +1100)
committerNeilBrown <neil@brown.name>
Mon, 30 Oct 2023 04:12:15 +0000 (15:12 +1100)
Commands returning Efail cause warning messages.  We don't want that
just for reaching end of file.  So return Efalse instead.

Signed-off-by: NeilBrown <neil@brown.name>
DOC/TODO.md
render-lines.c

index c936a76aff8b8a26f238263002f6019316807659..8eb73263dea66d44d8bbb3bb5842e07bb127119f 100644 (file)
@@ -46,7 +46,7 @@ the file.
 - [ ] when add address to a query in notmuch, reassess the current
       query.  Maybe don't reload, but make sure that next reload will
       used updated query.
-- [ ] get too many Failed:: C-N C-P Up C-R history:C-R A-!
+- [X] get too many Failed:: C-N C-P Up C-R history:C-R A-!
       Maybe these should return Efalse, not Efail
 
 ### Small
index 74abef49a2b647a937d71b345ff71401dd9ffd1f..52eeb416c4e061e782730cdf9e8d82db3952399d 100644 (file)
@@ -1726,13 +1726,13 @@ DEF_CMD(render_lines_move_line)
        num = RPT_NUM(ci);
        if (call("doc:EOL", ci->focus, num, m, NULL, 1) <= 0) {
                rl->i_moved = 0;
-               return Efail;
+               return Efalse;
        }
        if (RPT_NUM(ci) < 0) {
                /* at end of target line, move to start */
                if (call("doc:EOL", ci->focus, -1, m) <= 0) {
                        rl->i_moved = 0;
-                       return Efail;
+                       return Efalse;
                }
        }