fix CursorAwareWindow exit bug
more tests