saving splitter state on change

to not lose it on unclean exit
Merge pull request #2293 from john-peterson/save2

saving splitter state on change