Closed shiena closed 8 months ago
The windows build uploaded to the following URL was output to the console. https://github.com/akiyosi/goneovim/actions/runs/2149147269
@shiena Thanks for the quick confirmation. Closed.
It seems that enabling QT_DEBUG_CONSOLE
launches a console window in addition to the GUI window.
There may need to be a way to suppress this or another mechanism to display application help, version information, etc.
neovim-qt seems to have achieved this with its own widget.
I think it's okay to revert this commit. https://github.com/akiyosi/goneovim/commit/939f78d2151cf27d1cad434cd1ae5524b0729159
@akiyosi
I ran goneovim --help
from within Goneovim and got the output. So, I created a script to display it in a float window.
Probably, if you execute the command directly without using the shell, the help will be outputted.
function! GonvimUsage() abort
let pid=nvim_get_proc(nvim_get_proc(nvim_get_proc(getpid()).ppid).ppid).pid
let output = systemlist("wmic process where processid=" . pid . " get executablepath")
let gonvimpath = trim(output[1])
let output = systemlist(gonvimpath . ' --help')
let width = 0
for line in output
let length = strlen(line)
if length > width
let width = length
endif
endfor
let height = len(output)
let opts = {
\ 'width': width + 1,
\ 'height': height,
\ 'anchor': 'NW',
\ 'style': 'minimal'
\ 'external': v:true
\ }
let buf = nvim_create_buf(v:false, v:true)
let win = nvim_open_win(buf, v:true, opts)
call nvim_buf_set_lines(buf, 0, -1, v:true, output)
endfunction
command! GonvimUsage call GonvimUsage()
@shiena Nice! It might be a good idea to add this command as a Windows-only default.
@akiyosi I don't know why, but I was able to output the help to the console with the following command.
goneovim --help | more
# for PowerShell
goneovim --help | Out-Host
# or
goneovim --help | Out-Default
OS: Windows10 goneovim: nightly-1-gaeea7ae
However, it is possible to open the file specified in the argument.