mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2026-10-16 20:33:57 +02:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d7dada898
|
||
|
|
649e6aac8c
|
||
|
|
8e5bee5eb3
|
||
|
|
19a1ad698c
|
||
|
|
5d79c93e4e
|
||
|
|
08cb48682d
|
||
|
|
d0ccad28c9
|
+1
-1
@@ -18,7 +18,7 @@ ideaVersion=2026.1
|
||||
# Values for type: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension-type
|
||||
ideaType=IU
|
||||
instrumentPluginCode=true
|
||||
version=9999.61-chylex
|
||||
version=9999.60-chylex
|
||||
javaVersion=21
|
||||
remoteRobotVersion=0.11.23
|
||||
antlrVersion=4.10.1
|
||||
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright 2003-2023 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 com.maddyhome.idea.vim.vimscript.model.functions.handlers
|
||||
|
||||
import com.intellij.refactoring.rename.inplace.InplaceRefactoring
|
||||
import com.intellij.vim.annotations.VimscriptFunction
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
import com.maddyhome.idea.vim.vimscript.model.VimLContext
|
||||
import com.maddyhome.idea.vim.vimscript.model.datatypes.VimInt
|
||||
import com.maddyhome.idea.vim.vimscript.model.datatypes.asVimInt
|
||||
import com.maddyhome.idea.vim.vimscript.model.functions.BuiltinFunctionHandler
|
||||
|
||||
@VimscriptFunction(name = "isinplacerenaming")
|
||||
internal class IsInPlaceRenaming : BuiltinFunctionHandler<VimInt>() {
|
||||
override fun doFunction(arguments: Arguments, editor: VimEditor, context: ExecutionContext, vimContext: VimLContext) =
|
||||
(InplaceRefactoring.getActiveInplaceRenamer(editor.ij) != null).asVimInt()
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"has": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.HasFunctionHandler",
|
||||
"isactionenabled": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.IsActionEnabled",
|
||||
"isinplacerenaming": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.IsInPlaceRenaming",
|
||||
"pumvisible": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.PopupMenuVisibleFunctionHandler"
|
||||
}
|
||||
@@ -32,7 +32,6 @@ import com.maddyhome.idea.vim.helper.CharacterHelper.charType
|
||||
import com.maddyhome.idea.vim.helper.NumberType
|
||||
import com.maddyhome.idea.vim.helper.StrictMode
|
||||
import com.maddyhome.idea.vim.helper.endOffsetInclusive
|
||||
import com.maddyhome.idea.vim.helper.isCaretAtLineEnd
|
||||
import com.maddyhome.idea.vim.helper.usesVirtualSpace
|
||||
import com.maddyhome.idea.vim.key.AbbreviationContext
|
||||
import com.maddyhome.idea.vim.key.findAndResolveAbbreviation
|
||||
@@ -389,7 +388,7 @@ abstract class VimChangeGroupBase : VimChangeGroup {
|
||||
caret.moveToOffset(position)
|
||||
} else {
|
||||
repeatInsertText(editor, context, count)
|
||||
if (!(editor.isCaretAtLineEnd(caret, true) && editor.charAt(caret.offset - 1).let { it == ' ' || it == '\t' })) {
|
||||
if (!(editor.charAt(caret.offset) == '\n' && editor.charAt(caret.offset - 1).let { it == ' ' || it == '\t' })) {
|
||||
val position = injector.motion.getHorizontalMotion(editor, caret, -1, false)
|
||||
caret.moveToMotion(position)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user