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

Searching for \0 leaks error message into UI #11213

Open
ashfield-kasku opened this issue Jul 17, 2024 · 2 comments
Open

Searching for \0 leaks error message into UI #11213

ashfield-kasku opened this issue Jul 17, 2024 · 2 comments
Labels
A-theme Area: Theme and appearence related C-bug Category: This is a bug

Comments

@ashfield-kasku
Copy link

Summary

If you type /\0<ret> then this will happen:

image

I assume it's not intentional since it's black-on-black in the default theme.

Reproduction Steps

No response

Helix log

No response

Platform

Linux

Terminal Emulator

foot

Installation Method

source

Helix Version

24.07-52-gc34164c0

@ashfield-kasku ashfield-kasku added the C-bug Category: This is a bug label Jul 17, 2024
@the-mikedavis
Copy link
Member

That is an instance of a popup component actually, it isn't leaking:

Err(err) => {
let (view, doc) = current!(cx.editor);
doc.set_selection(view.id, snapshot.clone());
view.offset = offset_snapshot;
if event == PromptEvent::Validate {
let callback = async move {
let call: job::Callback = Callback::EditorCompositor(Box::new(
move |_editor: &mut Editor, compositor: &mut Compositor| {
let contents = Text::new(format!("{}", err));
let size = compositor.size();
let popup = Popup::new("invalid-regex", contents)
.position(Some(helix_core::Position::new(
size.height as usize - 2, // 2 = statusline + commandline
0,
)))
.auto_close(true);
compositor.replace_or_push("invalid-regex", popup);
},
));
Ok(call)
};
cx.jobs.callback(callback);
}

I believe this is a theme issue with the default theme or the Text component - it depends on which colors your terminal is using. For example with a dark terminal theme and the default Helix theme I see:

bug

@the-mikedavis the-mikedavis added the A-theme Area: Theme and appearence related label Jul 17, 2024
@ashfield-kasku
Copy link
Author

Ah ok, that makes sense, I'm using a light theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-theme Area: Theme and appearence related C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants