when my bash prompt covers most of the line, about 95% percent, or more the first letter typed is drawn in the right place but subsequent letters are drawn on the next line, and when text is erased and then typed again the first letter is incorrectly drawn on the end of the correct line, as shown on the annexed images, sometimes subsequent commands do not exhibit the bug.
My system is arch linux and my version of readline is 8.1.001-1
and my version of bash is 5.1.16(1)-release (x86_64-pc-linux-gnu).
I tested with various terminal emulators and all seemed to have this bug,and when I reported it they said that this bug is part of readline.
something this bug isn't, is the problem that happens when non printable characters in the prompt aren't wrapped with \[ \].
To explain a use case where a prompt covers most of the line, i would like to say that i have a bash prompt with PS1='\[\e[34m\][\u@\h $(smartpwd)]\$ \[\e(B\e[m\]' where smartpwd is a bash command which calls pwd and then sed to change $HOME to ~ so sometimes my prompt gets big covering most of the line.