mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-10 06:40:37 +02:00
Fixed right selection range of 'vi"' motion
This commit is contained in:
parent
1195b3e507
commit
51837c9e9e
src/com/maddyhome/idea/vim
test/org/jetbrains/plugins/ideavim/action
@ -315,7 +315,11 @@ public class SearchHelper {
|
||||
if (end == -1) {
|
||||
return null;
|
||||
}
|
||||
return new TextRange(isOuter ? start : start + 1, end);
|
||||
if (!isOuter) {
|
||||
start++;
|
||||
end--;
|
||||
}
|
||||
return new TextRange(start, end);
|
||||
}
|
||||
|
||||
private static boolean checkInString(CharSequence chars, int pos, boolean str) {
|
||||
|
@ -875,7 +875,7 @@ public class RegisterActions {
|
||||
new Shortcut("i)")
|
||||
});
|
||||
parser.registerAction(KeyParser.MAPPING_VISUAL | KeyParser.MAPPING_OP_PEND, "VimMotionInnerBlockQuote", Command.Type.MOTION,
|
||||
Command.FLAG_MOT_CHARACTERWISE | Command.FLAG_MOT_EXCLUSIVE | Command.FLAG_TEXT_BLOCK, new Shortcut[]{
|
||||
Command.FLAG_MOT_CHARACTERWISE | Command.FLAG_MOT_INCLUSIVE | Command.FLAG_TEXT_BLOCK, new Shortcut[]{
|
||||
new Shortcut("i\""),
|
||||
});
|
||||
parser.registerAction(KeyParser.MAPPING_VISUAL | KeyParser.MAPPING_OP_PEND, "VimMotionOuterBlockAngle",
|
||||
|
@ -287,6 +287,13 @@ public class MotionActionTest extends VimTestCase {
|
||||
myFixture.checkResult("foo = [\"\", \"two\", \"three\"];\n");
|
||||
}
|
||||
|
||||
// VIM-132 |v_i"|
|
||||
public void testInnerDoubleQuotedStringSelection() {
|
||||
typeTextInFile(stringToKeys("vi\""),
|
||||
"foo = [\"o<caret>ne\", \"two\"];\n");
|
||||
assertSelection("one");
|
||||
}
|
||||
|
||||
// |%|
|
||||
public void testPercentMatchSimple() {
|
||||
typeTextInFile(stringToKeys("%"),
|
||||
|
Loading…
Reference in New Issue
Block a user