Page 1 of 1

Problem with overlapped terminal

Posted: Mon Sep 14, 2015 3:04 pm
by achekulaev
Here were some incorrect assumptions. Please see further for details of my investigation...

Re: Problem with multiline PS1

Posted: Mon Sep 14, 2015 9:20 pm
by achekulaev
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.

Re: Problem with multiline PS1

Posted: Mon Sep 14, 2015 9:23 pm
by achekulaev
It only happens when I have 1 or more lines of overlapped terminals visible. When they are hidden - everything is fine.

Re: Problem with overlapped terminal

Posted: Mon Sep 14, 2015 9:50 pm
by achekulaev
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

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\]\$ "
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

Re: Problem with overlapped terminal

Posted: Wed Sep 16, 2015 6:56 am
by mike
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.