diff options
author | Daniel Hahler <git@thequod.de> | 2019-06-09 15:42:21 +0200 |
---|---|---|
committer | Daniel Hahler <git@thequod.de> | 2019-08-07 14:21:23 +0200 |
commit | a822b3e5476f734ebf2d2c247fac1e1f1fc1b68b (patch) | |
tree | 644f22cea4dc886b791d121450201ff499f24053 /src/nvim/misc1.c | |
parent | 2a421e52e48299dab6272cbac559c1b636e9337e (diff) | |
download | rneovim-a822b3e5476f734ebf2d2c247fac1e1f1fc1b68b.tar.gz rneovim-a822b3e5476f734ebf2d2c247fac1e1f1fc1b68b.tar.bz2 rneovim-a822b3e5476f734ebf2d2c247fac1e1f1fc1b68b.zip |
move changed
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r-- | src/nvim/misc1.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index 6589ef67de..386c8ae39d 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -1786,55 +1786,6 @@ int gchar_pos(pos_T *pos) } /* - * Call this function when something in the current buffer is changed. - * - * Most often called through changed_bytes() and changed_lines(), which also - * mark the area of the display to be redrawn. - * - * Careful: may trigger autocommands that reload the buffer. - */ -void changed(void) -{ - - if (!curbuf->b_changed) { - int save_msg_scroll = msg_scroll; - - /* Give a warning about changing a read-only file. This may also - * check-out the file, thus change "curbuf"! */ - change_warning(0); - - /* Create a swap file if that is wanted. - * Don't do this for "nofile" and "nowrite" buffer types. */ - if (curbuf->b_may_swap - && !bt_dontwrite(curbuf) - ) { - int save_need_wait_return = need_wait_return; - - need_wait_return = false; - ml_open_file(curbuf); - - /* The ml_open_file() can cause an ATTENTION message. - * Wait two seconds, to make sure the user reads this unexpected - * message. Since we could be anywhere, call wait_return() now, - * and don't let the emsg() set msg_scroll. */ - if (need_wait_return && emsg_silent == 0) { - ui_flush(); - os_delay(2000L, true); - wait_return(TRUE); - msg_scroll = save_msg_scroll; - } else { - need_wait_return = save_need_wait_return; - } - } - changed_int(); - } - buf_inc_changedtick(curbuf); - - // If a pattern is highlighted, the position may now be invalid. - highlight_match = false; -} - -/* * Internal part of changed(), no user interaction. */ void changed_int(void) |