Sometimes my xterm colors get inverted

I don't know exactly when or why, maybe running less or some command, my white text on a black background gets inverted and all the text looks like it is "selected", it is white background with black text.

it is very annoying.

I found this solution.;.

export TERM=vt100
vi

This magically fixed it, I dunno if this is a permanent solution. Anyone know WHY this happens and how to prevent it or the proper way to fix it?

:confused: