Fix #79: Silent exceptions when using left and right arrow keys in empty document with code folding