1/*
2 SPDX-FileCopyrightText: 2008 Erlend Hamberg <ehamberg@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include <vimode/motion.h>
8
9using namespace KateVi;
10
11Motion::Motion(const QString &pattern, Range (NormalViMode::*commandMethod)(), unsigned int flags)
12 : Command(pattern, nullptr, flags)
13{
14 m_ptr2commandMethod = commandMethod;
15}
16
17Range Motion::execute(NormalViMode *mode) const
18{
19 return (mode->*m_ptr2commandMethod)();
20}
21

source code of ktexteditor/src/vimode/motion.cpp