daa84 / neovim-gtk

gtk ui for neovim
GNU General Public License v3.0
716 stars 57 forks source link

Tries to read from stdin on start? #91

Open jgosmann opened 6 years ago

jgosmann commented 6 years ago

I was trying nvim-gtk from the KDE application launcher, but no Neovim window would appear (starting from a terminal worked without problems). A nvim-gtk process was however started and after attaching a debugger the stack trace indicated that nvim-gtk was trying to read form stdin (but of course there wasn't any input on stdin). I changed the KDE menu entry to nvim-gtk </dev/null which made nvim-gtk start properly. The only slightly weird thing is that the fresh buffer will have a single change in it (that doesn't seem to have added anything to the buffer, but it is flagged as changed and I can undo a single edit).

daa84 commented 6 years ago

Yes, nvim-gtk reads stdin to allow echo test | nvim-gtk command. And check stdin by isatty function. Maybe better to use some other method to check is there is some input from pipeline.