Closed krasa closed 8 years ago
why would you shift an empty line? but thanks for reporting.
why don't you handle edge cases?
i do, see 31ab1a6d51ea982879263b14822554d2fe039d98. Feel free to comment other edge cases that happen to you.
another one:
String index out of range: 4
java.lang.StringIndexOutOfBoundsException: String index out of range: 4
at java.lang.String.charAt(String.java:686)
at com.kstenschke.shifter.utils.UtilsTextual.extractLineAroundOffset(UtilsTextual.java:396)
at com.kstenschke.shifter.models.ShifterTypesManager.getShiftedWord(ShifterTypesManager.java:273)
at com.kstenschke.shifter.actions.ActionsPerformer.shiftSelection(ActionsPerformer.java:342)
at com.kstenschke.shifter.actions.ActionsPerformer.write(ActionsPerformer.java:82)
at com.kstenschke.shifter.actions.ShiftUpAction$1$1.run(ShiftUpAction.java:55)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:931)
at com.kstenschke.shifter.actions.ShiftUpAction$1.run(ShiftUpAction.java:52)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:124)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
at com.kstenschke.shifter.actions.ShiftUpAction.actionPerformed(ShiftUpAction.java:49)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$3.performAction(IdeKeyEventDispatcher.java:593)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:644)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:483)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:213)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:538)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
thanks 👍
select 2 empty line, shift
dunno how to get this one:
select empty line, shift, - it produces some unknown character, shift few times more: