diff options
author | notomo <notomo.motono@gmail.com> | 2020-11-23 15:53:24 +0900 |
---|---|---|
committer | notomo <notomo.motono@gmail.com> | 2020-12-15 20:24:33 +0900 |
commit | 356319f3569c4dc24a34172fb73b03a913d7a115 (patch) | |
tree | f12424d59dad1dd65ade964d190767524b65a83c /src/nvim/api/vim.c | |
parent | 82100a6bdb42cec30060d6c991ab78fd2331fa31 (diff) | |
download | rneovim-356319f3569c4dc24a34172fb73b03a913d7a115.tar.gz rneovim-356319f3569c4dc24a34172fb73b03a913d7a115.tar.bz2 rneovim-356319f3569c4dc24a34172fb73b03a913d7a115.zip |
api: add textlock check
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 8b80d4aad9..1e972e01be 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -857,6 +857,7 @@ String nvim_get_current_line(Error *err) /// @param[out] err Error details, if any void nvim_set_current_line(String line, Error *err) FUNC_API_SINCE(1) + FUNC_API_CHECK_TEXTLOCK { buffer_set_line(curbuf->handle, curwin->w_cursor.lnum - 1, line, err); } @@ -866,6 +867,7 @@ void nvim_set_current_line(String line, Error *err) /// @param[out] err Error details, if any void nvim_del_current_line(Error *err) FUNC_API_SINCE(1) + FUNC_API_CHECK_TEXTLOCK { buffer_del_line(curbuf->handle, curwin->w_cursor.lnum - 1, err); } @@ -1060,6 +1062,7 @@ Buffer nvim_get_current_buf(void) /// @param[out] err Error details, if any void nvim_set_current_buf(Buffer buffer, Error *err) FUNC_API_SINCE(1) + FUNC_API_CHECK_TEXTLOCK { buf_T *buf = find_buffer_by_handle(buffer, err); @@ -1114,6 +1117,7 @@ Window nvim_get_current_win(void) /// @param[out] err Error details, if any void nvim_set_current_win(Window window, Error *err) FUNC_API_SINCE(1) + FUNC_API_CHECK_TEXTLOCK { win_T *win = find_window_by_handle(window, err); @@ -1263,6 +1267,7 @@ fail: Window nvim_open_win(Buffer buffer, Boolean enter, Dictionary config, Error *err) FUNC_API_SINCE(6) + FUNC_API_CHECK_TEXTLOCK { FloatConfig fconfig = FLOAT_CONFIG_INIT; if (!parse_float_config(config, &fconfig, false, err)) { @@ -1327,6 +1332,7 @@ Tabpage nvim_get_current_tabpage(void) /// @param[out] err Error details, if any void nvim_set_current_tabpage(Tabpage tabpage, Error *err) FUNC_API_SINCE(1) + FUNC_API_CHECK_TEXTLOCK { tabpage_T *tp = find_tab_by_handle(tabpage, err); @@ -1411,6 +1417,7 @@ Dictionary nvim_get_namespaces(void) /// - false: Client must cancel the paste. Boolean nvim_paste(String data, Boolean crlf, Integer phase, Error *err) FUNC_API_SINCE(6) + FUNC_API_CHECK_TEXTLOCK { static bool draining = false; bool cancel = false; @@ -1483,6 +1490,7 @@ theend: void nvim_put(ArrayOf(String) lines, String type, Boolean after, Boolean follow, Error *err) FUNC_API_SINCE(6) + FUNC_API_CHECK_TEXTLOCK { yankreg_T *reg = xcalloc(sizeof(yankreg_T), 1); if (!prepare_yankreg_from_object(reg, type, lines.size)) { |