KTextEditor

motion.cpp
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}
Commands for the vi normal mode.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:15:44 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.