zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.95k stars 1.86k forks source link

Preserve ZLE_KILL and ZLE_YANK flags #551

Open macdems opened 4 years ago

macdems commented 4 years ago

This solves #363.

vincentbernat commented 4 years ago

I am running into an odd bug when applying this commit. Steps to reproduce:

  1. Start a fresh shell
  2. Type echo hello world bye
  3. Type Alt-Backspace (this deletes bye and put it in the ring)
  4. Type Backspace (this deletes the space)
  5. Type Alt-Backspace (this deletes world and put it in the ring)
  6. Type Alt-b (go at the beginning of hello)
  7. Type Ctrl-Y (paste world)
  8. Type Alt-Y (should replace world by bye)

What I get is:

echo hbyeello

Instead of:

echo byehello

ZSH 5.8. Do you have the same bug?

aculich commented 2 months ago

@vincentbernat I added your suggestion as a test and opened a new PR #795 that builds on this one... hopefully they'll both be merged soon @macdems ?