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

Stop macro execution after a failed search

This commit is contained in:
chylex 2024-08-11 17:34:51 +02:00
parent fb270cdbc5
commit 144cc5c3fc
Signed by: chylex
SSH Key Fingerprint: SHA256:WqM8X/1DDn11LbYM0H5wsqZUjbcKxVsic37L+ERcF4o

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()
} }