0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.0189

This commit is contained in:
Bram Moolenaar
2006-01-30 00:14:18 +00:00
parent 17c7c01170
commit 280f126ef0
27 changed files with 379 additions and 251 deletions

View File

@@ -1893,6 +1893,7 @@ ex_diffgetput(eap)
buf_T *buf;
int start_skip, end_skip;
int new_count;
int buf_empty;
/* Find the current buffer in the list of diff buffers. */
idx_cur = diff_buf_idx(curbuf);
@@ -2047,9 +2048,12 @@ ex_diffgetput(eap)
end_skip = 0;
}
buf_empty = FALSE;
added = 0;
for (i = 0; i < count; ++i)
{
/* remember deleting the last line of the buffer */
buf_empty = curbuf->b_ml.ml_line_count == 1;
ml_delete(lnum, FALSE);
--added;
}
@@ -2066,6 +2070,13 @@ ex_diffgetput(eap)
ml_append(lnum + i - 1, p, 0, FALSE);
vim_free(p);
++added;
if (buf_empty && curbuf->b_ml.ml_line_count == 2)
{
/* Added the first line into an empty buffer, need to
* delete the dummy empty line. */
buf_empty = FALSE;
ml_delete((linenr_T)2, FALSE);
}
}
}
new_count = dp->df_count[idx_to] + added;