mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-02-25 02:46:01 +01:00
Fix characters yanking
This commit is contained in:
parent
28abf15720
commit
51f1e6f866
@ -26,6 +26,9 @@ usual beta standards.
|
||||
|
||||
### Fixes:
|
||||
* [VIM-2202](https://youtrack.jetbrains.com/issue/VIM-2202) Fix macro recording for ex command and search
|
||||
* [VIM-1799](https://youtrack.jetbrains.com/issue/VIM-1799)
|
||||
[VIM-1794](https://youtrack.jetbrains.com/issue/VIM-179a)
|
||||
Special characters are not interpreted on yanking
|
||||
|
||||
## 0.64, 2020-12-23
|
||||
|
||||
|
@ -36,6 +36,7 @@ class DeleteCharacterAction : ChangeEditorActionHandler.ForEachCaret() {
|
||||
rawCount: Int,
|
||||
argument: Argument?
|
||||
): Boolean {
|
||||
"\n"
|
||||
return VimPlugin.getChange().deleteCharacter(editor, caret, 1, false)
|
||||
}
|
||||
}
|
||||
|
@ -344,13 +344,19 @@ public class RegisterGroup implements PersistentStateComponent<Element> {
|
||||
final PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
|
||||
if (file == null) return text;
|
||||
String rawText = TextBlockTransferable.convertLineSeparators(text, "\n", transferableDatas);
|
||||
String escapedText;
|
||||
for (CopyPastePreProcessor processor : CopyPastePreProcessor.EP_NAME.getExtensionList()) {
|
||||
escapedText = processor.preprocessOnCopy(file, textRange.getStartOffsets(), textRange.getEndOffsets(), rawText);
|
||||
if (escapedText != null) {
|
||||
return escapedText;
|
||||
|
||||
|
||||
if (OptionsManager.INSTANCE.getIdeacopypreprocess().getValue()) {
|
||||
String escapedText;
|
||||
for (CopyPastePreProcessor processor : CopyPastePreProcessor.EP_NAME.getExtensionList()) {
|
||||
escapedText = processor.preprocessOnCopy(file, textRange.getStartOffsets(), textRange.getEndOffsets(), rawText);
|
||||
if (escapedText != null) {
|
||||
return escapedText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
|
@ -90,6 +90,9 @@ object OptionsManager {
|
||||
val ideawrite = addOption(BoundStringOption("ideawrite", "ideawrite", IdeaWriteData.all, IdeaWriteData.allValues))
|
||||
val ideavimsupport = addOption(BoundListOption("ideavimsupport", "ideavimsupport", arrayOf("dialog"), arrayOf("dialog", "singleline", "dialoglegacy")))
|
||||
|
||||
// This should be removed in the next versions
|
||||
val ideacopypreprocess = addOption(ToggleOption("ideacopypreprocess", "ideacopypreprocess", false))
|
||||
|
||||
fun isSet(name: String): Boolean {
|
||||
val option = getOption(name)
|
||||
return option is ToggleOption && option.getValue()
|
||||
|
@ -429,4 +429,15 @@ class VimSurroundExtensionTest : VimTestCase() {
|
||||
typeText(parseKeys("cs(]"))
|
||||
myFixture.checkResult(after)
|
||||
}
|
||||
|
||||
fun `test change new line`() {
|
||||
val before = """
|
||||
"\n"
|
||||
""".trimIndent()
|
||||
configureByText(before)
|
||||
|
||||
typeText(parseKeys("cs\"'"))
|
||||
val after = """'\n'"""
|
||||
myFixture.checkResult(after)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user