INNER CODE UNIT · TypeScript

init

iamcco/coc-flutter · src/lib/notification/index.ts:25

  private async init() {
    const { nvim } = workspace;
    this.isSupportFloat = !!(await nvim.call('exists', '*nvim_open_win'));
    const screenWidth = (await nvim.getOption('columns')) as number;
    this.maxWidth = Math.min(this.maxWidth, screenWidth);
  }

  private async detect() {
    if (this.timer) {
      clearTimeout(this.timer);
    }
    const { timeGap, display } = this;
    let { top } = this;
    this.display = [];
    for (const message of display) {
      if (!message.isInvalid) {
        await message.update(timeGap, top);
        top += message.height;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…