@chemzqm/neovim
Version:
NodeJS client API for vim9 and neovim
42 lines (41 loc) • 1.12 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Tabpage = void 0;
const Base_1 = require("./Base");
class Tabpage extends Base_1.BaseApi {
constructor() {
super(...arguments);
this.prefix = 'nvim_tabpage_';
}
/**
* The windowid that not change within a Vim session
*/
get id() {
return this.data;
}
/** Returns all windows of tabpage */
get windows() {
return this.request(`${this.prefix}list_wins`, []);
}
/** Gets the current window of tabpage */
get window() {
return this.request(`${this.prefix}get_win`, []);
}
/** Is current tabpage valid */
get valid() {
return this.request(`${this.prefix}is_valid`, []);
}
/** Tabpage number */
get number() {
return this.request(`${this.prefix}get_number`, []);
}
/** Invalid */
getOption() {
throw new Error('Tabpage does not have `getOption`');
}
/** Invalid */
setOption() {
throw new Error('Tabpage does not have `setOption`');
}
}
exports.Tabpage = Tabpage;