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
Tobias Hunger
qt-creator
Commits
87b8a974
Commit
87b8a974
authored
Feb 04, 2009
by
Matthias Ettrich
Browse files
fix off by one when selecting block up or the previous open parenthesis.
parent
a003b62a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/texteditor/basetexteditor.cpp
View file @
87b8a974
...
...
@@ -3115,8 +3115,9 @@ bool TextBlockUserData::findPreviousOpenParenthesis(QTextCursor *cursor, bool se
if
(
!
parenList
.
isEmpty
()
&&
!
TextEditDocumentLayout
::
ifdefedOut
(
block
))
{
for
(
int
i
=
parenList
.
count
()
-
1
;
i
>=
0
;
--
i
)
{
Parenthesis
paren
=
parenList
.
at
(
i
);
if
(
block
==
cursor
->
block
()
&&
position
-
block
.
position
()
<=
paren
.
pos
+
1
)
continue
;
if
(
block
==
cursor
->
block
()
&&
(
position
-
block
.
position
()
<=
paren
.
pos
+
(
paren
.
type
==
Parenthesis
::
Closed
?
1
:
0
)))
continue
;
if
(
paren
.
type
==
Parenthesis
::
Closed
)
{
++
ignore
;
}
else
if
(
ignore
>
0
)
{
...
...
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