Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed warnings
  • Loading branch information
adaschma committed Jun 21, 2024
commit 7843c9879c3ea3bc29ea1e139d36ef4daf09099c
2 changes: 0 additions & 2 deletions src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,6 @@ impl Reedline {
);

self.painter.repaint_buffer(
prompt,
&lines,
self.prompt_edit_mode(),
None,
Expand Down Expand Up @@ -1798,7 +1797,6 @@ impl Reedline {
let menu = self.menus.iter().find(|menu| menu.is_active());

self.painter.repaint_buffer(
prompt,
&lines,
self.prompt_edit_mode(),
menu,
Expand Down
8 changes: 2 additions & 6 deletions src/painting/painter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use {
crate::{
menu::{Menu, ReedlineMenu},
painting::PromptLines,
Prompt,
},
crossterm::{
cursor::{self, MoveTo, RestorePosition, SavePosition},
Expand Down Expand Up @@ -185,7 +184,6 @@ impl Painter {
/// the screen.
pub(crate) fn repaint_buffer(
&mut self,
prompt: &dyn Prompt,
lines: &PromptLines,
prompt_mode: PromptEditMode,
menu: Option<&ReedlineMenu>,
Expand Down Expand Up @@ -229,9 +227,9 @@ impl Painter {
.queue(Clear(ClearType::FromCursorDown))?;

if self.large_buffer {
self.print_large_buffer(prompt, lines, menu, theme)?;
self.print_large_buffer(lines, menu, theme)?;
} else {
self.print_small_buffer(prompt, lines, menu, theme)?;
self.print_small_buffer(lines, menu, theme)?;
}

// The last_required_lines is used to calculate safe range of the current prompt.
Expand Down Expand Up @@ -315,7 +313,6 @@ impl Painter {

fn print_small_buffer(
&mut self,
prompt: &dyn Prompt,
lines: &PromptLines,
menu: Option<&ReedlineMenu>,
theme: &Theme,
Expand Down Expand Up @@ -366,7 +363,6 @@ impl Painter {

fn print_large_buffer(
&mut self,
prompt: &dyn Prompt,
lines: &PromptLines,
menu: Option<&ReedlineMenu>,
theme: &Theme,
Expand Down
1 change: 0 additions & 1 deletion src/prompt/base.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use {
crossterm::style::Color,
serde::{Deserialize, Serialize},
std::{
borrow::Cow,
Expand Down