vim fixes for find&replace

* allow replacing with the empty string to delete
* fix <enter> for ReplaceNext
This commit is contained in:
Conrad Irwin 2023-09-19 20:47:11 -06:00
parent adf313bd33
commit 2da664ed17
3 changed files with 16 additions and 17 deletions

View file

@ -159,7 +159,7 @@ impl SearchQuery {
)
}
}
pub fn with_replacement(mut self, new_replacement: Option<String>) -> Self {
pub fn with_replacement(mut self, new_replacement: String) -> Self {
match self {
Self::Text {
ref mut replacement,
@ -169,7 +169,7 @@ impl SearchQuery {
ref mut replacement,
..
} => {
*replacement = new_replacement;
*replacement = Some(new_replacement);
self
}
}