edit: fix bug when there is no line under current cursor