aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interface-curses/interface.c5
-rw-r--r--src/interface-gtk/interface.c3
-rw-r--r--src/view.c3
3 files changed, 9 insertions, 2 deletions
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 */
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");