diff options
-rw-r--r-- | lib/color.tes | 2 | ||||
-rw-r--r-- | lib/colors/solarized.tes | 6 | ||||
-rw-r--r-- | lib/colors/terminal.tes | 4 | ||||
-rw-r--r-- | src/interface-curses/interface.c | 5 | ||||
-rw-r--r-- | src/interface-gtk/interface.c | 3 | ||||
-rw-r--r-- | src/view.c | 3 |
6 files changed, 19 insertions, 4 deletions
diff --git a/lib/color.tes b/lib/color.tes index 633df8c..23c14f3 100644 --- a/lib/color.tes +++ b/lib/color.tes @@ -42,6 +42,8 @@ Q[color.caretfore]ESSETCARETFORE Q[color.caretline]ESSETCARETLINEBACK 1ESSETCARETLINEVISIBLE + Q[color.selfore],1ESSETSELFORE + Q[color.selback],1ESSETSELBACK ! Calltips and popup windows ! :M[color.calltip],38M[color.set] ! Set up brace lightning ! diff --git a/lib/colors/solarized.tes b/lib/colors/solarized.tes index bc6400c..7479c31 100644 --- a/lib/colors/solarized.tes +++ b/lib/colors/solarized.tes @@ -59,10 +59,12 @@ [color.linenumber] 0,Q[color.base2],Q[color.base00] Q[color.base2]U[color.caretline] Q[color.base01]U[color.caretfore] + Q[color.base3]U[color.selfore] + Q[color.base00]U[color.selback] [color.calltip] 0,Q[color.base01],Q[color.base2] - [color.comment] 2,Q[color.base3],Q[color.base01] + [color.comment] 2,Q[color.base3],Q[color.base1] [color.number] 0,Q[color.base3],Q[color.cyan] [color.keyword] 0,Q[color.base3],Q[color.green] [color.string] 0,Q[color.base3],Q[color.cyan] @@ -90,6 +92,8 @@ [color.linenumber] 0,Q[color.base02],Q[color.base0] Q[color.base02]U[color.caretline] Q[color.base1]U[color.caretfore] + Q[color.base03]U[color.selfore] + Q[color.base0]U[color.selback] [color.calltip] 0,Q[color.base1],Q[color.base02] diff --git a/lib/colors/terminal.tes b/lib/colors/terminal.tes index aa146bc..43b67c7 100644 --- a/lib/colors/terminal.tes +++ b/lib/colors/terminal.tes @@ -2,7 +2,9 @@ [color.default] 0,Q[color.black],Q[color.white] [color.linenumber] 0,Q[color.black],Q[color.white] Q[color.black]U[color.caretline] -Q[color.white]U[color.caretfore] +Q[color.lwhite]U[color.caretfore] +Q[color.black]U[color.selfore] +Q[color.white]U[color.selback] [color.calltip] 0,Q[color.lwhite],Q[color.black] diff --git a/src/interface-curses/interface.c b/src/interface-curses/interface.c index 6e6e890..ce9207e 100644 --- a/src/interface-curses/interface.c +++ b/src/interface-curses/interface.c @@ -1063,7 +1063,10 @@ teco_interface_cmdline_update(const teco_cmdline_t *cmdline) teco_curses_format_str(teco_interface.cmdline_pad, cmdline->str.data + cmdline->effective_len, cmdline->str.len - cmdline->effective_len, -1); - /* highlight cursor after effective command line */ + /* + * Highlight cursor after effective command line + * FIXME: This should use SCI_GETCARETFORE(). + */ if (teco_interface.cmdline_rubout_len) { attr_t attr = 0; short pair = 0; diff --git a/src/interface-gtk/interface.c b/src/interface-gtk/interface.c index ea9745a..edac479 100644 --- a/src/interface-gtk/interface.c +++ b/src/interface-gtk/interface.c @@ -735,7 +735,8 @@ teco_interface_set_css_variables(teco_view_t *view) teco_view_ssm(teco_interface.cmdline_view, SCI_STYLECLEARALL, 0, 0); teco_view_ssm(teco_interface.cmdline_view, SCI_STYLESETFORE, STYLE_CALLTIP, calltip_fg_color); teco_view_ssm(teco_interface.cmdline_view, SCI_STYLESETBACK, STYLE_CALLTIP, calltip_bg_color); - teco_view_ssm(teco_interface.cmdline_view, SCI_SETCARETFORE, default_fg_color, 0); + teco_view_ssm(teco_interface.cmdline_view, SCI_SETCARETFORE, + teco_view_ssm(view, SCI_GETCARETFORE, 0, 0), 0); /* used for the asterisk at the beginning of the command line */ teco_view_ssm(teco_interface.cmdline_view, SCI_STYLESETBOLD, STYLE_ASTERISK, TRUE); /* used for character representations */ @@ -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"); |