0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.0082

This commit is contained in:
Bram Moolenaar
2005-06-07 21:02:10 +00:00
parent b765d63491
commit 631d6f6847

View File

@@ -6156,11 +6156,31 @@ buf_check_timestamp(buf, focus)
} }
if (reload) if (reload)
{ /* Reload the buffer. */
buf_reload(buf);
#ifdef FEAT_GUI
/* restore this in case an autocommand has set it; it would break
* 'mousefocus' */
need_mouse_correct = save_mouse_correct;
#endif
return retval;
}
/*
* Reload a buffer that is already loaded.
* Used when the file was changed outside of Vim.
*/
void
buf_reload(buf)
buf_T *buf;
{
exarg_T ea; exarg_T ea;
pos_T old_cursor; pos_T old_cursor;
linenr_T old_topline; linenr_T old_topline;
int old_ro = buf->b_p_ro; int old_ro = buf->b_p_ro;
int orig_mode = buf->b_orig_mode;
buf_T *savebuf; buf_T *savebuf;
int saved = OK; int saved = OK;
#ifdef FEAT_AUTOCMD #ifdef FEAT_AUTOCMD
@@ -6295,15 +6315,6 @@ buf_check_timestamp(buf, focus)
curwin->w_buffer = save_curbuf; curwin->w_buffer = save_curbuf;
curbuf = save_curbuf; curbuf = save_curbuf;
#endif #endif
}
#ifdef FEAT_GUI
/* restore this in case an autocommand has set it; it would break
* 'mousefocus' */
need_mouse_correct = save_mouse_correct;
#endif
return retval;
} }
/*ARGSUSED*/ /*ARGSUSED*/