Mac terminal and nano strangeness

I have seen several reports from Mac users of funny behavior while editing with nano. The main symptom is that the characters in the file "jump around" when you try to edit.

The problem is that the cursor is in the wrong location. (Terminal is showing the cursor in one location, but GL thinks it's somewhere else.)

One example is that you might be editing a long line and the cursor won't move pass the middle of the line. (That's because you think you are on a long line, but GL thinks you are editing a short line.)

So, far these symptoms have only been reported by people who have upgraded to Mac OS X Lion (10.7.x).

The work around is to make sure that you DON'T use the xterm-256colors setting. (Unfortunately, in Lion, this is the default setting.)

To change your setting:

  1. launch the Terminal application
  2. Select the menu item Terminal -> Preferences...
  3. In the "Settings" pane, select "Advanced".
  4. Next to "Declare Terminal as:" there should be a pop-up menu. Select "xterm-color" or "VT100".
  5. If you are logged into GL, you need to logout and log back in.