I am still not sure what I have done but I was testing some button combinations when I was in nano editor and all of a sudden the contents of the window started not to adjust themselves when I resized the terminal window and everything becomes a huge mess. It is an ssh connection to an ubuntu machine and version is GNU nano 2.2.2. Below is an example of what happens when I resize from fullscreen to something smaller. This happens only for nano editor. Everything else works fine. Anyone has an idea ?