Björn’s PS1 is broken as per comment #2: “You need to bracket _every_ nonprinting sequence of characters with \[\]”. In this case,
PS1="\[\033[01;37m\][ \[\033[01;34m\]\w\[\033[00m\] \[\033[01;37m\]]\n\$\[\033[00m\] "
I cannot reproduce with this fixed PS1. Do you have another example of this broken behavior?
Björn’s PS1 is broken as per comment #2: “You need to bracket _every_ nonprinting sequence of characters with \[\]”. In this case,
PS1="\[ \033[01; 37m\][ \[\033[ 01;34m\ ]\w\[\033[ 00m\] \[\033[ 01;37m\ ]]\n\$\ [\033[00m\ ] "
I cannot reproduce with this fixed PS1. Do you have another example of this broken behavior?