summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean@guyomarch.bzh>2019-01-03 15:14:56 +0100
committerJean Guyomarc'h <jean@guyomarch.bzh>2019-01-03 15:18:41 +0100
commit4d2679ce2bcafc5010b42ccb31ee9e4e7857a408 (patch)
treebd2c730498f4aa316fa839e424f39aa77cbee9d2
parent739059615312b660031841361ee67e2253c98b96 (diff)
event: don't spam the stderr with unimplemented details
Neovim sends to the GUI clients methods. Methods contain commands. The GUI client may not be happy if: - the data coming from neovim is ill-formed; or - eovim did not keep up with neovim's features (or is not in sync). In both cases, we printed an error, which by default would be displayed in stderr. It has been lowered to a simple warning (not shown by default). A normal user should not care. Increasing the log level will show their the message.
-rw-r--r--src/nvim_event.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim_event.c b/src/nvim_event.c
index 6cf1dcd..d73aa77 100644
--- a/src/nvim_event.c
+++ b/src/nvim_event.c
@@ -684,6 +684,7 @@ fail:
684 return EINA_FALSE; 684 return EINA_FALSE;
685} 685}
686 686
687
687Eina_Bool 688Eina_Bool
688nvim_event_dispatch(s_nvim *nvim, 689nvim_event_dispatch(s_nvim *nvim,
689 Eina_Stringshare *method_name, 690 Eina_Stringshare *method_name,
@@ -704,7 +705,7 @@ nvim_event_dispatch(s_nvim *nvim,
704 const f_event_cb cb = eina_hash_find(method->callbacks, command); 705 const f_event_cb cb = eina_hash_find(method->callbacks, command);
705 if (EINA_UNLIKELY(! cb)) 706 if (EINA_UNLIKELY(! cb))
706 { 707 {
707 CRI("Failed to get callback for command '%s' of method '%s'", 708 WRN("Failed to get callback for command '%s' of method '%s'",
708 command, method_name); 709 command, method_name);
709 return EINA_FALSE; 710 return EINA_FALSE;
710 } 711 }
@@ -714,7 +715,7 @@ nvim_event_dispatch(s_nvim *nvim,
714 } 715 }
715 716
716 /* At this point, we didn't find the method. */ 717 /* At this point, we didn't find the method. */
717 ERR("Unknown method '%s'", method_name); 718 WRN("Unknown method '%s'", method_name);
718 return EINA_FALSE; 719 return EINA_FALSE;
719} 720}
720 721