aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core-commands.c7
-rw-r--r--src/sciteco.h3
-rw-r--r--src/symbols.c21
3 files changed, 27 insertions, 4 deletions
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;