From 904b740e16f89eeefbc476efac9cc09783edcc7b Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 15 Apr 2024 14:26:05 -0600 Subject: [PATCH] More vim-like regexes (#10577) Fixes: #10539 Release Notes: - vim: Use `\<` `\>` instead of `\b` --- CONTRIBUTING.md | 2 +- crates/vim/src/normal/search.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b9719e90fa..d29597e3fc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing to Zed -Thanks for your interest in contributing to Zed, the collaborative platform that is also a code editor! +Thanks for your interest in contributing to onetothree Zed, the collaborative platform that is also a code editor! All activity in Zed forums is subject to our [Code of Conduct](https://zed.dev/docs/code-of-conduct). Additionally, contributors must sign our [Contributor License Agreement](https://zed.dev/cla) before their contributions can be merged. diff --git a/crates/vim/src/normal/search.rs b/crates/vim/src/normal/search.rs index 70b6070322..16ac5c0090 100644 --- a/crates/vim/src/normal/search.rs +++ b/crates/vim/src/normal/search.rs @@ -239,7 +239,7 @@ pub fn move_to_internal( }; let mut query = regex::escape(&query); if whole_word { - query = format!(r"\b{}\b", query); + query = format!(r"\<{}\>", query); } Some(search_bar.search(&query, Some(options), cx)) });