Skip to content

Tags: rime/librime

Tags

latest

Toggle latest's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(config): support indexed list insertion (#1081)

Add support for inserting elements at specific positions in config lists
using the syntax "/N+" where N is the insertion index.

Changes:
- Add ParseIndexedAppend() function to parse "/N+" syntax from config keys
- Extend AppendToList() to accept optional insert_pos parameter
- Update IsAppending(), IsMerging(), and StripOperator() to handle indexed insertion
- Add bounds checking for insertion position with error logging
- Support both append and insert operations in EditNode()

Examples:
- "key/0+" inserts at beginning of list
- "key/2+" inserts at index 2
- "key+" continues to append at end (backward compatible)

This enhancement allows more precise control over list element positioning
in RIME configuration files while maintaining backward compatibility.

---------

Co-authored-by: jimmy54 <jimmy54@126.com>

1.17.0

Toggle 1.17.0's commit message
chore(release): 1.17.0 πŸŽ‰

1.16.1

Toggle 1.16.1's commit message
chore(release): 1.16.1 πŸŽ‰

1.16.0

Toggle 1.16.0's commit message
chore(release): 1.16.0 πŸŽ‰

1.15.0

Toggle 1.15.0's commit message
chore(release): 1.15.0 πŸŽ‰

1.14.0

Toggle 1.14.0's commit message
chore(release): 1.14.0 πŸŽ‰

1.13.1

Toggle 1.13.1's commit message
chore(release): 1.13.1 πŸŽ‰

1.13.0

Toggle 1.13.0's commit message
chore(release): 1.13.0 πŸŽ‰

1.12.0

Toggle 1.12.0's commit message
chore(release): 1.12.0 πŸŽ‰

1.11.2

Toggle 1.11.2's commit message
chore(release): 1.11.2 πŸŽ‰