summaryrefslogtreecommitdiff
path: root/src/memline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-02-07 02:41:57 +0000
committerBram Moolenaar <Bram@vim.org>2007-02-07 02:41:57 +0000
commit47b8b15b5f7f62d65e6ef55f5042453e2735055d (patch)
tree6db0328d36b0a3375cb87489a52c7188f1ba0282 /src/memline.c
parent48b66fb5a7197c79c05de133dddc8563cc942d9b (diff)
downloadvim-47b8b15b5f7f62d65e6ef55f5042453e2735055d.zip
updated for version 7.0-192
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/memline.c b/src/memline.c
index b8d13d942..6f59a9a9c 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -2074,8 +2074,10 @@ errorret:
/*
* See if it is the same line as requested last time.
* Otherwise may need to flush last used line.
+ * Don't use the last used line when 'swapfile' is reset, need to load all
+ * blocks.
*/
- if (buf->b_ml.ml_line_lnum != lnum)
+ if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release)
{
ml_flush_line(buf);
@@ -3200,13 +3202,16 @@ ml_find_line(buf, lnum, action)
* If not, flush and release the locked block.
* Don't do this for ML_INSERT_SAME, because the stack need to be updated.
* Don't do this for ML_FLUSH, because we want to flush the locked block.
+ * Don't do this when 'swapfile' is reset, we want to load all the blocks.
*/
if (buf->b_ml.ml_locked)
{
- if (ML_SIMPLE(action) && buf->b_ml.ml_locked_low <= lnum
- && buf->b_ml.ml_locked_high >= lnum)
+ if (ML_SIMPLE(action)
+ && buf->b_ml.ml_locked_low <= lnum
+ && buf->b_ml.ml_locked_high >= lnum
+ && !mf_dont_release)
{
- /* remember to update pointer blocks and stack later */
+ /* remember to update pointer blocks and stack later */
if (action == ML_INSERT)
{
++(buf->b_ml.ml_locked_lineadd);