Skip to content
Snippets Groups Projects
Commit b6736939 authored by hjk's avatar hjk
Browse files

fakevim: synchronize with master

In theory this should have been a backport of the search-related commits
7e8c345a and 46fa3aa7, but they are buried in the middle of the Big
Commandline Reorganization. Just taking everything has lower risk and
is faster.
parent 878462f7
No related merge requests found
......@@ -209,10 +209,13 @@ FakeVimSettings *theFakeVimSettings()
item->setSettingsKey(group, _("IsKeyword"));
instance->insertItem(ConfigIsKeyword, item, _("iskeyword"), _("isk"));
// Invented here.
item = new SavedAction(instance);
item->setText(QCoreApplication::translate("FakeVim::Internal",
"FakeVim properties..."));
instance->insertItem(SettingsDialog, item);
item->setDefaultValue(false);
item->setValue(false);
item->setSettingsKey(group, _("ShowMarks"));
item->setCheckable(true);
instance->insertItem(ConfigShowMarks, item, _("showmarks"), _("sm"));
return instance;
}
......
......@@ -64,7 +64,7 @@ enum FakeVimSettingsCode
ConfigIsKeyword,
// other actions
SettingsDialog,
ConfigShowMarks,
};
class FakeVimSettings : public QObject
......
This diff is collapsed.
......@@ -38,6 +38,38 @@
namespace FakeVim {
namespace Internal {
enum RangeMode
{
RangeCharMode, // v
RangeLineMode, // V
RangeLineModeExclusive,
RangeBlockMode, // Ctrl-v
RangeBlockAndTailMode, // Ctrl-v for D and X
};
struct Range
{
Range();
Range(int b, int e, RangeMode m = RangeCharMode);
QString toString() const;
int beginPos;
int endPos;
RangeMode rangemode;
};
struct ExCommand
{
ExCommand() : hasBang(false) {}
ExCommand(const QString &cmd, const QString &args = QString(),
const Range &range = Range());
QString cmd;
bool hasBang;
QString args;
Range range;
};
class FakeVimHandler : public QObject
{
Q_OBJECT
......@@ -53,6 +85,8 @@ public:
public slots:
void setCurrentFileName(const QString &fileName);
QString currentFileName() const;
void showBlackMessage(const QString &msg);
void showRedMessage(const QString &msg);
......@@ -76,8 +110,6 @@ signals:
void statusDataChanged(const QString &msg);
void extraInformationChanged(const QString &msg);
void selectionChanged(const QList<QTextEdit::ExtraSelection> &selection);
void writeFileRequested(bool *handled,
const QString &fileName, const QString &contents);
void writeAllRequested(QString *error);
void moveToMatchingParenthesis(bool *moved, bool *forward, QTextCursor *cursor);
void checkForElectricCharacter(bool *result, QChar c);
......@@ -86,8 +118,7 @@ signals:
void windowCommandRequested(int key);
void findRequested(bool reverse);
void findNextRequested(bool reverse);
void handleExCommandRequested(const QString &cmd);
void handleSetCommandRequested(bool *handled, const QString &cmd);
void handleExCommandRequested(bool *handled, const ExCommand &cmd);
public:
class Private;
......@@ -101,4 +132,7 @@ private:
} // namespace Internal
} // namespace FakeVim
Q_DECLARE_METATYPE(FakeVim::Internal::ExCommand);
#endif // FAKEVIM_HANDLER_H
......@@ -66,6 +66,13 @@
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="checkBoxShowMarks">
<property name="text">
<string>Show position of text marks</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxSmartTab">
<property name="text">
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment