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

Remove the notification about the new undo functionality

This commit is contained in:
Alex Plate 2025-01-27 10:43:18 +02:00
parent e358dc9cee
commit 304562a2db
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F
3 changed files with 0 additions and 30 deletions
src/main/java/com/maddyhome/idea/vim

View File

@ -18,7 +18,6 @@ import kotlin.reflect.KProperty
internal class VimState {
var isIdeaJoinNotified by StateProperty("idea-join")
var isIdeaPutNotified by StateProperty("idea-put")
var isNewUndoNotified by StateProperty("idea-undo")
var wasSubscibedToEAPAutomatically by StateProperty("was-automatically-subscribed-to-eap")
fun readData(element: Element) {

View File

@ -62,25 +62,6 @@ internal class NotificationService(private val project: Project?) {
@Suppress("unused")
constructor() : this(null)
fun notifyAboutNewUndo() {
val notification = Notification(
IDEAVIM_NOTIFICATION_ID,
"Undo in IdeaVim now works like in Vim",
"""
Caret movement is no longer a separate undo step, and full insert is undoable in one step.
""".trimIndent(),
NotificationType.INFORMATION,
)
notification.addAction(object : DumbAwareAction("Share Feedback") {
override fun actionPerformed(p0: AnActionEvent) {
BrowserUtil.browse("https://youtrack.jetbrains.com/issue/VIM-547/Undo-splits-Insert-mode-edits-into-separate-undo-chunks")
}
})
notification.notify(project)
}
fun notifyAboutIdeaPut() {
val notification = Notification(
IDEAVIM_NOTIFICATION_ID,

View File

@ -18,9 +18,7 @@ import com.intellij.openapi.editor.Editor
import com.intellij.openapi.fileEditor.TextEditor
import com.intellij.openapi.fileEditor.TextEditorWithPreview
import com.intellij.openapi.fileEditor.impl.text.TextEditorProvider
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.registry.Registry
import com.maddyhome.idea.vim.VimPlugin
import com.maddyhome.idea.vim.api.ExecutionContext
import com.maddyhome.idea.vim.api.VimCaret
import com.maddyhome.idea.vim.api.VimEditor
@ -88,7 +86,6 @@ internal class UndoRedoHelper : VimTimestampBasedUndoService {
removeSelections(editor)
}
} else {
notifyAboutNewUndo(editor.ij.project)
runWithBooleanRegistryOption("ide.undo.transparent.caret.movement", true) {
var nextUndoNanoTime = undoManager.getNextUndoNanoTime(fileEditor)
val insertInfo = (editor.primaryCaret() as IjVimCaret).getInsertSequenceForTime(nextUndoNanoTime)
@ -109,13 +106,6 @@ internal class UndoRedoHelper : VimTimestampBasedUndoService {
}
}
private fun notifyAboutNewUndo(project: Project?) {
if (VimPlugin.getVimState().isNewUndoNotified) return
VimPlugin.getVimState().isNewUndoNotified = true
VimPlugin.getNotifications(project).notifyAboutNewUndo()
}
private fun hasSelection(editor: VimEditor): Boolean {
return editor.primaryCaret().ij.hasSelection()
}