Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: render newline correctly cross platform/shell
Powershell has an issue rendering multiline prompts when it comes to PSReadline on MacOS. To mitigate that, we make it a multiline prompt by moving the cursor all the way to the end. That way, PSReadline believes this is still a one line prompt and everything works as expected. PowerShell/PowerShell#3687
- Loading branch information
1 parent
5c4af19
commit 6fd9f0b
Showing
2 changed files
with
10 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,5 @@ func main() { | |
Buffer: new(bytes.Buffer), | ||
}, | ||
} | ||
prompt := engine.string() | ||
fmt.Print(prompt) | ||
engine.render() | ||
} |