Update dependencies

This commit is contained in:
Jeremy Soller 2024-10-10 11:22:41 -06:00
parent 5546ed9988
commit 9be376c8af
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
3 changed files with 84 additions and 72 deletions

View file

@ -1756,7 +1756,11 @@ impl Application for App {
match self.config.find_regex(&self.find_search_value) {
Ok(regex) => {
//TODO: support captures
tab.replace(&regex, &self.find_replace_value, self.config.find_wrap_around);;
tab.replace(
&regex,
&self.find_replace_value,
self.config.find_wrap_around,
);
return self.update(Message::TabChanged(self.tab_model.active()));
}
Err(err) => {

View file

@ -246,7 +246,10 @@ impl EditorTab {
// If we haven't wrapped yet and we've reached the last line, reset cursor line to 0 and
// set wrapped to true so we don't wrap again
if wrap_around && !wrapped && cursor.line == editor.with_buffer(|buffer| buffer.lines.len()) {
if wrap_around
&& !wrapped
&& cursor.line == editor.with_buffer(|buffer| buffer.lines.len())
{
cursor.line = 0;
wrapped = true;
}
@ -277,7 +280,7 @@ impl EditorTab {
}) {
cursor.index = start;
editor.set_cursor(cursor);
// Highlight searched text
let selection = Selection::Normal(Cursor::new(cursor.line, end));
editor.set_selection(selection);
@ -289,7 +292,10 @@ impl EditorTab {
// If we haven't wrapped yet and we've reached the last line, reset cursor line to 0 and
// set wrapped to true so we don't wrap again
if wrap_around && !wrapped && cursor.line == editor.with_buffer(|buffer| buffer.lines.len()) {
if wrap_around
&& !wrapped
&& cursor.line == editor.with_buffer(|buffer| buffer.lines.len())
{
cursor.line = 0;
wrapped = true;
}
@ -320,7 +326,7 @@ impl EditorTab {
return true;
}
// If we haven't wrapped yet and we've reached the first line, reset cursor line to the
// last line and set wrapped to true so we don't wrap again
if wrap_around && !wrapped && cursor.line == 0 {
@ -346,4 +352,4 @@ fn title_with_parent(path: &std::path::Path, file_name: &str) -> String {
Some(parent) => [parent, "/", file_name].concat(),
None => file_name.to_string(),
}
}
}