Problem with overlapped terminal
-
- Posts: 50
- Joined: Sat Jul 25, 2015 1:04 am
Problem with overlapped terminal
Here were some incorrect assumptions. Please see further for details of my investigation...
Last edited by achekulaev on Mon Sep 14, 2015 9:50 pm, edited 2 times in total.
-
- Posts: 50
- Joined: Sat Jul 25, 2015 1:04 am
Re: Problem with multiline PS1
So it does not completely break things. But severely. Not sure if it's related to multiline now.
Here is video:
https://dl.dropbox.com/s/2oolw3wcxz921i ... d.mp4?dl=0
Sometimes I'm unable to change dir in 5+ "enter"-s.
Here is video:
https://dl.dropbox.com/s/2oolw3wcxz921i ... d.mp4?dl=0
Sometimes I'm unable to change dir in 5+ "enter"-s.
Last edited by achekulaev on Mon Sep 14, 2015 9:23 pm, edited 1 time in total.
-
- Posts: 50
- Joined: Sat Jul 25, 2015 1:04 am
Re: Problem with multiline PS1
It only happens when I have 1 or more lines of overlapped terminals visible. When they are hidden - everything is fine.
-
- Posts: 50
- Joined: Sat Jul 25, 2015 1:04 am
Re: Problem with overlapped terminal
So I figured out what it is. Files terminals start to glitch because of 2 reasons
1) I have custom function in my PS1. Here is piece of my .bashrc
It outputs git branch of current directory
2) In directories which do contain git repository this function takes some time to execute (of course). Looks like Files doesn't wait for it to finish
1) I have custom function in my PS1. Here is piece of my .bashrc
It outputs git branch of current directory
Code: Select all
__git_ps1 ()
{
local b="$(git branch 2>/dev/null | grep \*)";
if [ -n "$b" ]; then
printf " (git:%s)" "${b:2}";
fi
}
PS1="\t\[\033[01;31m\] \h\[\033[01;34m\] \$PWD\$(__git_ps1)\n\[\033[00m\]\$ "
Re: Problem with overlapped terminal
achekulaev,
It looks like a timing stuff, indeed.
Currently there're some hardcoded timing values in overlapped variant of terminal, one of them seem to cause this behaviour:
10ms for Bash to print it's welcome after COMMAND_PROMPT was executed, in your case it may took some longer time.
I'll try to change logic a bit, so it won't be violated by long waiting for a Bash welcome.
I'll dig into it after non-uniform listings support (search results etc) became somewhat mature.
It looks like a timing stuff, indeed.
Currently there're some hardcoded timing values in overlapped variant of terminal, one of them seem to cause this behaviour:
10ms for Bash to print it's welcome after COMMAND_PROMPT was executed, in your case it may took some longer time.
I'll try to change logic a bit, so it won't be violated by long waiting for a Bash welcome.
I'll dig into it after non-uniform listings support (search results etc) became somewhat mature.