Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sminez committed Nov 16, 2024
1 parent e2daf90 commit 3871023
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
9 changes: 6 additions & 3 deletions src/editor/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,8 @@ where
}

pub(super) fn show_help(&mut self) {
self.layout.open_virtual("+help", gen_help_docs(), &mut self.ui, false)
self.layout
.open_virtual("+help", gen_help_docs(), &mut self.ui, false)
}

pub(super) fn debug_edit_log(&mut self) {
Expand Down Expand Up @@ -569,7 +570,8 @@ where
.get("filename")
.cloned()
.unwrap_or_else(|| "+plumbing-message".to_string());
self.layout.open_virtual(filename, data, &mut self.ui, load_in_new_window);
self.layout
.open_virtual(filename, data, &mut self.ui, load_in_new_window);
}

_ => {
Expand Down Expand Up @@ -721,7 +723,8 @@ where
}
};
let id = self.active_buffer_id();
self.layout.write_output_for_buffer(id, s, &self.cwd, &mut self.ui);
self.layout
.write_output_for_buffer(id, s, &self.cwd, &mut self.ui);
}
}

Expand Down
18 changes: 9 additions & 9 deletions src/ui/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{
buffer::{Buffer, BufferId, Buffers},
config_handle,
dot::{Cur, Dot},
editor::{ViewPort, Click, MiniBufferState},
editor::{Click, MiniBufferState, ViewPort},
key::Input,
ui::{StateChange, Ui, UserInterface},
ziplist,
Expand Down Expand Up @@ -59,13 +59,7 @@ impl Layout {
held_click: Option<&Click>,
mb: Option<MiniBufferState<'_>>,
) {
ui.refresh(
mode_name,
self,
pending_keys,
held_click,
mb,
);
ui.refresh(mode_name, self, pending_keys, held_click, mb);
self.clear_buffer_modified_from();
}

Expand Down Expand Up @@ -313,7 +307,13 @@ impl Layout {
None
}

pub(crate) fn write_output_for_buffer(&mut self, id: usize, s: String, cwd: &Path, ui: &mut Ui) {
pub(crate) fn write_output_for_buffer(
&mut self,
id: usize,
s: String,
cwd: &Path,
ui: &mut Ui,
) {
let id = self.buffers.write_output_for_buffer(id, s, cwd);
if !self.buffer_is_visible(id) {
self.show_buffer_in_new_window(id);
Expand Down

0 comments on commit 3871023

Please sign in to comment.