diff options
| author | theprimeagain <the.primeagen@gmail.com> | 2026-03-01 08:20:58 -0700 |
|---|---|---|
| committer | theprimeagain <the.primeagen@gmail.com> | 2026-03-01 08:20:58 -0700 |
| commit | 0da5086983c2351f8178258a09807ba8fd5ab4e8 (patch) | |
| tree | 25d4b33dd0a30c7b4bb691a303761a17095af222 /lua/99/ops/tutorial.lua | |
| parent | 418ad358128134882bfcc2f40dde16d34cd9c415 (diff) | |
| download | a4-0da5086983c2351f8178258a09807ba8fd5ab4e8.tar.xz a4-0da5086983c2351f8178258a09807ba8fd5ab4e8.zip | |
ensuring state is kept between changes
Diffstat (limited to 'lua/99/ops/tutorial.lua')
| -rw-r--r-- | lua/99/ops/tutorial.lua | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lua/99/ops/tutorial.lua b/lua/99/ops/tutorial.lua index 4b9a9b8..caf54d2 100644 --- a/lua/99/ops/tutorial.lua +++ b/lua/99/ops/tutorial.lua @@ -2,7 +2,6 @@ local CleanUp = require("99.ops.clean-up") local Window = require("99.window") local make_prompt = require("99.ops.make-prompt") -local make_clean_up = CleanUp.make_clean_up local make_observer = CleanUp.make_observer --- @param context _99.Prompt @@ -32,19 +31,13 @@ local function tutorial(context, opts) local logger = context.logger:set_area("tutorial") logger:debug("starting", "with opts", opts) - local clean_up = make_clean_up(function() - context:stop() - end) - local prompt, refs = make_prompt(context, context._99.prompts.prompts.tutorial(), opts) context:add_references(refs) context:add_prompt_content(prompt) - context:add_clean_up(clean_up) - context:start_request(make_observer(clean_up, function(status, response) - vim.schedule(clean_up) + context:start_request(make_observer(context, function(status, response) if status == "cancelled" then logger:debug("cancelled") elseif status == "failed" then @@ -55,6 +48,7 @@ local function tutorial(context, opts) ) elseif status == "success" then open_tutorial(context, response) + context._99:sync() end end)) end |
