aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r--src/nvim/main.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 00a43c9c79..0409628ed8 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -81,7 +81,7 @@
#ifndef WIN32
# include "nvim/os/pty_process_unix.h"
#endif
-#include "nvim/api/vim.h"
+#include "nvim/api/extmark.h"
// values for "window_layout"
#define WIN_HOR 1 // "-o" horizontally split windows
@@ -674,8 +674,7 @@ void getout(int exitval)
profile_dump();
- if (did_emsg
- ) {
+ if (did_emsg) {
// give the user a chance to read the (error) message
no_wait_return = FALSE;
wait_return(FALSE);
@@ -824,11 +823,11 @@ static void command_line_scan(mparm_T *parmp)
msgpack_packer *p = msgpack_packer_new(&fp, msgpack_file_write);
if (fof_ret != 0) {
- emsgf(_("E5421: Failed to open stdin: %s"), os_strerror(fof_ret));
+ semsg(_("E5421: Failed to open stdin: %s"), os_strerror(fof_ret));
}
if (p == NULL) {
- EMSG(_(e_outofmem));
+ emsg(_(e_outofmem));
}
Object md = DICTIONARY_OBJ(api_metadata());
@@ -1461,9 +1460,9 @@ static void create_windows(mparm_T *parmp)
did_emsg = FALSE; // avoid hit-enter prompt
getout(1);
}
- /* We can't close the window, it would disturb what
- * happens next. Clear the file name and set the arg
- * index to -1 to delete it later. */
+ // We can't close the window, it would disturb what
+ // happens next. Clear the file name and set the arg
+ // index to -1 to delete it later.
setfname(curbuf, NULL, NULL, false);
curwin->w_arg_idx = -1;
swap_exists_action = SEA_NONE;
@@ -1553,8 +1552,8 @@ static void edit_buffers(mparm_T *parmp, char_u *cwd)
// happen when vimrc contains ":sall").
if (curbuf == firstwin->w_buffer || curbuf->b_ffname == NULL) {
curwin->w_arg_idx = arg_idx;
- /* Edit file from arg list, if there is one. When "Quit" selected
- * at the ATTENTION prompt close the window. */
+ // Edit file from arg list, if there is one. When "Quit" selected
+ // at the ATTENTION prompt close the window.
swap_exists_did_quit = false;
(void)do_ecmd(0, arg_idx < GARGCOUNT
? alist_name(&GARGLIST[arg_idx]) : NULL,
@@ -1743,7 +1742,7 @@ static bool do_user_initialization(void)
if (os_path_exists(init_lua_path)
&& do_source((char *)init_lua_path, true, DOSO_VIMRC)) {
if (os_path_exists(user_vimrc)) {
- EMSG3(_("E5422: Conflicting configs: \"%s\" \"%s\""), init_lua_path,
+ semsg(_("E5422: Conflicting configs: \"%s\" \"%s\""), init_lua_path,
user_vimrc);
}
@@ -1815,7 +1814,7 @@ static void source_startup_scripts(const mparm_T *const parmp)
// Do nothing.
} else {
if (do_source(parmp->use_vimrc, false, DOSO_NONE) != OK) {
- EMSG2(_("E282: Cannot read from \"%s\""), parmp->use_vimrc);
+ semsg(_("E282: Cannot read from \"%s\""), parmp->use_vimrc);
}
}
} else if (!silent_mode) {