Comments (4)
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.
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.
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.
Seems good -- I can't get the error to happen anymore. Thanks!
from wraptocolumn.
Related Issues (20)
- Asterisk at start of line removed HOT 1
- Ignore non-comments HOT 11
- Select and wrap multiple paragraphs? HOT 6
- Javadoc asterisk prefix characters removed on paragraph format. HOT 1
- Inconsistent text width using minimum raggedness algorithm HOT 1
- Expose functionality as View > Active Editor option to run in real time instead of just function invocation HOT 2
- Bug: PHP line following series of line comments becomes commented out HOT 2
- Invalid state: project settings exist but not loaded yet. The call may cause settings damage. HOT 2
- IDEA 2021.2 (Ultimate Edition) causing java.lang.ClassNotFoundException HOT 14
- SQL-style double-hyphen comments are not supported.
- WrapAction does not respect hard wrap setting HOT 13
- Check if a document is read-only before mutating
- Wrap TODOs in the format JetBrains syntax highlighting expects
- [Feature Request] Recognize Sphinx's `#:` HOT 1
- The ClassNotFoundException thing is going to happen again in 2021.3 HOT 7
- Wrap markdown and (markdown in) YAML
- [feature request] recognize //! used by top-level rustdoc comments
- Wrap text in blockquotes in markdown
- Wrong wrapping of markdown list items at higher levels
- Markdown blockquote syntax is incorrectly wrapped
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wraptocolumn.