Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to make TextEdit bookmarks visible #55188

Closed
me2beats opened this issue Nov 21, 2021 · 2 comments
Closed

Unable to make TextEdit bookmarks visible #55188

me2beats opened this issue Nov 21, 2021 · 2 comments
Milestone

Comments

@me2beats
Copy link

Godot version

3.4

System information

Windows

Issue description

I can't make TextEdit bookmarks visible.

Steps to reproduce

extends TextEdit

func _ready():
	set_line_as_bookmark(0, true)

breakpoint gutter is enabled

Minimal reproduction project

No response

@Calinou
Copy link
Member

Calinou commented Nov 21, 2021

For bookmarks to be visible, you need to enable the bookmark gutter separately from the breakpoint gutter:

godot/scene/gui/text_edit.cpp

Lines 1230 to 1238 in dd3acd7

// Draw bookmark marker.
if (text.is_bookmark(line)) {
if (draw_bookmark_gutter) {
int vertical_gap = (get_row_height() * 40) / 100;
int horizontal_gap = (cache.breakpoint_gutter_width * 30) / 100;
int marker_radius = get_row_height() - (vertical_gap * 2);
VisualServer::get_singleton()->canvas_item_add_circle(ci, Point2(cache.style_normal->get_margin(MARGIN_LEFT) + horizontal_gap - 2 + marker_radius / 2, ofs_y + vertical_gap + marker_radius / 2), marker_radius, Color(cache.bookmark_color.r, cache.bookmark_color.g, cache.bookmark_color.b));
}
}

However, unlike the breakpoint_gutter property, it's not exposed to the scripting API.

@akien-mga
Copy link
Member

Fixed by #55197.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants