Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
72ab3559
Commit
72ab3559
authored
May 11, 2020
by
etienne.frank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix minimap selection offset
The minimap selection was shifted of 1 line too late.
parent
e45735ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
text_edit.cpp
scene/gui/text_edit.cpp
+1
-1
No files found.
scene/gui/text_edit.cpp
View file @
72ab3559
...
...
@@ -941,7 +941,7 @@ void TextEdit::_notification(int p_what) {
// calculate viewport size and y offset
int
viewport_height
=
(
draw_amount
-
1
)
*
minimap_line_height
;
int
control_height
=
_get_control_height
()
-
viewport_height
;
int
viewport_offset_y
=
round
(
get_scroll_pos_for_line
(
first_visible_line
)
*
control_height
)
/
((
v_scroll
->
get_max
()
<=
minimap_visible_lines
)
?
(
minimap_visible_lines
-
draw_amount
)
:
(
v_scroll
->
get_max
()
-
draw_amount
));
int
viewport_offset_y
=
round
(
get_scroll_pos_for_line
(
first_visible_line
+
1
)
*
control_height
)
/
((
v_scroll
->
get_max
()
<=
minimap_visible_lines
)
?
(
minimap_visible_lines
-
draw_amount
)
:
(
v_scroll
->
get_max
()
-
draw_amount
));
// calculate the first line.
int
num_lines_before
=
round
((
viewport_offset_y
)
/
minimap_line_height
);
...
...
Write
Preview
Markdown
is supported
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