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:
31
src/fileio.c
31
src/fileio.c
@@ -6156,11 +6156,31 @@ buf_check_timestamp(buf, focus)
|
||||
}
|
||||
|
||||
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;
|
||||
pos_T old_cursor;
|
||||
linenr_T old_topline;
|
||||
int old_ro = buf->b_p_ro;
|
||||
int orig_mode = buf->b_orig_mode;
|
||||
buf_T *savebuf;
|
||||
int saved = OK;
|
||||
#ifdef FEAT_AUTOCMD
|
||||
@@ -6295,15 +6315,6 @@ buf_check_timestamp(buf, focus)
|
||||
curwin->w_buffer = save_curbuf;
|
||||
curbuf = save_curbuf;
|
||||
#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*/
|
||||
|
Reference in New Issue
Block a user