aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--fallback.teco_inibin2322 -> 2413 bytes
-rw-r--r--lib/color.tes16
-rw-r--r--lib/colors/solarized.tes2
-rw-r--r--lib/lexer.tes9
-rw-r--r--src/core-commands.c7
-rw-r--r--src/sciteco.h3
-rw-r--r--src/symbols.c21
7 files changed, 47 insertions, 11 deletions
diff --git a/fallback.teco_ini b/fallback.teco_ini
index 7b10441..2a80601 100644
--- a/fallback.teco_ini
+++ b/fallback.teco_ini
Binary files differ
diff --git a/lib/color.tes b/lib/color.tes
index 347f29b..a45c646 100644
--- a/lib/color.tes
+++ b/lib/color.tes
@@ -80,11 +80,13 @@
:M[color.bracelight],34M[color.set]
:M[color.error],35M[color.set]
- !* Configure fold margin *!
- :M[color.linenumber]U.fU.b
- Q.b,1ESSETFOLDMARGINCOLOUR Q.b,1ESSETFOLDMARGINHICOLOUR
- 25U.x 7<Q.f,Q.xESMARKERSETFORE Q.b,Q.xESMARKERSETBACK %.x>
- 10000++,25ESMARKERDEFINE 10000+-,26ESMARKERDEFINE
- 10000++,30ESMARKERDEFINE 10000+-,31ESMARKERDEFINE
- (2^*25 # 2^*26 # 2^*30 # 2^*31),2ESSETMARGINMASKN 0,2ESSETMARGINTYPEN
+ !* Configure fold margin (except on the command line) *!
+ ED&2048"=
+ :M[color.linenumber]U.fU.b
+ Q.b,1ESSETFOLDMARGINCOLOUR Q.b,1ESSETFOLDMARGINHICOLOUR
+ 25U.x 7<Q.f,Q.xESMARKERSETFORE Q.b,Q.xESMARKERSETBACK %.x>
+ 10000++,25ESMARKERDEFINE 10000+-,26ESMARKERDEFINE
+ 10000++,30ESMARKERDEFINE 10000+-,31ESMARKERDEFINE
+ (2^*25 # 2^*26 # 2^*30 # 2^*31),2ESSETMARGINMASKN 0,2ESSETMARGINTYPEN
+ '
}
diff --git a/lib/colors/solarized.tes b/lib/colors/solarized.tes
index fd0823e..11567d9 100644
--- a/lib/colors/solarized.tes
+++ b/lib/colors/solarized.tes
@@ -131,6 +131,8 @@ Q[solarized.light]"T :M[solarized.light] | :M[solarized.dark] '
[*
EJ<%.bEB M[lexer.auto]>
EQ.b :M[color.init]
+ !* FIXME: What if the user disabled it in .teco_ini? *!
+ :M[lexer.set.cmdline]
]*
}
diff --git a/lib/lexer.tes b/lib/lexer.tes
index 4e3e1b5..af6793a 100644
--- a/lib/lexer.tes
+++ b/lib/lexer.tes
@@ -39,3 +39,12 @@
:@[lexer.auto]{
]_
}
+
+@[lexer.set.cmdline]{
+ 0,2048ED
+ :M[color.init]
+ !* indicator for rubbed out part of the command line *!
+ :M[color.default],8ESINDICSETFORE
+ :M[lexer.set.sciteco]
+ 2048,0ED
+}
diff --git a/src/core-commands.c b/src/core-commands.c
index 99fd628..e0141c3 100644
--- a/src/core-commands.c
+++ b/src/core-commands.c
@@ -2017,6 +2017,13 @@ TECO_DEFINE_STATE_COMMAND(teco_state_ctlc_control);
* by the \(lqNerd Fonts\(rq project.
* Changes to this flag in interactive mode may not become
* effective immediately.
+ * .IP 1024:
+ * If set the default clipboard register \(lq~\(rq will refer
+ * to the primary clipboard (\(lq~P\(rq) instead of the
+ * clipboard selection (\(lq~C\(rq).
+ * .IP 2048:
+ * Enable/Disable redirection of Scintilla messages (\fBES\fP)
+ * to the command line's Scintilla view.
*
* The features controlled thus are discribed in other sections
* of this manual.
diff --git a/src/sciteco.h b/src/sciteco.h
index cc43368..388d6c4 100644
--- a/src/sciteco.h
+++ b/src/sciteco.h
@@ -96,7 +96,8 @@ enum {
TECO_ED_SHELLEMU = (1 << 7),
TECO_ED_OSC52 = (1 << 8),
TECO_ED_ICONS = (1 << 9),
- TECO_ED_CLIP_PRIMARY = (1 << 10)
+ TECO_ED_CLIP_PRIMARY = (1 << 10),
+ TECO_ED_MINIBUF_SSM = (1 << 11)
};
/* in main.c */
diff --git a/src/symbols.c b/src/symbols.c
index b5600e8..9cf1c35 100644
--- a/src/symbols.c
+++ b/src/symbols.c
@@ -38,6 +38,7 @@
#include "undo.h"
#include "expressions.h"
#include "interface.h"
+#include "cmdline.h"
#include "symbols.h"
teco_symbol_list_t teco_symbol_list_scintilla = {NULL, 0};
@@ -166,6 +167,13 @@ teco_symbol_list_auto_complete(teco_symbol_list_t *ctx, const gchar *symbol, tec
* Command states
*/
+static inline sptr_t
+teco_scintilla_ssm(unsigned int iMessage, uptr_t wParam, sptr_t lParam)
+{
+ return teco_view_ssm(teco_ed & TECO_ED_MINIBUF_SSM ? teco_cmdline.view : teco_interface_current_view,
+ iMessage, wParam, lParam);
+}
+
/*
* FIXME: This state could be static.
*/
@@ -316,6 +324,13 @@ gboolean teco_state_scintilla_symbols_insert_completion(teco_machine_main_t *ctx
* second string argument of \fBES\fP, i.e. it allows you
* to look up style ids by name.
*
+ * By default Scintilla messages are sent to the current buffer's
+ * view or the Q-register view \(em there is only one view for
+ * all Q-registers.
+ * If bit 11 is set in the \fBED\fP flags, the messages will be
+ * sent to the command-line view instead, which allows you to
+ * set up \*(ST syntax highlighting and other styles.
+ *
* .BR Warning :
* Almost all Scintilla messages may be dispatched using
* this command.
@@ -442,10 +457,10 @@ teco_state_scintilla_lparam_done(teco_machine_main_t *ctx, const teco_string_t *
/*
* FIXME: Should we cache the name to style id?
*/
- guint count = teco_interface_ssm(SCI_GETNAMEDSTYLES, 0, 0);
+ guint count = teco_scintilla_ssm(SCI_GETNAMEDSTYLES, 0, 0);
for (guint id = 0; id < count; id++) {
gchar style[128] = "";
- teco_interface_ssm(SCI_NAMEOFSTYLE, id, (sptr_t)style);
+ teco_scintilla_ssm(SCI_NAMEOFSTYLE, id, (sptr_t)style);
if (!teco_string_cmp(str, style, strlen(style))) {
teco_expressions_push(id);
return &teco_state_start;
@@ -491,7 +506,7 @@ teco_state_scintilla_lparam_done(teco_machine_main_t *ctx, const teco_string_t *
lParam = v;
}
- teco_expressions_push(teco_interface_ssm(ctx->scintilla.iMessage,
+ teco_expressions_push(teco_scintilla_ssm(ctx->scintilla.iMessage,
ctx->scintilla.wParam, lParam));
return &teco_state_start;