nushell / nushell/reedline

Nushell prompt renders on wrong line

Open
#527 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Display A-Prompt bug help wanted
Dominant language
Rust
Stars
818
Forks
249
Avg merge
4d 14h
Merged PRs (30d)
30

Description

I finally have a repro for a glitch that I've been experiencing in Nushell for a long time. When the cursor is nearly at the bottom of the terminal, after running a command the new prompt renders on the wrong line. I think this is a Reedline issue but apologies if I've filed this in the wrong repo.

Steps to reproduce

  1. Open Nushell in a very short terminal window, clear the screen, and press enter until the cursor is just 1 row from the bottom:
    image

  2. Type the command to cd to a new directory (without pressing enter)
    image

  3. Press enter and observe that the new prompt was rendered on the wrong line (1 line too high)
    image

Version info

Terminal: Windows Terminal Preview v1.16.3464.0
OS: Linux (in WSL2)
Nushell:

key value
version 0.73.1
branch main
commit_hash a9bdc655c1fdbad43e811db059bb502c86e16230
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.65.0 (897e37553 2022-11-02)
rust_channel 1.65.0-x86_64-unknown-linux-gnu
cargo_version cargo 1.65.0 (4bc8f24d3 2022-10-20)
pkg_version 0.73.1
build_time 2023-01-08 18:09:35 -08:00
build_rust_channel debug
features database, default, trash, which, zip
installed_plugins

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the prompt-rendering glitch in a very short terminal using the listed steps, with the cursor one row from the bottom and a directory change. Trace the prompt redraw behavior and confirm that, after pressing enter, the new prompt renders on the correct line without regressing normal prompt rendering.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.