mawww / kakoune

mawww's experiment for a better code editor
http://kakoune.org
The Unlicense
9.7k stars 705 forks source link

[BUG] :w write paste wl-clipboard contents #5160

Closed nonumeros closed 2 months ago

nonumeros commented 2 months ago

Version of Kakoune

2024.04.25

Reproducer

copy
foo-'bar-baz'-foo

on the ~scratch~ minibuffer :w and paste the contents.

no characters from the clipboard are visible whatsoever and yet,t the file is written

Outcome

the contents of the wl-clipboard should be visible at all times on the minibufffer

if pasting say foo-'bar-baz'-foo the contents should not only be visible on the minibuffer but also redirected if so desired with any mv operation right after

Expectations

copying foo-'bar-baz'-foo should paste the contents on the minibuffer and not just writing for the sake of it without either a prompt or only until after <ret> follows

anything less than that is just a crappy and sloppy implementation that was not there before

Additional information

No response

Screwtapello commented 2 months ago

I don't understand the reproduction steps you've provided.

When you say "copy", do you mean /bin/cp, or yanking text from within Kakoune, or copying text to the system clipboard?

When you say "on the scratch buffer paste the contents", do you mean Kakoune's p command, or your terminal's "paste from system clipboard" command (often bound to Shift-Insert, or Ctrl-Shift-V)?

When you say "yet the file is written", what file are we talking about? The scratch buffer doesn't represent a file and can't be written.

Are you using some system clipboard integration plugin?

nonumeros commented 2 months ago

see the correction above

:w paste the wl-paste contents of foo-'bar-baz'-foo there

For as long as I can remember the usual behavior was to say paste the contents and and only if <ret> is registered then the file is written.

This current behavior is, I would say, relatively recent. I don't have the time now to git blame it on a commit that causes it [setback] but it's surely there.

nonumeros commented 2 months ago

Have to close it. Sorry for the noise.

I have a few versions installed and cannot reproduce with the latest head. wl-paste pastes the contents successfully. I would have to compile again each and every kak version I have to find out the culprit of pasting right up into the minibuffer the contents even before a <ret> operation is registered .

sorry for the noise again. The issue is there but it's time consuming for me to compile each kak version I have.

nonumeros commented 2 months ago

@Screwtapello I felt obligated to find out the version/revision number where the above issue with the wl-paste happened.

I had compiled kak (latest head) on a different system, and I simply forgot (or mixed up) the two versions when I reported this issue. I could have sworn that it was the latest dated as stated on 4-25-2024. But I was wrong.

It 's actually https://github.com/mawww/kakoune/commit/98b84f2b05e8532703898a85abd06fc28c4e40ac

my apologies