summaryrefslogtreecommitdiffstats
path: root/src/fileio.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-01-09 14:37:01 +0000
committerBram Moolenaar <Bram@vim.org>2007-01-09 14:37:01 +0000
commit9460b9d215821472ac18ec2a1d51b0c76c6f3cf0 (patch)
treeed681c706290a1294692cb8e6e38cd46c1db0407 /src/fileio.c
parentd675e2c5130849cb486665b097b62bbb00cc42e7 (diff)
updated for version 7.0-181v7.0.181
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c
index abbe1e7a0d..2108bb87db 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -6178,8 +6178,8 @@ move_lines(frombuf, tobuf)
if (retval != FAIL)
{
curbuf = frombuf;
- while (!bufempty())
- if (ml_delete(curbuf->b_ml.ml_line_count, FALSE) == FAIL)
+ for (lnum = curbuf->b_ml.ml_line_count; lnum > 0; --lnum)
+ if (ml_delete(lnum, FALSE) == FAIL)
{
/* Oops! We could try putting back the saved lines, but that
* might fail again... */