When I open my text editor and try to write there this is happening.
What should I do?
Just solved this issue after months of annoyance, by removing the line run_im xim
from ~/.xinputrc
thanks to the people commenting on Ubuntu's issue tracker at https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/1620806
I have another line there for disabling the touch screen but that one is fine.
Now why would the setting of the input method handler affect the background redrawing, I can't even imagine.
run_im xim
line does and why removing it solves the problem.
It maybe that your config for gedit
is messed up you can try to remove the config and reinstall
# Backup the config
tar cvzf ~/gedit-config.backup.tar.gz ~/.config/gedit/
# remove it
rm -rf ~/.config/gedit/
# reinstall gedit
sudo apt-get purge gedit -y && sudo apt-get install gedit -y
~/.config/gedit
after closing gedit, so open it again and see if it's gone. Is not your a keyboard issue?