Update dependencies
This commit is contained in:
parent
5546ed9988
commit
9be376c8af
3 changed files with 84 additions and 72 deletions
|
|
@ -1756,7 +1756,11 @@ impl Application for App {
|
|||
match self.config.find_regex(&self.find_search_value) {
|
||||
Ok(regex) => {
|
||||
//TODO: support captures
|
||||
tab.replace(®ex, &self.find_replace_value, self.config.find_wrap_around);;
|
||||
tab.replace(
|
||||
®ex,
|
||||
&self.find_replace_value,
|
||||
self.config.find_wrap_around,
|
||||
);
|
||||
return self.update(Message::TabChanged(self.tab_model.active()));
|
||||
}
|
||||
Err(err) => {
|
||||
|
|
|
|||
16
src/tab.rs
16
src/tab.rs
|
|
@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue