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
......@@ -209,10 +209,13 @@ FakeVimSettings *theFakeVimSettings()
item->setSettingsKey(group, _("IsKeyword"));
instance->insertItem(ConfigIsKeyword, item, _("iskeyword"), _("isk"));
// Invented here.
item = new SavedAction(instance);
"FakeVim properties..."));
instance->insertItem(SettingsDialog, item);
item->setSettingsKey(group, _("ShowMarks"));
instance->insertItem(ConfigShowMarks, item, _("showmarks"), _("sm"));
return instance;
......@@ -64,7 +64,7 @@ enum FakeVimSettingsCode
// other actions
class FakeVimSettings : public QObject
This diff is collapsed.
......@@ -38,6 +38,38 @@
namespace FakeVim {
namespace Internal {
enum RangeMode
RangeCharMode, // v
RangeLineMode, // V
RangeBlockMode, // Ctrl-v
RangeBlockAndTailMode, // Ctrl-v for D and X
struct 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
......@@ -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);
class Private;
......@@ -101,4 +132,7 @@ private:
} // namespace Internal
} // namespace FakeVim
......@@ -66,6 +66,13 @@
<item row="2" column="2">
<widget class="QCheckBox" name="checkBoxShowMarks">
<property name="text">
<string>Show position of text marks</string>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxSmartTab">
<property name="text">
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment