forked from qt-creator/qt-creator
fakevim: Star and hash search with g
Added g* and g# commands to search without \<, \>. Change-Id: I74f010f2415e4d493be9925ab047a1c06f35d7a9 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -2774,7 +2774,10 @@ EventResult FakeVimHandler::Private::handleCommandMode1(const Input &input)
|
||||
QString needle;
|
||||
QTextCursor tc = cursor();
|
||||
tc.select(QTextCursor::WordUnderCursor);
|
||||
needle = "\\<" + tc.selection().toPlainText() + "\\>";
|
||||
if (m_gflag)
|
||||
needle = tc.selection().toPlainText();
|
||||
else
|
||||
needle = "\\<" + tc.selection().toPlainText() + "\\>";
|
||||
setAnchorAndPosition(tc.position(), tc.anchor());
|
||||
g.searchBuffer.historyPush(needle);
|
||||
m_lastSearch = needle;
|
||||
|
||||
Reference in New Issue
Block a user