-
Notifications
You must be signed in to change notification settings - Fork 0
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
Plugin changes built-in IDEA behavior #23
Comments
@MarkJeronimus, this happens when line based behaviours are enabled. The IDE does not have any line based selection functionality and the only way I found of adding it is to pre-process and post-process all actions to adjust selection before/after the action. This causes the changes to be broken up in the undo buffer since all three phases (pre-action, action, post-action) are executed as separate actions. Disabling line selection options should stop what you are describing: Also disable line based pastes by setting it to |
You don't understand. I'n not talking about plugin behavior but about IDE behavior that your plugin shouldn't even touch. Typing Ctrl+X without selection is a 'hardwired action' that can't be changed even in the keymap. Besides, in my keymap, Ctrl+X is still mapped to the built-in Edit>Cut. I tried the settings in your utterly confusing tools panels (where even half the tooltips are missing), but as expected they have no effect. Did you even try it yourself? |
@MarkJeronimus, my apologies. I did not convert the Windows shortcut to OS X so was testing the wrong action. On OS X Ctrl+X is delete line, instead of Cut Line/Selection. The issue you are having is due to a bug that fails to test for disabled line based caret adjustments and not perform them for Cut action. I will be making a release shortly, but until then the only workaround is to disable the plugin. |
@MarkJeronimus, new pluigin released. To disable adjustment on cut you can either disable all line selection adjustments or to disable |
Thanks |
Not fixed for the case where the entire line is selected (i.e. by triple-clicking), and the line pasted over. Original behavior places the caret at the start of the next line, your plugin places the caret down to the next line at the same column it was. Even when the line is not selected, pasting a copied whole line at the cursor moves the cursor down at the same column instead of at the end of whatever was pasted. |
Heads up to IDEA Vim users, you might want to disable the selection related features as discussed above. In my case many features of IDEA vim stopped working, namely anything operating on a selection. The problem stopped when I disabled MIA. But! JetBrains support informed me that it might only be when certain features of MIA are enabled, like discussed above; just disabling the line selection features may do the trick, then you can use the many other features of the MIA plug-in. |
With this plugin enabled, build-in behavior of IntelliJ is changed, in a way that impedes my workflow. The effect is so weird yet so subtle that it's hard to explain without sounding confusing.
In IntelliJ there are actions (those that appear in the Keymap) and what i'll call 'hardwired actions' which don't.
On certain hardwired actions (maybe normal actions too) that have nothing to do with the plugin, an additional 'caret move', is performed and inserted into the undo buffer, but this a kind of phantom undo entry because when you undo it, you cannot redo it (it disappears from he undo/redo system).
This additional caret move is exactly what's impeding my work. For example, when the caret in the middle of a line (without selection) and press Ctrl+X, it should cut the entire line to the clipboard and the caret should be moved to column 1. With the plugin enabled, the caret stays in place, but on the line below which moves up. Undoing once puts the caret at the beginning like it's supposed to, and undoing again undoes the cut operation and the caret is in the middle again (and you can only redo once, which cuts the line and moves the caret to the beginning).
I've noticed additional unexpected caret moves in different places but I brushed them off as IDEA behavior as even IDEA often doesn't correctly put caret moves in the undo/redo buffer. For example, there are situations where you can undo once and have to redo twice to get where you were (and can repeat this indefinitely). It's however that I use the Ctrl+X,Ctrl+V,Ctrl+V combination a lot* and I noticed that lately when I do this it corrupts my code. (I thought it was an IDEA regression bug until I tried disabling this plugin.)
*) I interchangeably use Ctrl+X,Ctrl+V,Ctrl+V and Ctrl+C,Ctrl+V,Ctrl+V, but interestingly Ctrl+C is not affected by your bug.
The text was updated successfully, but these errors were encountered: