# HG changeset patch # User Luka Sitas # Date 1761935071 14400 # Node ID 9c80955f0c6e3ece36fc031c6927fe6a20baf948 # Parent 34930197e9d4a22487f006c6eb2969f88d2b6379 I think I got popups working on the commit diff -r 34930197e9d4 -r 9c80955f0c6e plugins/hghelp/hghelp.vim --- a/plugins/hghelp/hghelp.vim Thu Oct 30 13:45:31 2025 -0400 +++ b/plugins/hghelp/hghelp.vim Fri Oct 31 14:24:31 2025 -0400 @@ -1,12 +1,23 @@ let g:hg_format_command = "" +function PopupCommand(command) + let buf = term_start(a:command, {'hidden': 1, 'term_finish': 'close'}) + let winid = popup_create(buf, {'minwidth': 50, 'minheight': 20}) +endfunction + +function ExecuteCommand(command) + return system(a:command . ' 2>&1') +endfunction + function! s:CommitWithFormat() wa if exists("g:hg_format_command") && !empty(g:hg_format_command) execute '!'.g:hg_format_command endif - execute '!hg addremove && hg commit' + execute + call ExecuteCommand('!hg addremove') + call PopupCommand('hg commit') endfunction function! s:OpenHgDiff(file) @@ -14,7 +25,7 @@ let l:filetype = &filetype let l:temp_file = tempname() let l:command = 'hg cat -r . ' . l:current_file . ' > ' . l:temp_file - let result = system(l:command . ' 2>&1') + call ExecuteCommand(l:command) execute 'tabe ' . l:temp_file execute 'setfiletype' l:filetype setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile diff -r 34930197e9d4 -r 9c80955f0c6e test.vim