aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@protonmail.com>2022-05-08 17:39:45 +0600
committerFamiu Haque <famiuhaque@protonmail.com>2022-05-11 13:12:16 +0600
commitdfcc58466505f7fb5f62d636a67facaeea143285 (patch)
treea8aa50a698d1f18fbc800b1c54a35169184c6c3b /src/nvim/ex_getln.c
parent77863b8e96324bc9e575af7f3f1b7e5de90fbadb (diff)
downloadrneovim-dfcc58466505f7fb5f62d636a67facaeea143285.tar.gz
rneovim-dfcc58466505f7fb5f62d636a67facaeea143285.tar.bz2
rneovim-dfcc58466505f7fb5f62d636a67facaeea143285.zip
feat(api): add `nvim_cmd`
Adds the API function `nvim_cmd` which allows executing an Ex-command through a Dictionary which can have the same values as the return value of `nvim_parse_cmd()`. This makes it much easier to do things like passing arguments with a space to commands that otherwise may not allow it, or to make commands interpret certain characters literally when they otherwise would not.
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 8792e9673a..d651c1f014 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -33,6 +33,7 @@
#include "nvim/func_attr.h"
#include "nvim/garray.h"
#include "nvim/getchar.h"
+#include "nvim/globals.h"
#include "nvim/highlight.h"
#include "nvim/highlight_defs.h"
#include "nvim/highlight_group.h"
@@ -2522,7 +2523,7 @@ char *get_text_locked_msg(void)
bool curbuf_locked(void)
{
if (curbuf->b_ro_locked > 0) {
- emsg(_("E788: Not allowed to edit another buffer now"));
+ emsg(_(e_cannot_edit_other_buf));
return true;
}
return allbuf_locked();