aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/view.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2021-10-13 16:11:46 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2021-10-13 16:32:32 +0300
commitf337481d17838e45020e4ce70e74181adc1cba89 (patch)
tree0b38d7e79d8cd33d448421070ed8a6746ececcf6 /src/view.c
parent4a59a66d1f7b569313396f0b63127796987f1ca6 (diff)
downloadsciteco-f337481d17838e45020e4ce70e74181adc1cba89.tar.gz
improved default selection colors and made them configurable via color.tes
* NOTE: Selections are currently only used to highlight search results. * The default selection colors were not always visible well with default settings (--no-profile) and they were not uniform across platforms. On Curses, the selection would be reversed, while on Gtk it had a lighter foreground color. They are now always reversed (black on white background). The default styles do not assume any color support - they use only black and white. * Since these defaults cannot possibly work on every color scheme, color.selfore and color.selback has been added to color.tes. All existing color schemes have been updated to configure selections as reversed to the default colors. This especially fixes selection colors on Gtk. * On solarized.tes, the caret style was already distinct from inversed default colors. On terminal.tes, the color of the caret is now bright white, so it stands out from the selection colors. * In Curses, the caret color is currently __not__ applied to the command line where it is continued to be drawn reversed. The command line drawing code is considered deprecated and will eventually be replaced with a Scintilla minibuffer. * In Gtk, we now apply the caret style to the commandline view as well. * Fixed the comment color in solarized.light.
Diffstat (limited to 'src/view.c')
-rw-r--r--src/view.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/view.c b/src/view.c
index 3d67bef..936a53a 100644
--- a/src/view.c
+++ b/src/view.c
@@ -88,6 +88,9 @@ teco_view_setup(teco_view_t *ctx)
teco_view_ssm(ctx, SCI_SETCARETPERIOD, 0, 0);
teco_view_ssm(ctx, SCI_SETCARETFORE, 0xFFFFFF, 0);
+ teco_view_ssm(ctx, SCI_SETSELFORE, TRUE, 0x000000);
+ teco_view_ssm(ctx, SCI_SETSELBACK, TRUE, 0xFFFFFF);
+
teco_view_ssm(ctx, SCI_STYLESETFORE, STYLE_DEFAULT, 0xFFFFFF);
teco_view_ssm(ctx, SCI_STYLESETBACK, STYLE_DEFAULT, 0x000000);
teco_view_ssm(ctx, SCI_STYLESETFONT, STYLE_DEFAULT, (sptr_t)"Courier");