diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/nvim/api/dispatch_deprecated.lua | 98 | ||||
| -rw-r--r-- | src/nvim/api/tabpage.c | 6 | ||||
| -rw-r--r-- | src/nvim/api/vim.c | 20 | ||||
| -rw-r--r-- | src/nvim/api/window.c | 2 | ||||
| -rw-r--r-- | src/nvim/eval.c | 4 | 
5 files changed, 65 insertions, 65 deletions
diff --git a/src/nvim/api/dispatch_deprecated.lua b/src/nvim/api/dispatch_deprecated.lua index a4b4c8d196..5650a77ac0 100644 --- a/src/nvim/api/dispatch_deprecated.lua +++ b/src/nvim/api/dispatch_deprecated.lua @@ -1,69 +1,69 @@  local deprecated_aliases = { -  nvim_buf_line_count="buffer_line_count", +  nvim_buf_add_highlight="buffer_add_highlight", +  nvim_buf_clear_highlight="buffer_clear_highlight",    nvim_buf_get_lines="buffer_get_lines", -  nvim_buf_set_lines="buffer_set_lines", -  nvim_buf_get_var="buffer_get_var", -  nvim_buf_get_option="buffer_get_option", -  nvim_buf_set_option="buffer_set_option", -  nvim_buf_get_number="buffer_get_number", +  nvim_buf_get_mark="buffer_get_mark",    nvim_buf_get_name="buffer_get_name", -  nvim_buf_set_name="buffer_set_name", +  nvim_buf_get_number="buffer_get_number", +  nvim_buf_get_option="buffer_get_option", +  nvim_buf_get_var="buffer_get_var",    nvim_buf_is_valid="buffer_is_valid", -  nvim_buf_get_mark="buffer_get_mark", -  nvim_buf_add_highlight="buffer_add_highlight", -  nvim_buf_clear_highlight="buffer_clear_highlight", -  nvim_tabpage_get_windows="tabpage_get_windows", -  nvim_tabpage_get_var="tabpage_get_var", -  nvim_tabpage_get_window="tabpage_get_window", -  nvim_tabpage_is_valid="tabpage_is_valid", -  nvim_ui_detach="ui_detach", -  nvim_ui_try_resize="ui_try_resize", +  nvim_buf_line_count="buffer_line_count", +  nvim_buf_set_lines="buffer_set_lines", +  nvim_buf_set_name="buffer_set_name", +  nvim_buf_set_option="buffer_set_option", +  nvim_call_function="vim_call_function",    nvim_command="vim_command", -  nvim_feedkeys="vim_feedkeys", -  nvim_input="vim_input", -  nvim_replace_termcodes="vim_replace_termcodes",    nvim_command_output="vim_command_output", +  nvim_del_current_line="vim_del_current_line", +  nvim_err_write="vim_err_write", +  nvim_err_writeln="vim_report_error",    nvim_eval="vim_eval", -  nvim_call_function="vim_call_function", -  nvim_strwidth="vim_strwidth", -  nvim_list_runtime_paths="vim_list_runtime_paths", -  nvim_change_directory="vim_change_directory", +  nvim_feedkeys="vim_feedkeys", +  nvim_get_api_info="vim_get_api_info", +  nvim_get_color_by_name="vim_name_to_color", +  nvim_get_color_map="vim_get_color_map", +  nvim_get_current_buf="vim_get_current_buffer", +  nvim_get_current_line="vim_get_current_line", +  nvim_get_current_tabpage="vim_get_current_tabpage", +  nvim_get_current_win="vim_get_current_window", +  nvim_get_option="vim_get_option",    nvim_get_var="vim_get_var",    nvim_get_vvar="vim_get_vvar", -  nvim_get_option="vim_get_option", -  nvim_set_option="vim_set_option", +  nvim_input="vim_input", +  nvim_list_bufs="vim_get_buffers", +  nvim_list_runtime_paths="vim_list_runtime_paths", +  nvim_list_tabpages="vim_get_tabpages", +  nvim_list_wins="vim_get_windows",    nvim_out_write="vim_out_write", -  nvim_err_write="vim_err_write", -  nvim_report_error="vim_report_error", -  nvim_get_buffers="vim_get_buffers", -  nvim_get_current_buffer="vim_get_current_buffer", -  nvim_set_current_buffer="vim_set_current_buffer", -  nvim_get_windows="vim_get_windows", -  nvim_get_current_window="vim_get_current_window", -  nvim_set_current_window="vim_set_current_window", -  nvim_get_tabpages="vim_get_tabpages", -  nvim_get_current_tabpage="vim_get_current_tabpage", -  nvim_set_current_tabpage="vim_set_current_tabpage", +  nvim_replace_termcodes="vim_replace_termcodes", +  nvim_set_current_buf="vim_set_current_buffer", +  nvim_set_current_dir="vim_change_directory",    nvim_set_current_line="vim_set_current_line", -  nvim_get_current_line="vim_get_current_line", -  nvim_del_current_line="vim_del_current_line", +  nvim_set_current_tabpage="vim_set_current_tabpage", +  nvim_set_current_win="vim_set_current_window", +  nvim_set_option="vim_set_option", +  nvim_strwidth="vim_strwidth",    nvim_subscribe="vim_subscribe", +  nvim_tabpage_get_var="tabpage_get_var", +  nvim_tabpage_get_win="tabpage_get_window", +  nvim_tabpage_is_valid="tabpage_is_valid", +  nvim_tabpage_list_wins="tabpage_get_windows", +  nvim_ui_detach="ui_detach", +  nvim_ui_try_resize="ui_try_resize",    nvim_unsubscribe="vim_unsubscribe", -  nvim_name_to_color="vim_name_to_color", -  nvim_get_color_map="vim_get_color_map", -  nvim_get_api_info="vim_get_api_info", -  nvim_win_get_buffer="window_get_buffer", +  nvim_win_get_buf="window_get_buffer",    nvim_win_get_cursor="window_get_cursor", -  nvim_win_set_cursor="window_set_cursor",    nvim_win_get_height="window_get_height", -  nvim_win_set_height="window_set_height", -  nvim_win_get_width="window_get_width", -  nvim_win_set_width="window_set_width", -  nvim_win_get_var="window_get_var",    nvim_win_get_option="window_get_option", -  nvim_win_set_option="window_set_option",    nvim_win_get_position="window_get_position",    nvim_win_get_tabpage="window_get_tabpage", -  nvim_win_is_valid="window_is_valid" +  nvim_win_get_var="window_get_var", +  nvim_win_get_width="window_get_width", +  nvim_win_is_valid="window_is_valid", +  nvim_win_set_cursor="window_set_cursor", +  nvim_win_set_height="window_set_height", +  nvim_win_set_option="window_set_option", +  nvim_win_set_width="window_set_width",  }  return deprecated_aliases diff --git a/src/nvim/api/tabpage.c b/src/nvim/api/tabpage.c index 0116c9f91e..8b1fb041e2 100644 --- a/src/nvim/api/tabpage.c +++ b/src/nvim/api/tabpage.c @@ -14,7 +14,7 @@  /// @param tabpage The tabpage  /// @param[out] err Details of an error that may have occurred  /// @return The windows in `tabpage` -ArrayOf(Window) nvim_tabpage_get_windows(Tabpage tabpage, Error *err) +ArrayOf(Window) nvim_tabpage_list_wins(Tabpage tabpage, Error *err)  {    Array rv = ARRAY_DICT_INIT;    tabpage_T *tab = find_tab_by_handle(tabpage, err); @@ -137,7 +137,7 @@ Object tabpage_del_var(Tabpage tabpage, String name, Error *err)  /// @param tabpage The tab page handle  /// @param[out] err Details of an error that may have occurred  /// @return The Window handle -Window nvim_tabpage_get_window(Tabpage tabpage, Error *err) +Window nvim_tabpage_get_win(Tabpage tabpage, Error *err)  {    Window rv = 0;    tabpage_T *tab = find_tab_by_handle(tabpage, err); @@ -147,7 +147,7 @@ Window nvim_tabpage_get_window(Tabpage tabpage, Error *err)    }    if (tab == curtab) { -    return nvim_get_current_window(); +    return nvim_get_current_win();    } else {      FOR_ALL_WINDOWS_IN_TAB(wp, tab) {        if (wp == tab->tp_curwin) { diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 57810134f9..d8cdad961b 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -289,7 +289,7 @@ ArrayOf(String) nvim_list_runtime_paths(void)  ///  /// @param dir The new working directory  /// @param[out] err Details of an error that may have occurred -void nvim_change_directory(String dir, Error *err) +void nvim_set_current_dir(String dir, Error *err)  {    if (dir.size >= MAXPATHL) {      api_set_error(err, Validation, _("Directory string is too long")); @@ -446,7 +446,7 @@ void nvim_err_write(String str)  /// are written by sending a trailing linefeed to `nvim_err_write`  ///  /// @param str The message -void nvim_report_error(String str) +void nvim_err_writeln(String str)  {    nvim_err_write(str);    nvim_err_write((String) { .data = "\n", .size = 1 }); @@ -455,7 +455,7 @@ void nvim_report_error(String str)  /// Gets the current list of buffer handles  ///  /// @return The number of buffers -ArrayOf(Buffer) nvim_get_buffers(void) +ArrayOf(Buffer) nvim_list_bufs(void)  {    Array rv = ARRAY_DICT_INIT; @@ -476,7 +476,7 @@ ArrayOf(Buffer) nvim_get_buffers(void)  /// Gets the current buffer  ///  /// @reqturn The buffer handle -Buffer nvim_get_current_buffer(void) +Buffer nvim_get_current_buf(void)  {    return curbuf->handle;  } @@ -485,7 +485,7 @@ Buffer nvim_get_current_buffer(void)  ///  /// @param id The buffer handle  /// @param[out] err Details of an error that may have occurred -void nvim_set_current_buffer(Buffer buffer, Error *err) +void nvim_set_current_buf(Buffer buffer, Error *err)  {    buf_T *buf = find_buffer_by_handle(buffer, err); @@ -506,7 +506,7 @@ void nvim_set_current_buffer(Buffer buffer, Error *err)  /// Gets the current list of window handles  ///  /// @return The number of windows -ArrayOf(Window) nvim_get_windows(void) +ArrayOf(Window) nvim_list_wins(void)  {    Array rv = ARRAY_DICT_INIT; @@ -527,7 +527,7 @@ ArrayOf(Window) nvim_get_windows(void)  /// Gets the current window  ///  /// @return The window handle -Window nvim_get_current_window(void) +Window nvim_get_current_win(void)  {    return curwin->handle;  } @@ -535,7 +535,7 @@ Window nvim_get_current_window(void)  /// Sets the current window  ///  /// @param handle The window handle -void nvim_set_current_window(Window window, Error *err) +void nvim_set_current_win(Window window, Error *err)  {    win_T *win = find_window_by_handle(window, err); @@ -556,7 +556,7 @@ void nvim_set_current_window(Window window, Error *err)  /// Gets the current list of tabpage handles  ///  /// @return The number of tab pages -ArrayOf(Tabpage) nvim_get_tabpages(void) +ArrayOf(Tabpage) nvim_list_tabpages(void)  {    Array rv = ARRAY_DICT_INIT; @@ -634,7 +634,7 @@ void nvim_unsubscribe(uint64_t channel_id, String event)    channel_unsubscribe(channel_id, e);  } -Integer nvim_name_to_color(String name) +Integer nvim_get_color_by_name(String name)  {    return name_to_color((uint8_t *)name.data);  } diff --git a/src/nvim/api/window.c b/src/nvim/api/window.c index 90d560cfeb..166e43f698 100644 --- a/src/nvim/api/window.c +++ b/src/nvim/api/window.c @@ -18,7 +18,7 @@  /// @param window The window handle  /// @param[out] err Details of an error that may have occurred  /// @return The buffer handle -Buffer nvim_win_get_buffer(Window window, Error *err) +Buffer nvim_win_get_buf(Window window, Error *err)  {    win_T *win = find_window_by_handle(window, err); diff --git a/src/nvim/eval.c b/src/nvim/eval.c index e707099ea3..ac6de04df6 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -7131,7 +7131,7 @@ static void api_wrapper(typval_T *argvars, typval_T *rettv, FunPtr fptr)    Object result = fn(INVALID_CHANNEL, NO_RESPONSE, args, &err);    if (err.set) { -    nvim_report_error(cstr_as_string(err.msg)); +    nvim_err_writeln(cstr_as_string(err.msg));      goto end;    } @@ -13743,7 +13743,7 @@ static void f_rpcrequest(typval_T *argvars, typval_T *rettv, FunPtr fptr)    }    if (err.set) { -    nvim_report_error(cstr_as_string(err.msg)); +    nvim_err_writeln(cstr_as_string(err.msg));      goto end;    }  | 
