wip: final simplify

This commit is contained in:
facile pop culture reference 2026-07-05 18:46:22 +03:00
parent 90ebae0f26
commit 0b9e9c0696
21 changed files with 607 additions and 544 deletions

View file

@ -195,7 +195,7 @@ pub fn eval_view_tui <'a, S> (
Some("text") => {
if let Some(src) = args?.src()? {
output.show(output.xywh(), &src)?
output.show(src)?
} else {
return Ok(None)
}
@ -204,7 +204,7 @@ pub fn eval_view_tui <'a, S> (
Some("fg") => {
let arg0 = arg0?.expect("fg: expected arg 0 (color)");
let color = Namespace::namespace(state, arg0)?.unwrap_or_else(||panic!("fg: {arg0:?}: not a color"));
output.show(output.xywh(), &fg(color, thunk(move|output: &mut Tui|{
output.show(fg(color, thunk(move|output: &mut Tui|{
state.interpret(output, &arg1)?;
// FIXME?: don't max out the used area?
Ok(output.area().into())
@ -214,7 +214,7 @@ pub fn eval_view_tui <'a, S> (
Some("bg") => {
let arg0 = arg0?.expect("bg: expected arg 0 (color)");
let color = Namespace::namespace(state, arg0)?.unwrap_or_else(||panic!("bg: {arg0:?}: not a color"));
output.show(output.xywh(), &bg(color, thunk(move|output: &mut Tui|{
output.show(bg(color, thunk(move|output: &mut Tui|{
state.interpret(output, &arg1)?;
// FIXME?: don't max out the used area?
Ok(output.area().into())