diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-03-28 20:57:42 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-03-28 20:57:42 +0000 |
commit | 607a95ed81973faab2e1c3d9c91822082694fdc3 (patch) | |
tree | 74a40f6cc478a220e159fda18499afe84f404a5f /src/buffer.c | |
parent | 04a9d4555ac38c1f8e7183354991cf54ab4b1d0a (diff) |
updated for version 7.0c02
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index 439b5f2b60..a26806540b 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -381,8 +381,10 @@ close_buffer(win, buf, action) * unloaded. */ if (buf->b_nwindows > 0 || !unload_buf) { +#if 0 /* why was this here? */ if (buf == curbuf) u_sync(); /* sync undo before going to another buffer */ +#endif return; } @@ -1312,10 +1314,14 @@ set_curbuf(buf, action) #else if (buf_valid(prevbuf)) #endif + { + if (prevbuf == curbuf) + u_sync(); close_buffer(prevbuf == curwin->w_buffer ? curwin : NULL, prevbuf, unload ? action : (action == DOBUF_GOTO && !P_HID(prevbuf) && !bufIsChanged(prevbuf)) ? DOBUF_UNLOAD : 0); + } } #ifdef FEAT_AUTOCMD # ifdef FEAT_EVAL |