From: NeilBrown Date: Mon, 30 Oct 2023 04:12:15 +0000 (+1100) Subject: renderlines: Move-Line should return Efalse not Efail X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=92ce19aa865418522fdb5df5f27fc1107b36b8eb;p=edlib.git renderlines: Move-Line should return Efalse not Efail 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 --- diff --git a/DOC/TODO.md b/DOC/TODO.md index c936a76a..8eb73263 100644 --- a/DOC/TODO.md +++ b/DOC/TODO.md @@ -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 diff --git a/render-lines.c b/render-lines.c index 74abef49..52eeb416 100644 --- a/render-lines.c +++ b/render-lines.c @@ -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; } }