Skip to content

Conversation

@stefanhaller
Copy link
Collaborator

  • PR Description

When trying to set gui.selectedRangeBgColor to a hex value, it would get set to nothing instead. Named colors worked though.

I don't understand why this didn't seem to affect any of the other colors that are set with GetTextStyle, e.g. selectedLineBgColor. But the fix here still seems right to me.

  • Please check if the PR fulfills these requirements
  • Cheatsheets are up-to-date (run go run scripts/cheatsheet/main.go generate)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • Docs (specifically docs/Config.md) have been updated if necessary
  • You've read through your own file changes for silly mistakes etc
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2023

Uffizzi Preview Environment deployment-18016

☁️ https://app.uffizzi.com/github.com/jesseduffield/lazygit/pull/2483

📄 View Application Logs etc.

What is Uffizzi? Learn more

@mark2185
Copy link
Collaborator

mark2185 commented Mar 2, 2023

This looks like it should fix #1749 , so thanks for that :)

Copy link
Owner

@jesseduffield jesseduffield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. Any chance you could add a test for this function that asserts on the new behaviour?

The tests show that setting a hex color doesn't work; we'll fix that in the next commit.
@stefanhaller stefanhaller force-pushed the fix-setting-selectedLineBgColor branch from 139b709 to 63e8b8c Compare March 3, 2023 07:47
@stefanhaller
Copy link
Collaborator Author

First time I wrote a unit test file from scratch, hope this looks ok.

I used my usual preferred way of introducing the test first to demonstrate what's broken, let me know if you prefer to squash the two commits.

@jesseduffield
Copy link
Owner

Perfect :) Happy to keep that as two commits.

@jesseduffield jesseduffield merged commit 6487487 into jesseduffield:master Mar 3, 2023
@stefanhaller stefanhaller deleted the fix-setting-selectedLineBgColor branch March 3, 2023 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants