-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
guioptions+=!, sighup and hit-enter with system() #3327
Comments
How about: silent let a = system('ls') |
|
The first issue happens in MacVim too, FYI. |
I had a look. It happens because do_cmdline() is called recursively. BTW: I noticed that a bunch of autocommands are executed when using Thinking a bit more about the |
Christian wrote:
I had a look. It happens because do_cmdline() is called recursively.
BTW: I noticed that a bunch of autocommands are executed when using
`:set guioptions+=!` like BufAdd, BufEnter, and then WinLeave,
BufDelete. I think we could skip those at least for `system()`.
Thinking a bit more about the `system()` case, is there a reason, we
don't simply set `no_wait_return` when executing the system()
function? At least in that case we don't expect any output to be
displayed directly, right?
If system() doesn't output anything, why does setting no_wait_return
make any difference?
…--
From "know your smileys":
:-& Eating spaghetti
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
I suppose that comes from the output in the (hidden) terminal window. |
Line 5477 in 7db3a8e
I guess this is where system() is affected by 'go-!'. If so, what about always skipping terminal for system()? Since system() is not meant to be used interactively, an interactive terminal is not needed. I go into this issue, since I have autocmd defined in InsertLeavePre, which calls system(), fails when in cmdwin; I think lilydjwg's fcitx.vim plugin is also affected by this issue. MRE: in command mode, press |
E282 is raised, maybe because I define related function / autocmd in my vimrc. Sorry for the incorrect comment. Also, E1188 is more about command-line window, not terminal window. |
There are two issues that has been with me for a long time.
The first: hit-enter after calling system().
gvim --clean
to startset go=acit!
(I don't know the exact conbinations for the issue to occur yet.)let a = system('ls')
, and you'll get a "hit-enter" prompt.This is a blocker issue for vim-racer, because this completer will call system() to get completions, and "hit-enter"s break typing. Sometimes I see a "^R" line shown after pressing enter.
The second: SIGHUP for background commands.
gvim --clean
to startset go+=!
call system("firefox https://www.vim.org/ &")
nohup
, nohup itself was killed before it fully set itself up.Vim version 8.1.278 huge build with gtk2 GUI, on Arch Linux.
Full `--version` output
The text was updated successfully, but these errors were encountered: