gets previous line of code on ENTER event