gabesoft / evil-mc

Multiple cursors implementation for evil-mode
MIT License
393 stars 37 forks source link

Nils out evil-was-yanked-without-register #70

Open jojojames opened 7 years ago

jojojames commented 7 years ago

After calling evil-mc, evil-was-yanked-without-register is nilled out so all yanks afterwards will not go to the 0 register.

  debug--implement-debug-watch(evil-was-yanked-without-register nil set nil)
  set(evil-was-yanked-without-register nil)
  (progn (set name (evil-mc-get-cursor-property state name)))
  (if (boundp name) (progn (set name (evil-mc-get-cursor-property state name))))
  (while --dolist-tail-- (setq name (car --dolist-tail--)) (if (boundp name) (progn (set name (evil-mc-get-cursor-property state name)))) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (let ((--dolist-tail-- names) name) (while --dolist-tail-- (setq name (car --dolist-tail--)) (if (boundp name) (progn (set name (evil-mc-get-cursor-property state name)))) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (let ((names (evil-mc-get-cursor-variables))) (let ((--dolist-tail-- names) name) (while --dolist-tail-- (setq name (car --dolist-tail--)) (if (boundp name) (progn (set name (evil-mc-get-cursor-property state name)))) (setq --dolist-tail-- (cdr --dolist-tail--)))))
  evil-mc-write-cursor-state(((last-position . 16784) (undo-stack-pointer) (undo-stack) (kill-ring "jj*--org-agenda" "le, visit it ") (evil-jump-list) (evil-jumper--window-jumps . #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8125 data ( ...))) (evil-repeat-ring 0 0 . [nil nil nil nil nil nil nil nil nil nil]) (evil-markers-alist (40 . evil-backward-sentence) (41 . evil-forward-sentence) (123 . evil-backward-paragraph) (125 . evil-forward-paragraph) (39 . evil-jump-backward-swap) (96 . evil-jump-backward-swap) (60 . evil-visual-beginning) (62 . evil-visual-goto-end) (46 lambda nil (let (last-command) (goto-last-change nil))))))
  evil-mc-cursors-before()
  (progn (evil-mc-cursors-before))
  (if (not (evil-mc-has-cursors-p)) (progn (evil-mc-cursors-before)))
  evil-mc-run-cursors-before()
  (progn (evil-mc-run-cursors-before) (evil-mc-make-cursor-at-pos (point)))
  (if (/= point (point)) (progn (evil-mc-run-cursors-before) (evil-mc-make-cursor-at-pos (point))))
  (while (eq (evil-ex-find-next (evil-mc-get-pattern) (quote forward) t) t) (goto-char (1- (point))) (if (/= point (point)) (progn (evil-mc-run-cursors-before) (evil-mc-make-cursor-at-pos (point)))) (goto-char (1+ (point))))
  (save-excursion (goto-char (point-min)) (while (eq (evil-ex-find-next (evil-mc-get-pattern) (quote forward) t) t) (goto-char (1- (point))) (if (/= point (point)) (progn (evil-mc-run-cursors-before) (evil-mc-make-cursor-at-pos (point)))) (goto-char (1+ (point)))))
  (let ((point (point))) (save-excursion (goto-char (point-min)) (while (eq (evil-ex-find-next (evil-mc-get-pattern) (quote forward) t) t) (goto-char (1- (point))) (if (/= point (point)) (progn (evil-mc-run-cursors-before) (evil-mc-make-cursor-at-pos (point)))) (goto-char (1+ (point))))))
  (progn (let ((point (point))) (save-excursion (goto-char (point-min)) (while (eq (evil-ex-find-next (evil-mc-get-pattern) (quote forward) t) t) (goto-char (1- (point))) (if (/= point (point)) (progn (evil-mc-run-cursors-before) (evil-mc-make-cursor-at-pos (point)))) (goto-char (1+ (point)))))))
  (if (evil-mc-has-pattern-p) (progn (let ((point (point))) (save-excursion (goto-char (point-min)) (while (eq (evil-ex-find-next (evil-mc-get-pattern) (quote forward) t) t) (goto-char (1- (point))) (if (/= point (point)) (progn (evil-mc-run-cursors-before) (evil-mc-make-cursor-at-pos ...))) (goto-char (1+ (point))))))))
  evil-mc-make-cursors-for-all()
  (if (evil-mc-has-cursors-p) (user-error "Cursors already exist.") (evil-mc-set-pattern) (evil-exit-visual-state) (evil-mc-make-cursors-for-all) (evil-mc-print-cursors-info "Created"))
  evil-mc-make-all-cursors()

:Emacs 26

quicknir commented 6 years ago

I actually think maybe this can be closed? I encountered an issue due to this, described here: https://github.com/emacs-evil/evil/issues/864. @jojojames Gave me a fix. Today dealing with something related, I commented out the fix and I can't observe the problem anymore (the original problem was that yy, followed by "0p, didn't work as expected). jojo, maybe you can verify?

jojojames commented 6 years ago

For this one, to trigger the problem you need to trigger evil-mc first.

Still happens to me.