Fixup search highlighting

.. on Linux/Windows since its slightly different.
.. also fixes a SEGV