Blyx Nest Blyx language
Registry / Framework
framework · v0.1.0

Nuthatch

Wrap a message and preserve a valid scroll position after resizing a terminal.

Source repository · Package JSON

Use Nuthatch

use vendor::nuthatch::nuthatch;

Run the example

nest demo nuthatch@0.1.0
blyxc native-run nuthatch-demo/main.blyx
Example source and expected output
use vendor::nuthatch::nuthatch;

fn main() {
    let widths = [4, 4, 4, 4];
    let columns = 6.0;
    let start = 99.0;
    let height = 2.0;
    let result = nuthatch_layout(widths, columns, start, height);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

4
2
4
4

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIP7ac9b7118e63607372ac1460613172f21204eaee97eeb7489d6666af9452fe470060db636e