Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Add new pref: lineWiseCopyCut #11706

Merged
merged 1 commit into from
Jul 24, 2016
Merged

Conversation

marcelgerber
Copy link
Contributor

For #9311. Adds a new pref lineWiseCopyCut (still enabled by default) to suppress copy/cut from copying/cutting a whole line when there's no selection.

See also http://codemirror.net/doc/manual.html#option_lineWiseCopyCut.

@le717
Copy link
Contributor

le717 commented Sep 16, 2015

I don't think this is quite the issue reported. The problem was not whole-line cut/copy as a feature, but that it copy/pastes a totally blank line when used on a blank line. The desired fix was for it to not activate at all on blank lines. The issue, as I already detailed, is the "\n" CodeMirror always adds to the end of the copied line. With those removed (more like added only under proper circumstances), using whole-line cut/copy on a blank line works as desired (and also as I said, remedies a number described in #9130).

EDIT: I could be reading this all wrong and this PR does exactly what needs to be done instead of completely disabling the feature (as I initially thought). Apologies if that is the case. :\

@marcelgerber
Copy link
Contributor Author

This actually is what you think it is.
The pref, when disabled, disables the whole copy-line-where-cursor-is-on feature.

Even though this may not be the exact solution to the referenced issue, I guess it is a step in the right direction either way.

@ficristo
Copy link
Collaborator

This options seems useful to me. I like this.
/cc @swmitra @nethip

@Denisov21
Copy link
Contributor

Good idea for me!

@M4TH76
Copy link

M4TH76 commented Jun 12, 2016

That would really help me, I often accidentally blind type Ctrl-C instead of Ctrl-V

@ficristo
Copy link
Collaborator

LGTM, but the description is not correct: is not only about empty lines.

@marcelgerber
Copy link
Contributor Author

Argh, now it's back to almost exactly the wording the CM manual uses.

@ficristo
Copy link
Collaborator

Thank you, LGTM.

@marcelgerber marcelgerber merged commit 78548a5 into master Jul 24, 2016
@marcelgerber marcelgerber deleted the marcel/pref-linewise-copy branch July 24, 2016 08:04
@marcelgerber
Copy link
Contributor Author

Thank you for reviewing!

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

Successfully merging this pull request may close these issues.

None yet

5 participants