aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2016-07-12 22:52:10 -0700
committerJosh Triplett <josh@joshtriplett.org>2016-07-24 01:56:33 -0700
commit298608f88c463705cfd6ee47035c049dbb1d9fa0 (patch)
tree6c4fe7bafc57b400daf019a2dd24aa218815c66e /src/nvim/option.c
parentef72303a1ff862fde6d9399941c091c0a0692cce (diff)
downloadrneovim-298608f88c463705cfd6ee47035c049dbb1d9fa0.tar.gz
rneovim-298608f88c463705cfd6ee47035c049dbb1d9fa0.tar.bz2
rneovim-298608f88c463705cfd6ee47035c049dbb1d9fa0.zip
Automatically detect terminal background and set bg=dark or bg=light
xterm-compatible terminals support reporting their configured colors back to the application. Use this to obtain the current background color, compute its luminance to classify it as light or dark, and set 'bg' accordingly. Also set the default for 'bg', so that `:set bg&` will revert to that detected default.
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 81f57522b3..5333c0291d 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -874,7 +874,7 @@ set_options_default (
/// @param name The name of the option
/// @param val The value of the option
/// @param allocated If true, do not copy default as it was already allocated.
-static void set_string_default(const char *name, char *val, bool allocated)
+void set_string_default(const char *name, char *val, bool allocated)
FUNC_ATTR_NONNULL_ALL
{
int opt_idx = findoption((char_u *)name);