search: Remove newlines from query used for tab_content. (#3976)
Fixes https://github.com/zed-industries/community/issues/2388 Release Notes: - Fixed tab content of project search overflowing the tab for queries with newlines.
This commit is contained in:
@@ -424,7 +424,8 @@ impl Item for ProjectSearchView {
|
||||
.current()
|
||||
.as_ref()
|
||||
.map(|query| {
|
||||
let query_text = util::truncate_and_trailoff(query, MAX_TAB_TITLE_LEN);
|
||||
let query = query.replace('\n', "");
|
||||
let query_text = util::truncate_and_trailoff(&query, MAX_TAB_TITLE_LEN);
|
||||
query_text.into()
|
||||
});
|
||||
let tab_name = last_query
|
||||
|
||||
Reference in New Issue
Block a user