forked from qt-creator/qt-creator
		
	fakevim: change Find plugin's case sensitivity with ':set (no)ignorecase'
- allow for handling unknown arguments to ':set' by the layer having installed the FakeVim handler - use that to change the Find plugin's case sensitivity Merge-request: 97 Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
		@@ -377,6 +377,9 @@ public:
 | 
			
		||||
    // this asks the layer above (e.g. the fake vim plugin or the
 | 
			
		||||
    // stand-alone test application to handle the command)
 | 
			
		||||
    void passUnknownExCommand(const QString &cmd);
 | 
			
		||||
    // this asks the layer above (e.g. the fake vim plugin or the
 | 
			
		||||
    // stand-alone test application to handle the set command)
 | 
			
		||||
    void passUnknownSetCommand(const QString &cmd);
 | 
			
		||||
 | 
			
		||||
    bool isVisualMode() const { return m_visualMode != NoVisualMode; }
 | 
			
		||||
    bool isNoVisualMode() const { return m_visualMode == NoVisualMode; }
 | 
			
		||||
@@ -2304,7 +2307,7 @@ void FakeVimHandler::Private::handleExCommand(const QString &cmd0)
 | 
			
		||||
            if (act)
 | 
			
		||||
                act->setValue(arg.mid(p + 1));
 | 
			
		||||
        } else {
 | 
			
		||||
            showRedMessage(FakeVimHandler::tr("E512: Unknown option: ") + arg);
 | 
			
		||||
            passUnknownSetCommand(arg);
 | 
			
		||||
        }
 | 
			
		||||
        updateMiniBuffer();
 | 
			
		||||
    } else if (reHistory.indexIn(cmd) != -1) { // :history
 | 
			
		||||
@@ -2332,6 +2335,15 @@ void FakeVimHandler::Private::passUnknownExCommand(const QString &cmd)
 | 
			
		||||
    emit q->handleExCommandRequested(cmd);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void FakeVimHandler::Private::passUnknownSetCommand(const QString &arg)
 | 
			
		||||
{
 | 
			
		||||
    bool handled = false;
 | 
			
		||||
    emit q->handleSetCommandRequested(&handled, arg);
 | 
			
		||||
    if (!handled) {
 | 
			
		||||
        showRedMessage(FakeVimHandler::tr("E512: Unknown option: ") + arg);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void vimPatternToQtPattern(QString *needle, QTextDocument::FindFlags *flags)
 | 
			
		||||
{
 | 
			
		||||
    // FIXME: Rough mapping of a common case
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user