comparison src/memline.c @ 1066:bffbbb566d6b v7.0.192

updated for version 7.0-192
author vimboss
date Wed, 07 Feb 2007 02:41:57 +0000
parents 99ccc8932b6c
children efd0ce477ae7
comparison
equal deleted inserted replaced
1065:caa550fe4457 1066:bffbbb566d6b
2072 return (char_u *)""; 2072 return (char_u *)"";
2073 2073
2074 /* 2074 /*
2075 * See if it is the same line as requested last time. 2075 * See if it is the same line as requested last time.
2076 * Otherwise may need to flush last used line. 2076 * Otherwise may need to flush last used line.
2077 */ 2077 * Don't use the last used line when 'swapfile' is reset, need to load all
2078 if (buf->b_ml.ml_line_lnum != lnum) 2078 * blocks.
2079 */
2080 if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release)
2079 { 2081 {
2080 ml_flush_line(buf); 2082 ml_flush_line(buf);
2081 2083
2082 /* 2084 /*
2083 * Find the data block containing the line. 2085 * Find the data block containing the line.
3198 /* 3200 /*
3199 * If there is a locked block check if the wanted line is in it. 3201 * If there is a locked block check if the wanted line is in it.
3200 * If not, flush and release the locked block. 3202 * If not, flush and release the locked block.
3201 * Don't do this for ML_INSERT_SAME, because the stack need to be updated. 3203 * Don't do this for ML_INSERT_SAME, because the stack need to be updated.
3202 * Don't do this for ML_FLUSH, because we want to flush the locked block. 3204 * Don't do this for ML_FLUSH, because we want to flush the locked block.
3205 * Don't do this when 'swapfile' is reset, we want to load all the blocks.
3203 */ 3206 */
3204 if (buf->b_ml.ml_locked) 3207 if (buf->b_ml.ml_locked)
3205 { 3208 {
3206 if (ML_SIMPLE(action) && buf->b_ml.ml_locked_low <= lnum 3209 if (ML_SIMPLE(action)
3207 && buf->b_ml.ml_locked_high >= lnum) 3210 && buf->b_ml.ml_locked_low <= lnum
3208 { 3211 && buf->b_ml.ml_locked_high >= lnum
3209 /* remember to update pointer blocks and stack later */ 3212 && !mf_dont_release)
3213 {
3214 /* remember to update pointer blocks and stack later */
3210 if (action == ML_INSERT) 3215 if (action == ML_INSERT)
3211 { 3216 {
3212 ++(buf->b_ml.ml_locked_lineadd); 3217 ++(buf->b_ml.ml_locked_lineadd);
3213 ++(buf->b_ml.ml_locked_high); 3218 ++(buf->b_ml.ml_locked_high);
3214 } 3219 }