-
Notifications
You must be signed in to change notification settings - Fork 102
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
Terminal issue: lines that wrap in (or near) colour changing statements do not wrap to the next line #18
Comments
I am unable to reproduce this. My strong suspicion is that you have not wrapped your color codes in |
After a little bit of poking around, it just seems that the particular emoji doesn't play nicely at all with the terminal. I opened up a boring terminal prompt, pasted it in. It caused havoc to my prompt if I tried to edit the line and if it was a long line. This feels like a limitation in bash or the terminal emulator. Can check that taking out the emoji eliminates the problem? |
@lyze As I said in my previous comment: I can reproduce the problem without the emoji, so the issue isn't caused by it. |
I can't reproduce the problem when using The actual expansion of
I can't see anything wrong with it. I'm really scratching my head here. Some theories that I would need you to help investigate:
|
Great ideas! Here are my results. (spoiler: no luck...)
The issue persist, unfortunately. Even when using |
If you clear
|
Using
(i.e. what you said, but with 'quotes') I guess this rules out posh-git-sh as the culprit, don't you agree? Where do I go next with this issue? The current behaviour is ok if the Terminal window does not have the problematic width (which is one of two or three widths depending on the length of I guess I'll have to resort to a Terminal alternative. |
I'm out of ideas at the moment. By now, I, too, am fairly confident that posh-git-sh isn't the culprit here. A long shot. Do you think you need to update bash or Terminal itself? Also, I think you may want to consider filing an Apple bug report. |
I work on Terminal v2.7.1 (387), which is the latest stable release according to Wikipedia at the moment of writing. Also, I'm running Bash v4.4.5(1)-release ( I'll contact Apple about the issue. |
Thanks for taking the time to look into this! 👍 I hope I'll find a solution for this (and if so, I'll report back here). |
I've opened a discussion thread here. |
I have a problem when the prompt string is a few characters longer than the window width and a branch name is displayed.
The screenshot below illustrates the issue.
What you can see is the branch name is displayed, then the three stacked lines, but then the closing square bracket
]
is shown in blue (instead of yellow) near the beginning of the first line. Also, the input cursor is shown close after the closing square bracket and dollar sign:] $ |
. The yellow pipe|
is my cursor, yellow is the intended colour by the way. Also, the working directory is intended that way, it's there so the dir is quite long. Instead, I could have chosen a very long branch name for similar results.In my
~/.bash_profile
I have set the following.where
$prefix
is myusername@hostname workingdir
and$suffix
is$
, both with some colour specification, but nothing more.When the Terminal window is a little smaller, the problem does not occur; see screenshot below for a terminal window of 77 characters wide. The one above is 80 characters wide. The problem occurs when the windows is 78, 79 or 80 characters wide. Narrower or wider windows behave correctly.
For very narrow Terminal windows (or very long working directories) the problems become worse, especially when the prompt string should wrap around more than 2 lines. Try resizing the Terminal window in a similar situation as my current screenshots show, with quite a long working directory.
The text was updated successfully, but these errors were encountered: