Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It seems helper/echo is no longer required in the latest Vim #218

Open
lambdalisue opened this issue Nov 5, 2023 · 1 comment
Open

It seems helper/echo is no longer required in the latest Vim #218

lambdalisue opened this issue Nov 5, 2023 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@lambdalisue
Copy link
Member

lambdalisue commented Nov 5, 2023

Originally, the helper/echo function was designed as a workaround for a the following limitation in Vim.

Vim (not Neovim) won't show message posted from a channel command and Vim won't pause multiline message posted from timer. This function applied some workaround to show message posted from a channel command, and pause if the message is multiline.

However, it appears that test1 functions effectively in the latest version of Vim, indicating that we may no longer need helper/echo, which internally utilizes timer_start (hence, somewhat delicate).

I aim to pinpoint the specific commits in Vim that resolved this issue, enabling us to decide whether the function is indeed dispensable or should be retained.

Tested with

import type { Denops } from "https://deno.land/x/denops_std@v5.0.0/mod.ts";
import { echo } from "https://deno.land/x/denops_std@v5.0.0/helper/mod.ts";

export function main(denops: Denops): void {
  const message = "Hello\nWorld\nGoodbye\nWorld";

  denops.dispatcher = {
    async test1() {
      await denops.cmd(`echo message`, { message });
    },
    async test2() {
      await echo(denops, message);
    },
  };
}

Then

:call denops#request('my-test', 'test1', [])
:call denops#request('my-test', 'test2', [])
@lambdalisue lambdalisue added good first issue Good for newcomers help wanted Extra attention is needed labels Nov 5, 2023
@lambdalisue
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant