Commits

equalsraf committed 1ada4f9 Merge

Merged in csslayer/vim-qt (pull request #2)

add support for input method cursor focus

Comments (0)

Files changed (2)

src/qt/qvimshell.cpp

 	}
 }
 
-QVariant QVimShell::inputMethodQuery(Qt::InputMethodQuery query)
+QVariant QVimShell::inputMethodQuery(Qt::InputMethodQuery query) const
 {
 	if ( query == Qt::ImFont) {
 		return font();
+	} else if ( query == Qt::ImMicroFocus ) {
+		return QRect(VimWrapper::cursorPosition(), QSize(0, charHeight()));
 	}
 
 	return QVariant();

src/qt/qvimshell.h

 	int charWidth();
 
 	void setEncodingUtf8(bool);
-	virtual QVariant inputMethodQuery(Qt::InputMethodQuery);
+	virtual QVariant inputMethodQuery(Qt::InputMethodQuery) const;
 	void setSlowStringDrawing(bool slow) {m_slowStringDrawing = slow;}
 
 	void setBlinkTime(const long waittime, const long ontime, const long offtime);