I get something like shown in working.png (
http://kamaraju.googlepages.com/vim_problems ). Now
inside the gvim session, I did
:mksession! test.vim
After this, exiting gvim and opening test.vim using
gvim -S test.vim
gave me something like shown in not_working.png
Have you tried searching for something? My first thought was
that it looked like you had 'hls' set, had searched for something
like
^\_s*\S
and then done ":noh" which wouldn't get saved in the session.
When restoring the session (or with the right options in your
viminfo), the last pattern should get restored, and if hls is
enabled, it would search for that...
Just another idea,
-tim