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
886aef93
Commit
886aef93
authored
May 21, 2010
by
mae
Browse files
Merge commit 'origin/2.0'
parents
942611f6
076c0349
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/find/basetextfind.cpp
View file @
886aef93
...
...
@@ -325,10 +325,11 @@ void BaseTextFind::defineFindScope()
verticalBlockSelection
=
m_plaineditor
->
property
(
"verticalBlockSelection"
).
toInt
();
if
(
verticalBlockSelection
)
{
int
findScopeFromColumn
=
qMin
(
m_findScopeStart
.
positionInBlock
()
+
1
,
QTextCursor
findScopeVisualStart
(
document
()
->
docHandle
(),
cursor
.
selectionStart
());
int
findScopeFromColumn
=
qMin
(
findScopeVisualStart
.
positionInBlock
(),
m_findScopeEnd
.
positionInBlock
());
int
findScopeToColumn
=
findScopeFromColumn
+
verticalBlockSelection
;
m_findScopeStart
.
setPosition
(
m_
findScopeStart
.
block
().
position
()
+
findScopeFromColumn
-
1
);
m_findScopeStart
.
setPosition
(
findScope
Visual
Start
.
block
().
position
()
+
findScopeFromColumn
-
1
);
m_findScopeEnd
.
setPosition
(
m_findScopeEnd
.
block
().
position
()
+
qMin
(
m_findScopeEnd
.
block
().
length
()
-
1
,
findScopeToColumn
));
m_findScopeVerticalBlockSelection
=
verticalBlockSelection
;
...
...
src/plugins/texteditor/basetexteditor.cpp
View file @
886aef93
...
...
@@ -2471,7 +2471,7 @@ void BaseTextEditor::paintEvent(QPaintEvent *e)
const
QAbstractTextDocumentLayout
::
Selection
&
range
=
context
.
selections
.
at
(
i
);
const
int
selStart
=
range
.
cursor
.
selectionStart
()
-
blpos
;
const
int
selEnd
=
range
.
cursor
.
selectionEnd
()
-
blpos
;
if
(
selStart
<
=
bllen
&&
selEnd
>=
0
if
(
selStart
<
bllen
&&
selEnd
>=
0
&&
selEnd
>=
selStart
)
{
QTextLayout
::
FormatRange
o
;
o
.
start
=
selStart
;
...
...
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