]> git.draconx.ca Git - vimconf.git/commit
Tighten constraints on line when restoring last file position.
authorNick Bowler <nbowler@elliptictech.com>
Fri, 3 Feb 2012 14:10:33 +0000 (09:10 -0500)
committerNick Bowler <nbowler@elliptictech.com>
Fri, 3 Feb 2012 14:10:33 +0000 (09:10 -0500)
commit0b203a2db3676d26ab822c52353bc739baff3f75
treecd91917d260f89579467bf36dcbfceae6217301e
parent7d56dde690975cda4c5704a13472a010bd5ae315
Tighten constraints on line when restoring last file position.

Otherwise, line2byte(1) will returns -1 when opening an empty file, and
an error will be produced when trying to jump to that non-existent
position.  Just require the previous line to be >1 before trying to use
it, since changing position to line 1 is pointless anyway.
plugin/keymap.vim