From afd947e0c3b34a0dc36140a373af46aa31d8f1ab Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 27 Apr 2019 17:53:56 +0200 Subject: doc [ci skip] ref #9886 --- src/nvim/api/vim.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'src/nvim/api/vim.c') diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 390f1bbddb..d5e4df829c 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -1198,25 +1198,29 @@ void nvim_unsubscribe(uint64_t channel_id, String event) rpc_unsubscribe(channel_id, e); } -/// If the given name is an hexadecimal value (e.g. #XXXXXX) -/// translates it to RGB. Otherwise, translates given name -/// (e.g. “Pink”) to its RGB value. Returns -1 if it wasn’t -/// able to find a correct RGB value for the given color name. -/// -/// @param name Color name string -/// @return A 24-bit RGB value of the given name or -1 if it wasn’t able -/// to find a correct RGB value for the given color name. +/// Returns the 24-bit RGB value of a |nvim_get_color_map()| color name or +/// "#rrggbb" hexadecimal string. +/// +/// Examples: +///
+///     :echo nvim_get_color_by_name("Pink")
+///     :echo nvim_get_color_by_name("#cbcbcb")
+/// 
+/// +/// @param name Color name or "#rrggbb" string +/// @return 24-bit RGB value, or -1 for invalid argument. Integer nvim_get_color_by_name(String name) FUNC_API_SINCE(1) { return name_to_color((char_u *)name.data); } -/// Returns a map (dictionary) with all colors from rgb.txt. -/// Every key in the map is a color name (e.g. “Aqua”), and every -/// value is a 24-bit RGB value (e.g. 65535). +/// Returns a map of color names and RGB values. +/// +/// Keys are color names (e.g. "Aqua") and values are 24-bit RGB color values +/// (e.g. 65535). /// -/// @return Map associating names of colors and color RGB values. +/// @return Map of color names and RGB values. Dictionary nvim_get_color_map(void) FUNC_API_SINCE(1) { -- cgit From c11e6181330e9e27ec8af1712f505b38a00d8ca3 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 27 Apr 2019 18:25:55 +0200 Subject: gen_vimdoc.py: support
 preformatted text [ci skip]

---
 src/nvim/api/vim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/nvim/api/vim.c')

diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index d5e4df829c..9e59eca396 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -1201,7 +1201,7 @@ void nvim_unsubscribe(uint64_t channel_id, String event)
 /// Returns the 24-bit RGB value of a |nvim_get_color_map()| color name or
 /// "#rrggbb" hexadecimal string.
 ///
-/// Examples:
+/// Example:
 /// 
 ///     :echo nvim_get_color_by_name("Pink")
 ///     :echo nvim_get_color_by_name("#cbcbcb")
-- 
cgit