Tags: rime/librime
Tags
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>
PreviousNext