On Wed, Sep 24, 2014 at 04:05:46PM -0400, Wolfgang Corcoran-Mathe wrote: > Quoth Marc André Tanner on Wed, Sep 24 2014 21:21 +0200: > >>o O should go into insert mode after adding the line > >>a appends at the current cursor place > > > >Fixed > > Marc, > > Thanks very much for your tremendous work on vis.
No problem, contributions welcome! > As currently implemented, o moves the last non-newline character of > the current line to the beginning of the next. e.g.: > > --------| > > o > > -------- > | > ^ > cursor is here. > A begins appending > _before_ the last non-newline character of the current line. Ok the problem is the following commit which makes '$' move to the last character of a line. http://repo.or.cz/w/vis.git/commitdiff/3a24e6a5562e4b1ea456fbe36607bd8a9c92744d I actually wondered why there are so few calls to text_line_end and didn't realize that this is used indirectly via a movement to MOVE_LINE_END in many places. Turns out both variants (moving to the new line at the end of a line and to the character immediately before) are actually needed. This is unfortunate and a bit ugly. I will have to give it some more thought. In the mean time reverting the above mentioned commit should fix those end of line issues. > In addition, a inserts a newline when used at the beginning of an > empty line (is this intentional and ed-like?), Not really intentional but does it really matter? Why would you use 'a' on an empty line instead of 'i'? -- Marc André Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0