Run vim --clean -S test.vim, with
vim9script writefile(range(100), '/tmp/testfile') term_start(['cat', '/tmp/testfile'], {hidden: true}) ->popup_create({ minwidth: 80, maxwidth: 80, minheight: 10, maxheight: 10, scrollbar: true, border: [] })
I would have expected to see a scrollbar just like when a regular buffer is displayed in a popup window.
On the other hand, :h popup-terminal says:
- When the job ends, the popup window closes.
which doesn't occur here.
I think that keeping the popup window open after the job ends can be useful and should therefore be kept as it is right now. One example I can think if is executing the current python (bash, julia, lua, perl, ...) buffer and displaying its output in a popup-terminal, as an alternative to :!python % or :terminal python %.
Example:
# File: after/ftplugin/python.vim nnoremap <buffer> g<cr> <scriptcmd>term_start(['python', expand('%')], {hidden: true, norestore: true})->popup_create({pos: 'botright', line: &lines - &cmdheight, col: 1, minwidth: &columns - 2, maxwidth: &columns - 2, minheight: float2nr(&lines * 0.35), maxheight: float2nr(&lines * 0.35), border: [], scrollbar: true})<cr>
8.2.5037
Linux
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #10497 as completed via d28950f.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()