[ANN] Vim Plugin 0.9.7 (For IDEA 5.0.1)

I rushed the last one out too quickly. Here are a few more bug fixes since 0.9.6:

- Fixed ze command - was one column off.
- Fixed scrolling with horizontal scroll bar. Regression from 0.9.5.
- Fixed :quit command. Now all forms of the command are recognized.
- Fixed internal error when opening an empty file.

5 comments


It looks great. The Ctrl-E and Ctrl-Y fixes are especially welcome.

However I did notice one problem. Using Ctrl-U or Ctrl-D appears to modify the file. I noticed because I am using Perforce and when I use one of these commands on an unopened file, it asks if I want to open it for edit.

The problem can be reproduced by opening a file on which you do not have write access and trying one of these commands. When I do this, I get a beep and the command fails.

Thanks for the work you're doing on this. It's great to see the continued development.

-Bruce

0


Also, in the debugger, when using "Evaluate Expression", I got the following stack trace.

Thanks,
-Bruce


Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(47,802),button=1,modifiers=Button1,clickCount=1] on frame0: Wrong offset: 30228 textLength: 23
java.lang.IndexOutOfBoundsException: Wrong offset: 30228 textLength: 23
at com.intellij.openapi.editor.impl.EditorImpl.b(EditorImpl.java:1141)
at com.intellij.openapi.editor.impl.EditorImpl.offsetToLogicalPosition(EditorImpl.java:1298)
at com.maddyhome.idea.vim.helper.EditorHelper.getLineEndForOffset(EditorHelper.java:509)
at com.maddyhome.idea.vim.group.MotionGroup.updateSelection(MotionGroup.java:1610)
at com.maddyhome.idea.vim.group.MotionGroup.moveCaret(MotionGroup.java:1180)
at com.maddyhome.idea.vim.group.MotionGroup.moveCaretToView(MotionGroup.java:920)
at com.maddyhome.idea.vim.group.MotionGroup$EditorScrollHandler.visibleAreaChanged(MotionGroup.java:1747)
at com.intellij.openapi.editor.impl.ScrollingModelImpl$1.stateChanged(ScrollingModelImpl.java:4)
at javax.swing.JViewport.fireStateChanged(JViewport.java:1357)
at javax.swing.JViewport.reshape(JViewport.java:837)
at java.awt.Component.setBounds(Component.java:1847)
at java.awt.Component.setBounds(Component.java:1976)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:869)
at java.awt.Container.layout(Container.java:1401)
at java.awt.Container.doLayout(Container.java:1390)
at java.awt.Container.validateTree(Container.java:1473)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validate(Container.java:1448)
at com.intellij.openapi.ui.Splitter.doLayout(Splitter.java:220)
at java.awt.Container.validateTree(Container.java:1473)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validate(Container.java:1448)
at java.awt.Window.pack(Window.java:495)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:13)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:99)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:739)
at com.intellij.debugger.actions.EvaluateAction.showEvaluationDialog(EvaluateAction.java:25)
at com.intellij.debugger.actions.EvaluateAction.showEvaluationDialog(EvaluateAction.java:9)
at com.intellij.debugger.actions.EvaluateAction.actionPerformed(EvaluateAction.java:19)
at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:59)
at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:92)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:13)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:145)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:53)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

0

I found the issue with Ctrl-U and Ctrl-D. I never tried them against read-only files.

Thanks for the heads-up.

Rick

0

I tried a simple test but couldn't reproduce this. I've never used the debugger before. Would you be kind enough to give exact steps to reproduce. I can get as far as bringing up the "Evaluate Expression" dialog but from there I couldn't get the error you reported.

Thanks,
Rick

0

All I did to get the problem was to:
1. Set a breakpoint
2. Run the program
3. Select a variable and hit the Evaluate Expression button in the debugger (the calculator icon.)

This caused the stack trace and I didn't a window up at all.

However, there is one big caveat. I am still stuck on Irida build 3405 (company won't buy a 5.0 license, but I like the perforce integration, so I'm sticking with this build.) So I can certainly understand that there may be problems due to my being on a slightly different version of the plugin API, which are not legitimate problems in IdeaVIM.

Another issue I hit is that when searching for something that is not on the current page, while it centers the found pattern on the middle of the page, the cursor ends up on the top of the page. Also when commands like "0", "$", "gg" send the cursor off the screen, it does not position the cursor at the right place.

Again, I am not sure whether this is due to my being on an old build, or a legitimate problem.

Thanks,
-Bruce

0

Please sign in to leave a comment.