mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2024-11-25 07:42:59 +01:00
Compare commits
29 Commits
8de7a9f741
...
a7def05aa8
Author | SHA1 | Date | |
---|---|---|---|
a7def05aa8 | |||
51e13a5f20 | |||
9b67260d5a | |||
ac37432db6 | |||
4c946568e4 | |||
7e70eed1ab | |||
43ae90044b | |||
d79f7c23c5 | |||
6033450158 | |||
ea86d7132c | |||
711d1f0329 | |||
338e137347 | |||
2b0e9bfec5 | |||
b42346b9e1 | |||
d58d3ca8b0 | |||
22b2ca2352 | |||
1c98daa180 | |||
de906bcbac | |||
05fac8bf00 | |||
a985d260f7 | |||
9f4c679d77 | |||
|
f4cf06a50e | ||
|
86bf8dcc60 | ||
|
d37898b6d3 | ||
|
1edd6a9002 | ||
|
f7fa0dcbd1 | ||
|
4f0a95a803 | ||
|
e443cb0d3c | ||
|
6fa228ee08 |
@ -27,6 +27,8 @@ usual beta standards.
|
||||
|
||||
### Fixes:
|
||||
* [VIM-3055](https://youtrack.jetbrains.com/issue/VIM-3055) Fix the issue with double deleting after dot
|
||||
* [VIM-3291](https://youtrack.jetbrains.com/issue/VIM-3291) Remove sync of editor selection between different opened editors
|
||||
* [VIM-3234](https://youtrack.jetbrains.com/issue/VIM-3234) The space character won't mix in the tab chars after >> and << commands
|
||||
|
||||
### Merged PRs:
|
||||
* [725](https://github.com/JetBrains/ideavim/pull/725) by [Emanuel Gestosa](https://github.com/emanuelgestosa): Regex
|
||||
|
@ -458,7 +458,7 @@ val fixVersionsElementType = "VersionBundleElement"
|
||||
tasks.register("releaseActions") {
|
||||
group = "other"
|
||||
doLast {
|
||||
val tickets = getYoutrackTicketsByQuery("%23%7BReady+To+Release%7D")
|
||||
val tickets = getYoutrackTicketsByQuery("%23%7BReady+To+Release%7D%20and%20tag:%20%7BIdeaVim%20Released%20In%20EAP%7D%20")
|
||||
if (tickets.isNotEmpty()) {
|
||||
println("Updating statuses for tickets: $tickets")
|
||||
setYoutrackStatus(tickets, "Fixed")
|
||||
|
@ -13,7 +13,7 @@ ideaVersion=2023.3.3
|
||||
ideaType=IC
|
||||
downloadIdeaSources=true
|
||||
instrumentPluginCode=true
|
||||
version=chylex-27
|
||||
version=chylex-28
|
||||
javaVersion=17
|
||||
remoteRobotVersion=0.11.22
|
||||
antlrVersion=4.10.1
|
||||
|
@ -531,7 +531,7 @@ public class ChangeGroup : VimChangeGroupBase() {
|
||||
val soff = editor.getLineStartOffset(l)
|
||||
val eoff = editor.getLineEndOffset(l, true)
|
||||
val woff = injector.motion.moveCaretToLineStartSkipLeading(editor, l)
|
||||
val col = editor.offsetToVisualPosition(woff).column
|
||||
val col = editor.offsetToBufferPosition(woff).column
|
||||
val limit = max(0.0, (col + dir * indentConfig.getTotalIndent(count)).toDouble())
|
||||
.toInt()
|
||||
if (col > 0 || soff != eoff) {
|
||||
|
@ -7,6 +7,8 @@
|
||||
*/
|
||||
package com.maddyhome.idea.vim.group
|
||||
|
||||
import com.intellij.codeInsight.completion.CompletionPhase
|
||||
import com.intellij.codeInsight.completion.impl.CompletionServiceImpl
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.diagnostic.logger
|
||||
import com.intellij.openapi.progress.ProcessCanceledException
|
||||
@ -77,7 +79,7 @@ internal class MacroGroup : VimMacroBase() {
|
||||
ProgressManager.getInstance().executeNonCancelableSection {
|
||||
// Prevent autocompletion during macros.
|
||||
// See https://github.com/JetBrains/ideavim/pull/772 for details
|
||||
// CompletionServiceImpl.setCompletionPhase(CompletionPhase.NoCompletion)
|
||||
CompletionServiceImpl.setCompletionPhase(CompletionPhase.NoCompletion)
|
||||
getInstance().handleKey(editor, key, context)
|
||||
}
|
||||
if (injector.messages.isError()) return@runnable
|
||||
|
@ -66,11 +66,9 @@ import com.maddyhome.idea.vim.group.IjOptions
|
||||
import com.maddyhome.idea.vim.group.MotionGroup
|
||||
import com.maddyhome.idea.vim.group.OptionGroup
|
||||
import com.maddyhome.idea.vim.group.ScrollGroup
|
||||
import com.maddyhome.idea.vim.group.SearchGroup
|
||||
import com.maddyhome.idea.vim.group.visual.IdeaSelectionControl
|
||||
import com.maddyhome.idea.vim.group.visual.VimVisualTimer
|
||||
import com.maddyhome.idea.vim.group.visual.moveCaretOneCharLeftFromSelectionEnd
|
||||
import com.maddyhome.idea.vim.group.visual.vimSetSystemSelectionSilently
|
||||
import com.maddyhome.idea.vim.handler.correctorRequester
|
||||
import com.maddyhome.idea.vim.handler.keyCheckRequests
|
||||
import com.maddyhome.idea.vim.helper.GuicursorChangeListener
|
||||
@ -442,8 +440,6 @@ internal object VimListenerManager {
|
||||
}
|
||||
|
||||
private object EditorSelectionHandler : SelectionListener {
|
||||
private var myMakingChanges = false
|
||||
|
||||
/**
|
||||
* This event is executed for each caret using [com.intellij.openapi.editor.CaretModel.runForEachCaret]
|
||||
*/
|
||||
@ -492,22 +488,9 @@ internal object VimListenerManager {
|
||||
IdeaSelectionControl.controlNonVimSelectionChange(editor)
|
||||
}
|
||||
|
||||
if (myMakingChanges || document is DocumentEx && document.isInEventsHandling) {
|
||||
if (document is DocumentEx && document.isInEventsHandling) {
|
||||
return
|
||||
}
|
||||
|
||||
myMakingChanges = true
|
||||
try {
|
||||
// Synchronize selections between editors
|
||||
val newRange = selectionEvent.newRange
|
||||
for (e in localEditors(document)) {
|
||||
if (e != editor) {
|
||||
e.selectionModel.vimSetSystemSelectionSilently(newRange.startOffset, newRange.endOffset)
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
myMakingChanges = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ import com.intellij.internal.statistic.service.fus.collectors.CounterUsagesColle
|
||||
|
||||
internal class ActionTracker : CounterUsagesCollector() {
|
||||
companion object {
|
||||
private val GROUP = EventLogGroup("vim.actions", 1)
|
||||
private val GROUP = EventLogGroup("vim.actions", 1, "FUS")
|
||||
private val TRACKED_ACTIONS = GROUP.registerEvent(
|
||||
"tracked",
|
||||
EventFields.StringValidatedByCustomRule("action_id", ActionRuleValidator::class.java),
|
||||
|
@ -48,7 +48,7 @@ internal class OptionsState : ApplicationUsagesCollector() {
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val GROUP = EventLogGroup("vim.options", 1)
|
||||
private val GROUP = EventLogGroup("vim.options", 1, "FUS")
|
||||
|
||||
private val IDEAJOIN = BooleanEventField(IjOptions.ideajoin.name)
|
||||
private val IDEAMARKS = BooleanEventField(IjOptions.ideamarks.name)
|
||||
|
@ -31,7 +31,7 @@ internal class PluginState : ApplicationUsagesCollector() {
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val GROUP = EventLogGroup("vim.common", 1)
|
||||
private val GROUP = EventLogGroup("vim.common", 1, "FUS")
|
||||
|
||||
val extensionNames = listOf("textobj-entire", "argtextobj", "ReplaceWithRegister", "vim-paragraph-motion", "highlightedyank", "multiple-cursors", "exchange", "NERDTree", "surround", "commentary", "matchit", "textobj-indent")
|
||||
val enabledExtensions = HashSet<String>()
|
||||
|
@ -72,7 +72,7 @@ internal class ShortcutConflictState : ApplicationUsagesCollector() {
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val GROUP = EventLogGroup("vim.handlers", 1)
|
||||
private val GROUP = EventLogGroup("vim.handlers", 1, "FUS")
|
||||
|
||||
private val keyStrokes = listOf(
|
||||
KeyStroke.getKeyStroke('1'.code, CTRL_DOWN_MASK),
|
||||
|
@ -37,7 +37,7 @@ internal class VimscriptState : ApplicationUsagesCollector() {
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val GROUP = EventLogGroup("vim.vimscript", 1)
|
||||
private val GROUP = EventLogGroup("vim.vimscript", 1, "FUS")
|
||||
|
||||
val sourcedFiles = HashSet<String>()
|
||||
val extensionsEnabledWithPlug = HashSet<String>()
|
||||
|
@ -19,7 +19,7 @@
|
||||
<!-- Please search for "[VERSION UPDATE]" in project in case you update the since-build version -->
|
||||
<!-- Check for [Version Update] tag in YouTrack as well -->
|
||||
<!-- Also, please update the value in build.gradle.kts file-->
|
||||
<idea-version since-build="232"/>
|
||||
<idea-version since-build="233"/>
|
||||
|
||||
<!-- Mark the plugin as compatible with RubyMine and other products based on the IntelliJ platform (including CWM) -->
|
||||
<depends>com.intellij.modules.platform</depends>
|
||||
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright 2003-2024 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
||||
* https://opensource.org/licenses/MIT.
|
||||
*/
|
||||
|
||||
package org.jetbrains.plugins.ideavim.action.change.shift
|
||||
|
||||
import com.intellij.application.options.CodeStyle
|
||||
import com.intellij.ide.highlighter.JavaFileType
|
||||
import org.jetbrains.plugins.ideavim.SkipNeovimReason
|
||||
import org.jetbrains.plugins.ideavim.TestWithoutNeovim
|
||||
import org.jetbrains.plugins.ideavim.VimJavaTestCase
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class ShiftRightLinesActionTest : VimJavaTestCase() {
|
||||
@TestWithoutNeovim(SkipNeovimReason.NOT_VIM_TESTING)
|
||||
@Test
|
||||
fun `add indent for java file`() {
|
||||
|
||||
val before = """
|
||||
|public class C {
|
||||
|.I${c}nteger a;
|
||||
|}
|
||||
""".trimMargin().dotToTab()
|
||||
val after = """
|
||||
|public class C {
|
||||
|.....Integer a;
|
||||
|}
|
||||
""".trimMargin().dotToTab()
|
||||
|
||||
usingTabs {
|
||||
configureByJavaText(before)
|
||||
typeText(">>".repeat(4))
|
||||
assertState(after)
|
||||
}
|
||||
}
|
||||
|
||||
private fun usingTabs(action: () -> Unit) {
|
||||
val testSettings = CodeStyle.createTestSettings()
|
||||
val javaSettings = testSettings.getIndentOptions(JavaFileType.INSTANCE)
|
||||
javaSettings.USE_TAB_CHARACTER = true
|
||||
CodeStyle.setTemporarySettings(fixture.project, testSettings)
|
||||
try {
|
||||
action()
|
||||
} finally {
|
||||
CodeStyle.dropTemporarySettings(fixture.project)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user