Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
51c84911
Commit
51c84911
authored
Nov 02, 2010
by
Arvid Ephraim Picciani
Browse files
fakevim: Fix cursor movement in insert mode on Mac.
Reviewed-by: hjk
parent
b287b06e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/fakevim/fakevimhandler.cpp
View file @
51c84911
...
...
@@ -353,6 +353,9 @@ inline QString msgMarkNotSet(const QString &text)
class
Input
{
public:
// Remove some extra "information" on Mac.
static
int
cleanModifier
(
int
m
)
{
return
m
&
~
Qt
::
KeypadModifier
;
}
Input
()
:
m_key
(
0
),
m_xkey
(
0
),
m_modifiers
(
0
)
{}
...
...
@@ -360,7 +363,7 @@ public:
:
m_key
(
x
.
unicode
()),
m_xkey
(
x
.
unicode
()),
m_modifiers
(
0
),
m_text
(
x
)
{}
Input
(
int
k
,
int
m
,
const
QString
&
t
)
:
m_key
(
k
),
m_modifiers
(
m
),
m_text
(
t
)
:
m_key
(
k
),
m_modifiers
(
cleanModifier
(
m
)
),
m_text
(
t
)
{
// On Mac, QKeyEvent::text() returns non-empty strings for
// cursor keys. This breaks some of the logic later on
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment