Repository navigation
Conversation
aldair-meneses
force-pushed
the
add-max-regex-buffer-size-config-option
branch
from
October 5, 2025 00:42
ca64bf9 to
0e9c78b
Compare
Collaborator
|
I tested it and it works perfectly! |
53 of 56 tasks
sboldt1978
pushed a commit
to sboldt1978/espanso
that referenced
this pull request
Feb 11, 2026
* feat: Add max_regex_buffer_size config option * formatting * add key to the config.schema.json * add settings for biomejs as formatter ---------
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a new configuration option,
max_regex_buffer_size, allowing users to control the maximum number of characters held in memory for regex trigger matching and solve the issue #1766 .Context
Previously, the buffer size for regex matching was hardcoded to 30 characters. This posed a limitation for users wanting to create triggers longer than this size.
This change makes the regex buffer size configurable in the configuration, providing a better balance between capability and resource consumption, tailored to each user's needs.
Changes Made
max_regex_buffer_sizeto the configuration files, with a default value.max_regex_buffer_size()method.How to Test
Open your
default.ymlconfiguration file.Set a small buffer size:
Create a match with a regex trigger longer than 10 characters:
Save the file and let espanso restart.
Try to type
:thisislongerthan10. The replacement should not occur.Now, increase the buffer size in
default.yml:Save and let espanso restart.
Try to type
:thisislongerthan10again. The replacement should now work correctly.