emacs-evil / evil

The extensible vi layer for Emacs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect paste behavior

ahan98 opened this issue · comments

Issue type

  • Bug report

Environment

Emacs version: GNU Emacs 29.0.91
Operating System: macOS Ventura 13.4.1
Evil version:
Evil installation type: MELPA
Graphical/Terminal: Graphical
Tested in a make emacs session (see CONTRIBUTING.md): No

Reproduction steps

  1. Install using the "Installation Steps" from the main README, add the following to init.el:
;; Set up package.el to work with MELPA
(require 'package)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(package-refresh-contents)

;; Download Evil
(unless (package-installed-p 'evil)
  (package-install 'evil))

;; Enable Evil
(require 'evil)
(evil-mode 1)
  1. Start Emacs
  2. Type: ihello<esc>yyp (enter insert mode, type hello, then yank and paste the line)

Expected behavior

| represents cursor position, or left edge of cursor block

hello
|hello

Actual behavior

hellohello
|

Further notes

This appears to be a similar issue to #1785 (comment)

Other examples:

Type: iabc<RET>abc<esc>hh<C-v>lkyP (type abc on two lines, copy and paste the first two columns)

Expected:

|ababc
ababc

Actual:

ab
a|babc
abc

I realized this issue was caused by a function I added to my config that modified paste behavior on macOS.