File indexing completed on 2024-04-21 07:45:14

0001 /*
0002     SPDX-FileCopyrightText: 2008 Erlend Hamberg <ehamberg@gmail.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include <vimode/motion.h>
0008 
0009 using namespace KateVi;
0010 
0011 Motion::Motion(const QString &pattern, Range (NormalViMode::*commandMethod)(), unsigned int flags)
0012     : Command(pattern, nullptr, flags)
0013 {
0014     m_ptr2commandMethod = commandMethod;
0015 }
0016 
0017 Range Motion::execute(NormalViMode *mode) const
0018 {
0019     return (mode->*m_ptr2commandMethod)();
0020 }