ITADN

Add Text Attachment Actions

#111Pull Requestthecoolwinter 创建于 2025-06-25已合并
T
thecoolwintercommented
### Description Adds actions to text attachments. Actions are performed in either of the following: - A selection's range exactly matches that of the attachment, and the enter key is pressed. - For multiple cursors, if any selections match, the action is taken on all matching selections and other behaviors are ignored. - An attachment is double-clicked. Attachments can return an action enum to indicate what the textview should do when the action is invoked. This allows for attachments to let the textview handle some common cases like discarding the attachment or replacing it with text, and allows attachments to perform their own logic at the same time. ### Related Issues * https://github.com/CodeEditApp/CodeEditSourceEditor/issues/43 ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots Example in CodeEdit's folding attachments. https://github.com/user-attachments/assets/1bd670b4-08ed-463e-8f06-8b2fff7e0cbb
合并状态:已合并 合并于 2025-06-25 关闭于 2025-06-25 0 条评论