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

[Bug] Vanishing Separators in the Status Bar #79

Open
kevinmatthes opened this issue Jul 31, 2022 · 9 comments · May be fixed by #81
Open

[Bug] Vanishing Separators in the Status Bar #79

kevinmatthes opened this issue Jul 31, 2022 · 9 comments · May be fixed by #81

Comments

@kevinmatthes
Copy link
Contributor

When opening a file from the command line, the status bar shows separators next to the line / column and progress information fields. As soon as one calls the file picker using [CTRL] + [X], [CTRL] + [F], they are gone for the rest of this session. The same happens when cycling through the themes.

The sole colour scheme which is not affected by this is the default one.

@kevinmatthes
Copy link
Contributor Author

I assume the origin of this bug is the unused zee::components::theme::Base16Theme::base07 field since the only theme which is not affected is the default one which does not use this struct for definition.

The line / column field there has a background which is slightly darker than the rest of the status bar. Maybe this unused field was originally intended therefore?

@kevinmatthes
Copy link
Contributor Author

Okay, the colour is definitely unused: removing the underscore from _light_background in zee/src/components/theme/mod.rs, line 199, causes the compiler to generate warnings. Hence, this is the place where the colour base07 is never used.

kevinmatthes added a commit to kevinmatthes/zee that referenced this issue Aug 1, 2022
@kevinmatthes
Copy link
Contributor Author

The separators are the bug, not their vanishing. The problem seems to be something about the style position_in_file which is applied to the repository name and the reading progress.

@kevinmatthes
Copy link
Contributor Author

The "separators" are spaces which are not coloured in the configured background colour. If one switches to is_not_modified, the bug does not appear anymore but it does continue to appear when switching to file_size.

@kevinmatthes
Copy link
Contributor Author

#80 tries to solve the problem by using a different background colour. And indeed, this solves the problem. But when increasing the number of spaces before the file size, this bug appears there, as well. 12 spaces are no problem. But 13 or more are.

@kevinmatthes
Copy link
Contributor Author

There is a protected area at the left end of the status bar, 18 characters in size. When using lighter_background and dark_foreground, the spaces will fetch indeed lighter_background only within this protected area and default_background outside of it.

Except the default theme, any colour theme, thus, any Base16Themed scheme, has this bug. The question is: why?

@kevinmatthes
Copy link
Contributor Author

The reason why #80 achieves a partial solution is that one assign literally any colour to the background of position_in_file except one which equals base01. Even one RGB step in one component more or less lets this bug disappear.

@kevinmatthes
Copy link
Contributor Author

After all, the status bar could just have a different colour than the current line, right? One option to fix this issue would be to assign base01 solely to the current line and base07 exclusively to the status bar. This would solve this issue.

But as I mentioned in #80, in some themes, the status bar's text would become invisible in some themes. Hence, their base07 would need to be adjusted.

@kevinmatthes
Copy link
Contributor Author

Another option is rendering the affected fields of the status bar with bold instead of normal. This would be the minimal invasive version.

kevinmatthes added a commit to kevinmatthes/zee that referenced this issue Aug 1, 2022
* [Bugfix] Fix zee-editor#79

* Update status_bar.rs

* Update mod.rs
@kevinmatthes kevinmatthes linked a pull request Aug 1, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant