Skip to content
GitLab
Menu
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
64d058a8
Commit
64d058a8
authored
Jan 21, 2009
by
hjk
Browse files
Fixes: fakevim: fix df<x>
Details: was broken due to wrong cursor selection approach
parent
f73861d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/fakevim/fakevimhandler.cpp
View file @
64d058a8
...
...
@@ -367,6 +367,7 @@ bool FakeVimHandler::Private::handleEvent(QKeyEvent *ev)
quit
();
return
true
;
}
m_mode
=
CommandMode
;
return
false
;
}
...
...
@@ -1824,11 +1825,15 @@ void FakeVimHandler::Private::recordEndGroup()
QString
FakeVimHandler
::
Private
::
recordRemoveSelectedText
()
{
EditOperation
op
;
//qDebug() << "1 POS: " << position() << " ANCHOR: " << anchor() << m_tc.anchor();
m_tc
.
setPosition
(
anchor
(),
KeepAnchor
);
op
.
m_position
=
qMin
(
position
(),
anchor
());
//qDebug() << "2 POS: " << position() << " ANCHOR: " << anchor() << m_tc.anchor();
//qDebug() << "POS: " << position() << " ANCHOR: " << anchor() << m_tc.anchor();
int
pos
=
m_tc
.
position
();
if
(
pos
==
anchor
())
return
QString
();
m_tc
.
setPosition
(
anchor
(),
MoveAnchor
);
m_tc
.
setPosition
(
pos
,
KeepAnchor
);
op
.
m_position
=
qMin
(
pos
,
anchor
());
op
.
m_from
=
m_tc
.
selection
().
toPlainText
();
//qDebug() << "OP: " << op;
recordOperation
(
op
);
m_tc
.
deleteChar
();
return
op
.
m_from
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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