aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core-commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core-commands.c')
-rw-r--r--src/core-commands.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/core-commands.c b/src/core-commands.c
index 63d8dbc..5ca508c 100644
--- a/src/core-commands.c
+++ b/src/core-commands.c
@@ -2110,6 +2110,7 @@ teco_state_ecommand_flags(teco_machine_main_t *ctx, GError **error)
* of buffers in the ring.
* (\fBread-only\fP)
* .IP 2:
+ * .SCITECO_TOPIC "memory limit"
* The current memory limit in bytes.
* This limit helps to prevent dangerous out-of-memory
* conditions (e.g. resulting from infinite loops) by
@@ -2134,7 +2135,7 @@ teco_state_ecommand_flags(teco_machine_main_t *ctx, GError **error)
* requirements are too large for the new limit \(em if
* this happens you may have to clear your command-line
* first.
- * Memory limiting is enabled by default.
+ * Memory limiting is enabled by default (default: 500MB).
* .IP 3:
* .SCITECO_TOPIC palette
* This \fBwrite-only\fP property allows disabling use of
@@ -2167,6 +2168,7 @@ teco_state_ecommand_flags(teco_machine_main_t *ctx, GError **error)
* You are recommended to add \(lq0,3EJ\(rq to all color
* schemes that rely on exact RGB values.
* .IP 4:
+ * .SCITECO_TOPIC caretx
* The column after the last horizontal movement.
* This is only used by \fBfnkeys.tes\fP and is similar to the Scintilla-internal
* setting \fBSCI_CHOOSECARETX\fP.
@@ -2208,6 +2210,22 @@ teco_state_ecommand_flags(teco_machine_main_t *ctx, GError **error)
* work both on white on black and black on white terminals.
* Use -1 to disable default foreground or background colors.
* It has no effect when using the GTK interface.
+ * .IP 8:
+ * .SCITECO_TOPIC "block size"
+ * Block size during backwards searches (e.g. \(lq-S\(rq).
+ * When searching backwards \*(ST will perform forward searches
+ * in within blocks before the search range's end.
+ * If not enough matches could be produced, it moves back
+ * another block.
+ * The smaller the block size the more likely that a match
+ * will not be the leftmost longest, but the less matching overhead.
+ * A negative or 0 value (\(lq0,8EJ\(rq) is the maximum block size and
+ * ensures forward searches over the entire search range.
+ * Only this setting guarantees leftmost longest matches that
+ * are entirely symmetric to forward searches, but can be
+ * unpractically slow on huge files.
+ * The default is 0.
+ * \# FIXME: Feature is currently broken!
* .
* .IP -1:
* Type of the last mouse event (\fBread-only\fP).
@@ -2263,7 +2281,8 @@ teco_state_ecommand_properties(teco_machine_main_t *ctx, GError **error)
EJ_CARETX,
EJ_CMDLINE_HEIGHT,
EJ_RECOVERY_INTERVAL,
- EJ_DEFAULT_COLORS
+ EJ_DEFAULT_COLORS,
+ EJ_SEARCH_BLOCK_SIZE
};
static teco_int_t caret_x = 0;
@@ -2328,6 +2347,10 @@ teco_state_ecommand_properties(teco_machine_main_t *ctx, GError **error)
break;
}
+ case EJ_SEARCH_BLOCK_SIZE:
+ teco_undo_gsize(teco_search_block_size) = MAX(0, value);
+ break;
+
default:
g_set_error(error, TECO_ERROR, TECO_ERROR_FAILED,
"Cannot set property %" TECO_INT_FORMAT " "
@@ -2391,6 +2414,10 @@ teco_state_ecommand_properties(teco_machine_main_t *ctx, GError **error)
teco_expressions_push(teco_ring_recovery_interval);
break;
+ case EJ_SEARCH_BLOCK_SIZE:
+ teco_expressions_push(teco_search_block_size);
+ break;
+
default:
g_set_error(error, TECO_ERROR, TECO_ERROR_FAILED,
"Invalid property %" TECO_INT_FORMAT " "