Skip to content

Conversation

@luftaquila
Copy link
Contributor

This PR resolves #372 .

Although the issue is not always able to reproduce, I believe it is better to use a normal word instead of a specific unicode byte.

It should not affect any previous configs, including the people who were using U+200B as their padding.

Thank you!

@coderabbitai
Copy link

coderabbitai bot commented Dec 17, 2025

📝 Walkthrough

Walkthrough

This PR updates the tmux Dracula configuration to support setting padding to false instead of using zero-width space characters. Changes include documentation updates and script logic to normalize the boolean value to empty strings for padding removal.

Changes

Cohort / File(s) Summary
Documentation
docs/CONFIG.md
Updated padding configuration guidance to use boolean false value instead of zero-width space character; removed old example and added new examples demonstrating false value assignment.
Script Logic
scripts/dracula.sh
Added normalization guards to convert left_pad and right_pad from false to empty strings, preventing padding application when explicitly disabled.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify normalization guards are placed at the correct location in the script before pad_script construction
  • Confirm that converting false to empty strings handles all edge cases and doesn't introduce unintended side effects in status bar rendering

Possibly related PRs

Suggested reviewers

  • ethancedwards8

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: replacing zero-width space with a typeable word (false) for custom padding configuration.
Description check ✅ Passed The description is directly related to the changeset, referencing issue #372, explaining the motivation for replacing zero-width space with a normal word, and noting backward compatibility.
Linked Issues check ✅ Passed The PR successfully addresses issue #372 by replacing zero-width space padding with a boolean false value, preventing the status bar breaking issue caused by U+200B characters.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the padding issue: documentation updates explaining the new false-based approach and code changes normalizing false padding values to empty strings.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
scripts/dracula.sh (1)

44-45: Consider case-insensitive comparison for padding normalization.

The string comparison correctly normalizes "false" to an empty string, but it's case-sensitive. Users who configure "False" or "FALSE" won't benefit from this feature.

Apply this diff to handle case variations:

-  if [ "$left_pad" = false ]; then left_pad=""; fi
-  if [ "$right_pad" = false ]; then right_pad=""; fi
+  if [ "${left_pad,,}" = "false" ]; then left_pad=""; fi
+  if [ "${right_pad,,}" = "false" ]; then right_pad=""; fi

Note: The ${var,,} syntax converts to lowercase and requires Bash 4.0+. Alternatively, for broader compatibility:

-  if [ "$left_pad" = false ]; then left_pad=""; fi
-  if [ "$right_pad" = false ]; then right_pad=""; fi
+  case "$left_pad" in
+    [Ff][Aa][Ll][Ss][Ee]) left_pad="" ;;
+  esac
+  case "$right_pad" in
+    [Ff][Aa][Ll][Ss][Ee]) right_pad="" ;;
+  esac
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b762b3 and d08ff26.

📒 Files selected for processing (2)
  • docs/CONFIG.md (1 hunks)
  • scripts/dracula.sh (1 hunks)
🔇 Additional comments (1)
docs/CONFIG.md (1)

98-105: LGTM! Clear and helpful documentation.

The addition clearly explains how to remove padding using false, providing both explanation and example. This makes the feature discoverable and easy to use.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Custom padding with zero-width space breaks the status bar

1 participant