Skip to main content
Module

x/denops_std/function/vim/mod.ts>term_scrape

📚 Standard module for denops.vim
Go to Latest
function term_scrape
import { term_scrape } from "https://deno.land/x/denops_std@v6.4.0/function/vim/mod.ts";

Get the contents of {row} of terminal screen of {buf}. For {buf} see term_getsize().

The first line has {row} one. When {row} is "." the cursor line is used. When {row} is invalid an empty string is returned.

Return a List containing a Dict for each screen cell: "chars" character(s) at the cell "fg" foreground color as #rrggbb "bg" background color as #rrggbb "attr" attributes of the cell, use term_getattr() to get the individual flags "width" cell width: 1 or 2 For a double-width cell there is one item, thus the list can be shorter than the width of the terminal.

Can also be used as a method:

GetBufnr()->term_scrape(row)

Parameters

denops: Denops
buf: unknown
row: unknown

Returns

Promise<unknown[]>