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

Tabs are not highlighted when selecting in RichTextLabel #42656

Closed
Tracked by #39144
me2beats opened this issue Oct 8, 2020 · 4 comments
Closed
Tracked by #39144

Tabs are not highlighted when selecting in RichTextLabel #42656

me2beats opened this issue Oct 8, 2020 · 4 comments
Milestone

Comments

@me2beats
Copy link

me2beats commented Oct 8, 2020

Godot version:

3.2.3

OS/device including version:

Windows

Issue description:

Tabs are not highlighted when selecting text in RichTextLabel.

Steps to reproduce:

  1. create a RichTextLabel, set selection_enabled to True
  2. Fill RichTextLabel with text that has tabs like this (you can just copy-paste it)
		hello		world
  1. Select the text in this RichTextLabel using mouse

As you can see tabs areas are not highlighted
(but the text is selected with tabs - you сan verify this when Ctrl+C and Ctrl+V the selected text somewhere)

This is true for Output Log as well since it is a RichTextLabel so you could just

func _ready():
	print("		hello		world")

tabs-editor-log

Expected result when selecting the text:
expected

Minimal reproduction project:

@torabshaikh
Copy link

Hi @Calinou I want to contribute to the project and this looks like a good place to start from. Can you please guide me on this?

@Calinou
Copy link
Member

Calinou commented Oct 17, 2020

@torabshaikh Thanks for your interest in contributing 🙂

The RichTextLabel node's code is at scene/gui/rich_text_label.cpp. Search for selection_bg (background color) and selection_fg (foreground color) to find the code that draws the selection.

See this page for compilation instructions. Remember to open the pull request against the master branch . This means that to test your changes, you need a GPU that fully supports Vulkan. If your GPU doesn't support Vulkan, work from the 3.2 branch, commit your changes, switch to the master branch and use the git cherry-pick command to pick the latest commit of the 3.2-based branch you've made.

@torabshaikh
Copy link

@Calinou Thanks for the info. I have set up the development environment and started debugging the code. I will submit a PR soon.

@bruvzg
Copy link
Member

bruvzg commented Jan 25, 2021

Fixed in master by #44487:

Screen.Recording.2021-01-25.at.11.19.27.mov

@bruvzg bruvzg closed this as completed Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants