I was debugging in terminal using gdb, and I typed inlayout src,then I entered the UI mode.
Most of the time, it worked fine, but sometimes, the whole terminal text code got mixed.(I post the picture below.).

what's more, sometimes I typed in some shell command in gdb like !pmap <pid>, its output's format was also strange.

I tried to set TERM to screen-256color but it doesn't work.