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

Add text editor option to prevent copying current line without a selection #9527

Closed
snoopdouglas opened this issue Apr 15, 2024 · 3 comments · Fixed by godotengine/godot#90743
Milestone

Comments

@snoopdouglas
Copy link

Describe the project you are working on

Platformer. (this is relevant to any project though)

Describe the problem or limitation you are having in your project

When pasting, I sometimes accidentally hit Ctrl-C instead of Ctrl-V on a blank line. This clears the clipboard and I have to go back to copy what I had before. I want to have the option to turn this off.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Similar to VS Code's editor.emptySelectionClipboard option, I'd like to be able to do nothing when copying without a selection.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Add an editor settings option for this, probably under Text Editor > Behaviour.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Not to my knowledge (I've not tried to alter the text editor's behaviour in this way).

Is there a reason why this should be core and not an add-on in the asset library?

It's a common feature for text editors. (can provide more examples if needed.)

@aXu-AP
Copy link

aXu-AP commented Apr 19, 2024

I too sometimes do the same mistake, altough I use copy/cut line command all the time so this option isn't for me. As a workaround when accidents happen, I use clipboard history to paste the correct snippet (Win + V on Windows, I presume other os's have something similiar available).

@snoopdouglas
Copy link
Author

Oh yeah, I'm 100% on board with clipboard managers - it's just that not everyone will have them installed (or be aware of them), and this felt like a relatively small feature request (in my naive opinion)

@Calinou
Copy link
Member

Calinou commented Sep 23, 2024

it's just that not everyone will have them installed

Note that Windows 10/11 come with a built-in clipboard manager (Windows + V). On Linux, KDE also has one out of the box on the same shortcut.

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

Successfully merging a pull request may close this issue.

4 participants