Fix #3130: Move line up/down has incorrect behavior in edge cases in inline editor

Added 2 special cases making it possible to move the second to last line to the last position and to move the last line up without shrinking the editor.

Currently it would be possible to move the last line to end of file or the line before the end of file, but isn't possible to move before the first line since the TexRange doesn't update to reduce the first line of the inline editor. Anyway, this makes it work better than before and maybe with a new implementation of inline editors, we could remove all the restriction and special cases on inline editors.