...
 
Commits (2)
......@@ -26,6 +26,7 @@ bytecount = "0.6.0"
termion = "1.5.4"
unicode-width = "0.1.6"
itertools = "0.8.2"
strip-ansi-escapes = "0.1.0"
[dev-dependencies]
regex = "1.3.1"
use std::cmp;
use std::fmt::{self, Write};
use std::io;
use strip_ansi_escapes::strip;
use termion::{self, clear, color, cursor};
use super::complete::Completer;
......@@ -974,14 +975,14 @@ impl<'a, W: io::Write> Editor<'a, W> {
(
format!(
"{}(search)'{}{}{}` ({}/{}): ",
prefix,
&prefix,
color,
self.current_buffer(),
color::Reset.fg_str(),
hplace,
self.history_subset_index.len()
),
prefix.len() + 9,
strip(&prefix).unwrap().len() + 9,
)
} else {
(self.prompt.to_string(), 0)
......