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
6fa6eeb7
Commit
6fa6eeb7
authored
Mar 25, 2009
by
dt
Browse files
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
parents
3e992d5d
5fcbd012
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/fakevim/fakevimhandler.cpp
View file @
6fa6eeb7
...
...
@@ -358,6 +358,7 @@ public:
// extra data for '.'
QString
m_dotCommand
;
bool
m_inReplay
;
// true if we are executing a '.'
// extra data for ';'
QString
m_semicolonCount
;
...
...
@@ -366,11 +367,11 @@ public:
// history for '/'
QString
lastSearchString
()
const
;
QStringList
m_searchHistory
;
static
QStringList
m_searchHistory
;
int
m_searchHistoryIndex
;
// history for ':'
QStringList
m_commandHistory
;
static
QStringList
m_commandHistory
;
int
m_commandHistoryIndex
;
// visual line mode
...
...
@@ -403,6 +404,9 @@ public:
QList
<
QTextEdit
::
ExtraSelection
>
m_searchSelections
;
};
QStringList
FakeVimHandler
::
Private
::
m_searchHistory
;
QStringList
FakeVimHandler
::
Private
::
m_commandHistory
;
FakeVimHandler
::
Private
::
Private
(
FakeVimHandler
*
parent
,
QWidget
*
widget
)
{
q
=
parent
;
...
...
@@ -424,8 +428,9 @@ FakeVimHandler::Private::Private(FakeVimHandler *parent, QWidget *widget)
m_anchor
=
0
;
m_savedYankPosition
=
0
;
m_cursorWidth
=
EDITOR
(
cursorWidth
());
m_inReplay
=
false
;
#if
1
#if
0
// Plain
m_config[ConfigStartOfLine] = ConfigOn;
m_config[ConfigHlSearch] = ConfigOn;
...
...
@@ -1012,9 +1017,11 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
qDebug
()
<<
"REPEATING"
<<
m_dotCommand
;
QString
savedCommand
=
m_dotCommand
;
m_dotCommand
.
clear
();
m_inReplay
=
true
;
for
(
int
i
=
count
();
--
i
>=
0
;
)
foreach
(
QChar
c
,
savedCommand
)
handleKey
(
c
.
unicode
(),
c
.
unicode
(),
QString
(
c
));
m_inReplay
=
false
;
enterCommandMode
();
m_dotCommand
=
savedCommand
;
}
else
if
(
key
==
'<'
&&
m_visualMode
==
NoVisualMode
)
{
...
...
@@ -1413,10 +1420,14 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
recordInsertText
(
str
);
recordEndGroup
();
}
else
if
(
key
==
Key_PageDown
||
key
==
control
(
'f'
))
{
moveDown
(
count
()
*
(
linesOnScreen
()
-
2
));
moveDown
(
count
()
*
(
linesOnScreen
()
-
2
)
-
cursorLineOnScreen
());
scrollToLineInDocument
(
cursorLineInDocument
());
moveToFirstNonBlankOnLine
();
finishMovement
();
}
else
if
(
key
==
Key_PageUp
||
key
==
control
(
'b'
))
{
moveUp
(
count
()
*
(
linesOnScreen
()
-
2
));
moveUp
(
count
()
*
(
linesOnScreen
()
-
2
)
+
cursorLineOnScreen
());
scrollToLineInDocument
(
cursorLineInDocument
()
+
linesOnScreen
()
-
2
);
moveToFirstNonBlankOnLine
();
finishMovement
();
}
else
if
(
key
==
Key_Delete
)
{
setAnchor
();
...
...
@@ -1512,8 +1523,8 @@ EventResult FakeVimHandler::Private::handleInsertMode(int key, int,
if
(
leftText
.
simplified
().
isEmpty
())
indentRegion
(
text
.
at
(
0
));
}
if
(
text
.
at
(
0
)
==
'.'
||
text
.
at
(
0
)
==
'>'
)
if
(
!
m_inReplay
)
emit
q
->
completionRequested
();
}
else
{
return
EventUnhandled
;
...
...
src/plugins/fakevim/fakevimplugin.cpp
View file @
6fa6eeb7
...
...
@@ -47,6 +47,7 @@
#include
<texteditor/basetexteditor.h>
#include
<texteditor/basetextmark.h>
#include
<texteditor/completionsupport.h>
#include
<texteditor/itexteditor.h>
#include
<texteditor/texteditorconstants.h>
#include
<texteditor/interactionsettings.h>
...
...
@@ -244,7 +245,9 @@ void FakeVimPluginPrivate::triggerCompletions()
if
(
!
handler
)
return
;
if
(
BaseTextEditor
*
bt
=
qobject_cast
<
BaseTextEditor
*>
(
handler
->
widget
()))
bt
->
triggerCompletions
();
TextEditor
::
Internal
::
CompletionSupport
::
instance
()
->
autoComplete
(
bt
->
editableInterface
(),
false
);
// bt->triggerCompletions();
}
void
FakeVimPluginPrivate
::
writeFile
(
bool
*
handled
,
...
...
tests/manual/gdbdebugger/simple/app.cpp
View file @
6fa6eeb7
...
...
@@ -710,6 +710,7 @@ void testQString()
str
+=
" World "
;
str
+=
" World "
;
str
+=
" World "
;
str
.
append
(
s
);
}
void
testQString3
()
...
...
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