Fix line number on new line

Split from https://github.com/limetext/lime/pull/439