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
Tobias Hunger
qt-creator
Commits
0fed004a
Commit
0fed004a
authored
Sep 17, 2009
by
Thorbjørn Lindeijer
Browse files
Fixed the {begin,end}EndBlock to be used when inserting autotext
Based on a change by Denis Dzyubenko, done with mae.
parent
b7651241
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/texteditor/basetexteditor.cpp
View file @
0fed004a
...
...
@@ -1066,7 +1066,9 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e)
}
}
}
if
(
!
electricChar
.
isNull
())
bool
doEditBlock
=
!
(
electricChar
.
isNull
()
&&
autoText
.
isEmpty
());
if
(
doEditBlock
)
cursor
.
beginEditBlock
();
cursor
.
insertText
(
text
);
...
...
@@ -1076,10 +1078,12 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e)
cursor
.
insertText
(
autoText
);
cursor
.
setPosition
(
pos
);
}
if
(
!
electricChar
.
isNull
())
{
if
(
!
electricChar
.
isNull
())
indent
(
document
(),
cursor
,
electricChar
);
if
(
doEditBlock
)
cursor
.
endEditBlock
();
}
setTextCursor
(
cursor
);
}
...
...
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