From 92ce19aa865418522fdb5df5f27fc1107b36b8eb Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 30 Oct 2023 15:12:15 +1100 Subject: [PATCH] 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 --- DOC/TODO.md | 2 +- render-lines.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; } } -- 2.39.5