mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
Explorer: support Vim navigation
This commit is contained in:
parent
d67ef089b6
commit
027c8abd17
@ -12,6 +12,7 @@
|
||||
#include "vlineedit.h"
|
||||
#include "vhistorylist.h"
|
||||
#include "vorphanfile.h"
|
||||
#include "utils/vimnavigationforwidget.h"
|
||||
|
||||
extern VMainWindow *g_mainWin;
|
||||
|
||||
@ -773,3 +774,12 @@ void VExplorer::setRootDirectory(const QString &p_path)
|
||||
setCurrentEntry(idx);
|
||||
}
|
||||
}
|
||||
|
||||
void VExplorer::keyPressEvent(QKeyEvent *p_event)
|
||||
{
|
||||
if (VimNavigationForWidget::injectKeyPressEventForVim(m_tree, p_event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
QWidget::keyPressEvent(p_event);
|
||||
}
|
||||
|
@ -28,6 +28,8 @@ protected:
|
||||
|
||||
void focusInEvent(QFocusEvent *p_event) Q_DECL_OVERRIDE;
|
||||
|
||||
void keyPressEvent(QKeyEvent *p_event) Q_DECL_OVERRIDE;
|
||||
|
||||
private slots:
|
||||
void handleEntryActivated(int p_idx);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user