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

PHPStorm insert empty line when copy and paste #165

Open
trta911 opened this issue May 5, 2021 · 1 comment
Open

PHPStorm insert empty line when copy and paste #165

trta911 opened this issue May 5, 2021 · 1 comment
Labels

Comments

@trta911
Copy link

trta911 commented May 5, 2021

Bug description
If I copy and paste this two includes

{include "../@tab.latte"}
{include "../@tabCaseSegment.latte"}

phpstorm show error and empty lines are pasted

Environment:

  • PhpStorm Linux (Debian 10) version 2021.1.2
  • Plugin version 1.1.2-RC1

Stack trace:

nonempty text is not covered by block in #Latte #formatter
Range: [689,767], text fragment: [689,767]


com.intellij.diagnostic.PluginException:  [Plugin: com.jantvrdik.intellij.latte]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:300)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:81)
	at com.intellij.formatting.RangesAssert.assertInvalidRanges(RangesAssert.java:60)
	at com.intellij.formatting.WhiteSpace.changeEndOffset(WhiteSpace.java:126)
	at com.intellij.formatting.InitialInfoBuilder.buildFrom(InitialInfoBuilder.java:135)
	at com.intellij.formatting.InitialInfoBuilder.doIteration(InitialInfoBuilder.java:215)
	at com.intellij.formatting.InitialInfoBuilder.iteration(InitialInfoBuilder.java:112)
	at com.intellij.formatting.engine.WrapBlocksState.doIteration(WrapBlocksState.java:47)
	at com.intellij.formatting.engine.State.iteration(State.java:25)
	at com.intellij.formatting.engine.StateProcessor.iteration(StateProcessor.java:26)
	at com.intellij.formatting.FormatProcessor.iteration(FormatProcessor.java:108)
	at com.intellij.formatting.FormatterImpl.buildProcessorAndWrapBlocks(FormatterImpl.java:428)
	at com.intellij.formatting.FormatterImpl.buildProcessorAndWrapBlocks(FormatterImpl.java:413)
	at com.intellij.formatting.FormatterImpl.adjustLineIndentsForRange(FormatterImpl.java:301)
	at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl$3.doPerform(CodeStyleManagerImpl.java:428)
	at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerRunnable.perform(CodeStyleManagerRunnable.java:92)
	at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.adjustLineIndent(CodeStyleManagerImpl.java:431)
	at com.intellij.codeInsight.editorActions.PasteHandler.indentEachLine(PasteHandler.java:308)
	at com.intellij.codeInsight.editorActions.PasteHandler.lambda$doPaste$5(PasteHandler.java:236)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:959)
	at com.intellij.codeInsight.editorActions.PasteHandler.doPaste(PasteHandler.java:224)
	at com.intellij.codeInsight.editorActions.PasteHandler.lambda$execute$2(PasteHandler.java:112)
	at com.intellij.openapi.project.DumbService.runWithAlternativeResolveEnabled(DumbService.java:369)
	at com.intellij.codeInsight.editorActions.PasteHandler.execute(PasteHandler.java:103)
	at com.intellij.codeInsight.editorActions.PasteHandler.doExecute(PasteHandler.java:59)
	at com.intellij.openapi.editor.actionSystem.DynamicEditorActionHandler.doExecute(DynamicEditorActionHandler.java:52)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$4(EditorActionHandler.java:199)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:89)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:198)
	at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:89)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:216)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:172)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:98)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:73)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAware$5(ActionUtil.java:273)
	at com.intellij.util.SlowOperations.lambda$allowSlowOperations$0(SlowOperations.java:77)
	at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:64)
	at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:76)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:273)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:616)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:676)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:95)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:675)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:626)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:486)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:481)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:232)
	at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:889)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:833)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:502)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

@mesour
Copy link
Collaborator

mesour commented May 8, 2021

@trta911 maybe it is depending on other code in the current template. Can you post the whole template?

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

No branches or pull requests

2 participants