aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-08-20 02:13:04 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-08-20 19:49:42 +0200
commit9882e25dc44f1165e1edc8b3898356e493b6b3fe (patch)
treec4275fc02a6b8be8c060b0997cbeb59244e50b8e /src/nvim/eval.c
parentb3da396804ec0a63f11b86a363bd4c98e23f8ebd (diff)
downloadrneovim-9882e25dc44f1165e1edc8b3898356e493b6b3fe.tar.gz
rneovim-9882e25dc44f1165e1edc8b3898356e493b6b3fe.tar.bz2
rneovim-9882e25dc44f1165e1edc8b3898356e493b6b3fe.zip
clipboard: avoid error flood during :redir
redir_write(): - This is a "batch" operation which was not yet covered by start_batch_changes() adjust_clipboard_name(): - msg() and friends during :redir will, of course, cause redir_write() to try to capture that message, which causes recursion. - EMSG() here is trouble: if it interrupts :redir it is a mess. Rather than deal with the mess, show a non-error message. closes #7182 closes #7184 closes #7183 ref #6048 ref #7032
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index ac22d75a83..d6ee13857a 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -22775,7 +22775,7 @@ typval_T eval_call_provider(char *provider, char *method, list_T *arguments)
bool eval_has_provider(const char *name)
{
-#define check_provider(name) \
+#define CHECK_PROVIDER(name) \
if (has_##name == -1) { \
has_##name = !!find_func((char_u *)"provider#" #name "#Call"); \
if (!has_##name) { \
@@ -22791,17 +22791,17 @@ bool eval_has_provider(const char *name)
static int has_python3 = -1;
static int has_ruby = -1;
- if (!strcmp(name, "clipboard")) {
- check_provider(clipboard);
+ if (strequal(name, "clipboard")) {
+ CHECK_PROVIDER(clipboard);
return has_clipboard;
- } else if (!strcmp(name, "python3")) {
- check_provider(python3);
+ } else if (strequal(name, "python3")) {
+ CHECK_PROVIDER(python3);
return has_python3;
- } else if (!strcmp(name, "python")) {
- check_provider(python);
+ } else if (strequal(name, "python")) {
+ CHECK_PROVIDER(python);
return has_python;
- } else if (!strcmp(name, "ruby")) {
- check_provider(ruby);
+ } else if (strequal(name, "ruby")) {
+ CHECK_PROVIDER(ruby);
return has_ruby;
}