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
4f68f29f
Commit
4f68f29f
authored
Jan 02, 2009
by
Martin Aumueller
Committed by
hjk
Jan 13, 2009
Browse files
fakevim: fix 'dG'
parent
e4a1edca
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/fakevim/fakevimhandler.cpp
View file @
4f68f29f
...
...
@@ -690,7 +690,7 @@ bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text)
m_gflag
=
true
;
}
else
if
(
key
==
'G'
)
{
int
n
=
m_mvcount
.
isEmpty
()
?
linesInDocument
()
:
count
();
m_tc
.
setPosition
(
positionForLine
(
n
),
Move
Anchor
);
m_tc
.
setPosition
(
positionForLine
(
n
),
Keep
Anchor
);
if
(
m_config
.
contains
(
ConfigStartOfLine
))
moveToFirstNonBlankOnLine
();
finishMovement
();
...
...
@@ -1245,7 +1245,7 @@ void FakeVimHandler::Private::moveToFirstNonBlankOnLine()
{
QTextBlock
block
=
m_tc
.
block
();
QTextDocument
*
doc
=
m_tc
.
document
();
m_tc
.
movePosition
(
StartOfLine
);
m_tc
.
movePosition
(
StartOfLine
,
KeepAnchor
);
int
firstPos
=
m_tc
.
position
();
for
(
int
i
=
firstPos
,
n
=
firstPos
+
block
.
length
();
i
<
n
;
++
i
)
{
if
(
!
doc
->
characterAt
(
i
).
isSpace
())
{
...
...
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