hired icon indicating copy to clipboard operation
hired copied to clipboard

UI errors should be printed preceeded by \n\r

Open sidju opened this issue 1 year ago • 3 comments

Currently a UI error may occur in the middle of a line (try this with ctrl+c, which is handled as a UI error). When that occurs the error text is printed where the cursor is, which is difficult to see. It would be better to go to a new line, or possibly clear the current line, before printing so the error message is visible.

sidju avatar Dec 20 '24 13:12 sidju

Should be solved in 0.12.1

sidju avatar Feb 18 '25 13:02 sidju

It wasn't really, though kinda improved upon...

Also the \r\n's were mostly pointless, upon further study, as nearly all UI errors are only printed through the print_message function (which splits by lines and prints \r\n after every line).

A better solution would be to either modify how add-ed prints errors as they occur (probably not a great solution) or to modify https://github.com/sidju/hired/blob/master/src/hui/mod.rs#L51 to check so that unless it is at the start of a line it prints \r\n.

sidju avatar Feb 18 '25 14:02 sidju

i.e. probably revert c30aece37483d81ecc587c10cb5aef66141215f0 and improve the print_message method instead.

sidju avatar Feb 18 '25 14:02 sidju