zed/crates/vim/test_data/test_replace_literal_dollar.json
Phillip Davis 663bc9dd35
Fix vim replace not escaping $ (#53277)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes ##42292

The text inserted in the search ('\$SEARCH') and replace ('$$OTHER')
inputs of the top-panel is a little anti-aesthetic, but that seems out
of scope for this issue.

Release Notes:

- '$' in the second clause of vim-style '%s/find/replace/g' actions is
correctly escaped.

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-04-27 08:53:44 +00:00

25 lines
409 B
JSON

{"Put":{"state":"ˇBase=hello\necho $Base"}}
{"Key":":"}
{"Key":"%"}
{"Key":"s"}
{"Key":"/"}
{"Key":"\\"}
{"Key":"$"}
{"Key":"shift-b"}
{"Key":"a"}
{"Key":"s"}
{"Key":"e"}
{"Key":"/"}
{"Key":"\\"}
{"Key":"$"}
{"Key":"shift-b"}
{"Key":"a"}
{"Key":"s"}
{"Key":"e"}
{"Key":"shift-n"}
{"Key":"e"}
{"Key":"w"}
{"Key":"/"}
{"Key":"g"}
{"Key":"enter"}
{"Get":{"state":"Base=hello\nˇecho $BaseNew","mode":"Normal"}}