buffer: move BUFEMPTY to a function

This commit is contained in:
Thomas Vigouroux
2020-11-24 08:48:05 +01:00
parent 763c852812
commit 7970631fa0
14 changed files with 28 additions and 21 deletions

View File

@@ -3069,7 +3069,8 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
}
// In an empty buffer the empty line is going to be replaced, include
// it in the saved lines.
if ((BUFEMPTY(curbuf) ? u_save(0, 2) : u_save(lnum - 1, lnum)) == FAIL) {
if ((buf_is_empty(curbuf) ?
u_save(0, 2) : u_save(lnum - 1, lnum)) == FAIL) {
goto end;
}
if (dir == FORWARD) {