Skip to main content
Module

x/denops_std/function/mod.ts>winsaveview

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

Returns a |Dictionary| that contains information to restore the view of the current window. Use |winrestview()| to restore the view. This is useful if you have a mapping that jumps around in the buffer and you want to go back to the original view. This does not save fold information. Use the 'foldenable' option to temporarily switch off folding, so that folds are not opened when moving around. This may have side effects. The return value includes: lnum cursor line number col cursor column (Note: the first column zero, as opposed to what getpos() returns) coladd cursor column offset for 'virtualedit' curswant column for vertical movement topline first line in the window topfill filler lines, only in diff mode leftcol first column displayed; only used when 'wrap' is off skipcol columns skipped Note that no option values are saved.

Returns

Promise<unknown>