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:
parent
e358dc9cee
commit
304562a2db
src/main/java/com/maddyhome/idea/vim
@ -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) {
|
||||
|
@ -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,
|
||||
|
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user