From a621724fb7b4c41b455b802c9a9847de728fc62c Mon Sep 17 00:00:00 2001 From: WindSoilder Date: Thu, 4 Jan 2024 16:03:20 +0800 Subject: [PATCH 1/3] adjust is_reset --- src/painting/painter.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/painting/painter.rs b/src/painting/painter.rs index 4ee076ec..f4fb4262 100644 --- a/src/painting/painter.rs +++ b/src/painting/painter.rs @@ -153,7 +153,10 @@ impl Painter { // This might not be terribly performant. Testing it out let is_reset = || match cursor::position() { - Ok(position) => position.1.abs_diff(self.prompt_start_row) > 1, + // when output something without newline, the cursor position is at current line. + // but the prompt_start_row is next line. + // in this case we don't want to reset, need to `add 1` to handle for such case. + Ok(position) => position.1 + 1 < self.prompt_start_row, Err(_) => false, }; From e61be57724b4d6cd67d191e8b1620158b745b7d5 Mon Sep 17 00:00:00 2001 From: WindSoilder Date: Thu, 4 Jan 2024 16:09:05 +0800 Subject: [PATCH 2/3] add a word --- .typos.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.typos.toml b/.typos.toml index 93327348..fcbbb9ff 100644 --- a/.typos.toml +++ b/.typos.toml @@ -6,3 +6,5 @@ extend-exclude = ["src/core_editor/line_buffer.rs"] iterm = "iterm" # For testing completion of the word build bui = "bui" +# For sqlite backend +wheres = "wheres" From 3595360c69d6880681f098a1933328a23ac6f86d Mon Sep 17 00:00:00 2001 From: WindSoilder Date: Thu, 4 Jan 2024 16:19:48 +0800 Subject: [PATCH 3/3] Revert "add a word" This reverts commit e61be57724b4d6cd67d191e8b1620158b745b7d5. --- .typos.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.typos.toml b/.typos.toml index fcbbb9ff..93327348 100644 --- a/.typos.toml +++ b/.typos.toml @@ -6,5 +6,3 @@ extend-exclude = ["src/core_editor/line_buffer.rs"] iterm = "iterm" # For testing completion of the word build bui = "bui" -# For sqlite backend -wheres = "wheres"