1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-06-02 04:34:06 +02:00

Temp fix for VIM-2808: disable formatting after paste for rider

This commit is contained in:
Alex Plate 2022-12-22 15:49:04 +02:00
parent d2a427b38f
commit 2091a59897
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F

View File

@ -17,6 +17,7 @@ import com.intellij.openapi.actionSystem.PlatformDataKeys
import com.intellij.openapi.editor.Caret
import com.intellij.openapi.editor.RangeMarker
import com.intellij.openapi.ide.CopyPasteManager
import com.intellij.util.PlatformUtils
import com.maddyhome.idea.vim.VimPlugin
import com.maddyhome.idea.vim.api.ExecutionContext
import com.maddyhome.idea.vim.api.VimCaret
@ -146,6 +147,9 @@ class PutGroup : VimPutBase() {
startOffset: Int,
endOffset: Int,
): Int {
// Temp fix for VIM-2808. Should be removed after rider will fix it's issues
if (PlatformUtils.isRider()) return endOffset
val startLine = editor.offsetToBufferPosition(startOffset).line
val endLine = editor.offsetToBufferPosition(endOffset - 1).line
val startLineOffset = (editor as IjVimEditor).editor.document.getLineStartOffset(startLine)