fix(editor,terminal): Correctly restore log buffer and cursor position

A regresion was introduced by #81 where the log buffer was not being
    restored when there was no modification after describing from the
    log buffer. This has been reworked and now the function `on_done` is
    always called not only when there are lines in the buffer giving the
    responsibility to check the nilness on the `on_done` function.

    There was a bug also when restoring cursor position which was being
    wiped when the buffer was closed which is not actually what we want
This commit is contained in:
NicolasGB
2026-02-09 13:10:09 +01:00
parent 149ae9ebc7
commit 6a3ff64116
2 changed files with 1 additions and 4 deletions
-1
View File
@@ -148,7 +148,6 @@ function M.close_terminal_buffer()
-- Otherwise close the buffer
buffer.close(state.buf)
state.buf_cmd = nil
state.cursor_restore_pos = nil
state.chan = nil
state.job_id = nil
end