aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r--src/nvim/api/vim.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index e14c427dc1..25454761ea 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -308,6 +308,16 @@ void vim_err_write(String str)
write_msg(str, true);
}
+/// Higher level error reporting function that ensures all str contents
+/// are written by sending a trailing linefeed to `vim_wrr_write`
+///
+/// @param str The message
+void vim_report_error(String str)
+{
+ vim_err_write(str);
+ vim_err_write((String) {.data = "\n", .size = 1});
+}
+
/// Gets the current list of buffer handles
///
/// @return The number of buffers