feat: highlight matching characters in fuzzy file search (#1420)
Using the new file-search API introduced in https://github.com/openai/codex/pull/1419, matching characters are now shown in bold in the TUI: https://github.com/user-attachments/assets/8bbcc6c6-75a3-493f-8ea4-b2a063e09b3a Fixes https://github.com/openai/codex/issues/1261
This commit is contained in:
@@ -165,7 +165,7 @@ impl FileSearchManager {
|
||||
cancellation_token: Arc<AtomicBool>,
|
||||
search_state: Arc<Mutex<SearchState>>,
|
||||
) {
|
||||
let compute_indices = false;
|
||||
let compute_indices = true;
|
||||
std::thread::spawn(move || {
|
||||
let matches = file_search::run(
|
||||
&query,
|
||||
@@ -176,12 +176,7 @@ impl FileSearchManager {
|
||||
cancellation_token.clone(),
|
||||
compute_indices,
|
||||
)
|
||||
.map(|res| {
|
||||
res.matches
|
||||
.into_iter()
|
||||
.map(|m| m.path)
|
||||
.collect::<Vec<String>>()
|
||||
})
|
||||
.map(|res| res.matches)
|
||||
.unwrap_or_default();
|
||||
|
||||
let is_cancelled = cancellation_token.load(Ordering::Relaxed);
|
||||
|
||||
Reference in New Issue
Block a user