Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[develop] Yanking a multi-line selection in visual mode only yanks first line #14975

Closed
SolidHal opened this issue Aug 5, 2021 · 3 comments
Closed

Comments

@SolidHal
Copy link

SolidHal commented Aug 5, 2021

Description :octocat:

Yanking a multi-line selection in visual mode only yanks first line

only other reference to this issue I could find:
https://old.reddit.com/r/spacemacs/comments/ji3cbu/help_spacemacs_gets_stuck_in_a_weird_state_i_cant/

only workaround I have found is to restart emacs completely.

unsure if this occurs on master as well

Reproduction guide 🪲

  • Start Emacs
  • use emacs for a while, sometime days on the same server session
  • eventually observe this bug

Observed behaviour: 👀 💔

  1. select multiple lines in "line" visual mode: "V"
  2. press "y" to yank selected lines
  3. press "p" to paste the yanked lines
  4. observe only one line is pasted, which was the last hightlighted line

ex: if I select and yank all of the testline#, starting my selection at testline1 and ending it at testline3:

unselectedline_top
testline1
testline2
testline3
unselectedline_bottom

I only paste

testline3

if instead, I start my selection at testline3 and end my selection at testline1
I only paste:

testline1

Expected behaviour: ❤️ 😄

  1. select multiple lines in "line" visual mode: "V"
  2. press "y" to yank selected lines
  3. press "p" to paste the yanked lines
  4. observe all selected and yanked lines are pasted

System Info 💻

  • OS: gnu/linux
  • Emacs: 27.1
  • Spacemacs: 0.300.0
  • Spacemacs branch: develop (rev. 5b3786f)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(clojure javascript csv yaml html php markdown auto-completion git colors spell-checking syntax-checking c-c++ python shell-scripts lsp emacs-lisp helm multiple-cursors treemacs)
  • System configuration features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP

Backtrace 🐾

<<BACKTRACE IF RELEVANT>>
@lebensterben
Copy link
Contributor

This happens to me sometimes.
If you see something in the minibuffer persistent, try C-w j to switch the focus there, and SPC w d to close it. This should not happen and is a bug.

@duianto
Copy link
Contributor

duianto commented Aug 6, 2021

This is a duplicate of:
Evil search bug breaks Spacemacs #10410

As lbensterben said, it occurs when the minibuffer is waiting for input.

This occurs when the minibuffer has focus and another window is selected.

For example when opening an evil search prompt:

/                      ;; evil-ex-search-forward

and another window is selected:

  • C-x o
  • or by mouse clicking in another window

The most upvoted workaround can be found here:
#10410 (comment)

There's a pending PR, upstream:
Exit search prompt on mouse leave minibuffer emacs-evil/evil#1330

But they only solve the issue when another window is selected with the mouse.

@lebensterben
Copy link
Contributor

closing since it's duplicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants