1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-11-24 03:37:20 +01:00

Stop macro execution after a failed search

This commit is contained in:
2024-08-11 17:34:51 +02:00
parent fb270cdbc5
commit 144cc5c3fc

View File

@@ -88,8 +88,7 @@ class ProcessSearchEntryAction(private val parentAction: ProcessExEntryAction) :
else -> throw ExException("Unexpected search label ${argument.label}") else -> throw ExException("Unexpected search label ${argument.label}")
} }
// Vim doesn't treat not finding something as an error, although it might report either an error or warning message if (offsetAndMotion == null) return Motion.Error
if (offsetAndMotion == null) return Motion.NoMotion
parentAction.motionType = offsetAndMotion.second parentAction.motionType = offsetAndMotion.second
return offsetAndMotion.first.toMotionOrError() return offsetAndMotion.first.toMotionOrError()
} }