Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

vi mode weird when editing previous history entries



This bug is around a little longer, I've seen it in zsh-3.0.0 too.
The effect of it is twofold (maybe there are two separate bugs in-
stead):
- it either zaps the current buffer (after movement commands) or
- it dumps core when attempting deletions with certain movements
  commands.

To reproduce it, you'll need a none-empty history.  Scroll up into
an old history entry, say with up-history (or other history key
commands -- `!' and expand-or-complete won't do), enter vi-cmd-mode
and do vi-set-mark, optionally followed by movements and then do
vi-goto-mark.  Key order:

  vi-cmd-mode               ^[
  up-history                ^P
  vi-set-mark               ma
  vi-goto-mark              `a

The current buffer: is gone.  Doesn't happen when editing a new
buffer freshly filled by typing or one filled by bang expansion.

Now try to vi-delete with vi-goto-mark as movement command.  NOT!
There is at least one similar sequence that violates segmentation:

  up-line-or-history        ^[[A (bound to a cursor key)
  vi-cmd-mode               ^[
  vi-delete                 d
  end-of-buffer-or-history  \M-x end-of-buffer-or-history

I don't think it's something system-specific.  Regards,
--Thorsten



Messages sorted by: Reverse Date, Date, Thread, Author