-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix prompt_start_row
reset to 0 when opening a file without newline in Nushell
#688
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #688 +/- ##
==========================================
+ Coverage 49.17% 49.26% +0.08%
==========================================
Files 46 46
Lines 7924 7911 -13
==========================================
Hits 3897 3897
+ Misses 4027 4014 -13
|
@nibon7 |
It could be reproduced by applying the patch below 😅 , just print something without newline. When we print something without newline, then the reedline/src/painting/painter.rs Line 109 in a4bfaa5
diff --git a/examples/demo.rs b/examples/demo.rs
index 2e7a402..00d3dae 100644
--- a/examples/demo.rs
+++ b/examples/demo.rs
@@ -201,6 +201,7 @@ fn main() -> std::io::Result<()> {
continue;
}
println!("Our buffer: {buffer}");
+ print!(" ");
#[cfg(any(feature = "sqlite", feature = "sqlite-dynlib"))]
if !buffer.is_empty() {
line_editor |
That change makes sense and fixes your provided repro. Thanks @nibon7 |
Fix for nushell#11399 Provided by nushell/reedline#688
Fix for #11399 Provided by nushell/reedline#688
I think this PR is breaking things. I put some notes about it here nushell/nushell#11406 (comment). There's a gif on discord in that link. |
i suspect #675 is the real responsible for these bugs 🤔 |
Reverts #11406 This PR nushell/reedline#688 is causing clear screens to happen at strange times. Documented here #11406 (comment)
We probably need to revert this one too. |
@danielsomerfield @nibon7 sounds like we need to figure out a way to make the new prompt position logic from #675 to work without causing either nushell/nushell#11406 (comment) or nushell/nushell#11399 Maybe we need to rethink how |
Fix for nushell#11399 Provided by nushell/reedline#688
Reverts nushell#11406 This PR nushell/reedline#688 is causing clear screens to happen at strange times. Documented here nushell#11406 (comment)
Try to fix nushell/nushell#11399