I'm working my way through src/usr.bin/vi/docs/tutorial/vi.advanced and I noticed the instructions in Section 33 don't work, or at least, not as expected or described. I installed vim to compare against OpenBSD's vi, nvi. In nvi, when executing the long example line, it simply alternates between putting "Line 26: line 9" above and below a certain line. When using 'gvim -i NONE -u NONE -U NONE' (making sure vim is in vi-compatible mode and using no .vimrc) I get the behavior described in the tutorial: I get to see each of the earlier deleted lines appear and disappear in decreasing order, seeing what was in all the numeric buffers. POSIX doesn't seem very clear on this, but this section seems to support vim's vi-compatible behavior a little: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/vi.html#tag_20_152_13_35
The bug seems to be based around what vi decides the . command applies to. Oddly enough, I don't see the u command in POSIX's list of what . can repeat. This might not be a bug, but may be an intentional deviation from old/POSIX behavior. If so, I'll simply re-work Section 33 of the tutorial. If anyone has access to a System V vi, or any other vi's which aren't nvi or vim, I'd be grateful to hear about how they behave.
