diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-05 23:46:43 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-05 23:46:43 +0000 |
commit | cd9c8d400c1eb9cbb4ff6a33be02f91a30ab13b2 (patch) | |
tree | fd06702f1802b55f33521164e642e6c58efeb2fe /src/evalbuffer.c | |
parent | 91c75d18d9cdc32df57e648640de7476fbcb4d76 (diff) |
patch 9.0.0837: append() reports failure when not appending anythingv9.0.0837
Problem: append() reports failure when not appending anything.
Solution: Only report failure when appending something. (closes #11498)
Diffstat (limited to 'src/evalbuffer.c')
-rw-r--r-- | src/evalbuffer.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/evalbuffer.c b/src/evalbuffer.c index e77435b8f4..9ce1d41aeb 100644 --- a/src/evalbuffer.c +++ b/src/evalbuffer.c @@ -175,9 +175,7 @@ set_buffer_lines( l = lines->vval.v_list; if (l == NULL || list_len(l) == 0) { - // set proper return code - if (lnum > curbuf->b_ml.ml_line_count) - rettv->vval.v_number = 1; // FAIL + // not appending anything always succeeds goto done; } CHECK_LIST_MATERIALIZE(l); |