mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-07-17 15:56:57 +02:00
wip: final simplify
This commit is contained in:
parent
90ebae0f26
commit
0b9e9c0696
21 changed files with 607 additions and 544 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue