GithubHelp home page GithubHelp logo

Comments (4)

genericmoniker avatar genericmoniker commented on June 1, 2024

Maybe this is related to this bug? I was trying your plugin today (I also think the built-in Fill Paragraph command doesn't work as I would expect many times), and got this exception while running on Windows:

Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(129,602),absolute(498,707),button=1,modifiers=Button1,clickCount=1] on frame0: Wrong line separators: '...he Cameras\r\ntable, s...' at offset 75
java.lang.AssertionError: Wrong line separators: '...he Cameras\r\ntable, s...' at offset 75
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:55)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:54)
at com.intellij.openapi.util.text.StringUtil.assertValidSeparators(StringUtil.java:2132)
at com.intellij.openapi.editor.impl.DocumentImpl.a(DocumentImpl.java:473)
at com.intellij.openapi.editor.impl.DocumentImpl.a(DocumentImpl.java:414)
at com.intellij.openapi.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:407)
at com.andrewbrookins.idea.wrap.WrapAction$WrapHandler$1.run(WrapAction.java:52)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1013)
at com.andrewbrookins.idea.wrap.WrapAction$WrapHandler.execute(WrapAction.java:37)
at com.intellij.openapi.editor.actionSystem.EditorAction$1.run(EditorAction.java:82)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:124)
at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:93)
at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:67)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:151)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:259)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:892)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:114)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:230)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:104)
at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:512)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:682)
at java.awt.EventQueue$3.run(EventQueue.java:680)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:696)
at java.awt.EventQueue$4.run(EventQueue.java:694)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:686)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:507)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:334)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

from wraptocolumn.

abrookins avatar abrookins commented on June 1, 2024

Interesting, thanks for your bug report! I've reopened this issue and I believe I have a fix in place, but I'd like to test it on a real Windows machine instead of relying on unit tests this time.

from wraptocolumn.

abrookins avatar abrookins commented on June 1, 2024

It appears that Intellij always uses the \n character for line endings, and only changes it to the system line ending when files save. If the plugin wraps text using the system line ending character, the text fails an IDE assertion. So we need to do the reverse of this issue, which is to always use \n.

I've uploaded a new build of the plugin that I tested myself on Windows, if you'd like to give it a shot.

from wraptocolumn.

genericmoniker avatar genericmoniker commented on June 1, 2024

Seems good -- I can't get the error to happen anymore. Thanks!

from wraptocolumn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.