summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorqkzk <qu3nt1n@gmail.com>2023-11-12 18:41:06 +0100
committerqkzk <qu3nt1n@gmail.com>2023-11-12 18:41:06 +0100
commit2b07bc935ec7cf9fa1eaf734a45472b6f2032309 (patch)
tree490c785840539daa4aca9ea7561b7dd5326a2b65 /src
parent0dcaaee0ea5a269f2a0e607d6294d73c82f6c604 (diff)
improve draw
Diffstat (limited to 'src')
-rw-r--r--src/mode.rs2
-rw-r--r--src/term_manager.rs1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/mode.rs b/src/mode.rs
index e7076c2..21575a0 100644
--- a/src/mode.rs
+++ b/src/mode.rs
@@ -39,7 +39,7 @@ impl NeedConfirmation {
/// Since we ask the user confirmation, we need to know how much space
/// is needed.
pub fn cursor_offset(&self) -> usize {
- self.to_string().len() + 8
+ self.to_string().len() + 9
}
/// A confirmation message to be displayed before executing the mode.
diff --git a/src/term_manager.rs b/src/term_manager.rs
index 25dbd63..4614595 100644
--- a/src/term_manager.rs
+++ b/src/term_manager.rs
@@ -687,7 +687,6 @@ impl<'a> WinSecondary<'a> {
/// Display the possible completion items. The currently selected one is
/// reversed.
fn draw_completion(&self, canvas: &mut dyn Canvas) -> Result<()> {
- canvas.set_cursor(0, self.tab.input.cursor_index + Self::EDIT_BOX_OFFSET)?;
for (row, candidate) in self.tab.completion.proposals.iter().enumerate() {
let mut attr = Attr::default();
if row == self.tab.completion.index {