mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
feat(ui): restore has('gui_running')
Problem:
has('gui_running') is still common in the wild and our answer has
changed over time, causing frustration.
95a6ccbe9f
Solution:
Use stdin_tty/stdout_tty to decide if a UI is (not) a GUI.
This commit is contained in:
@@ -312,7 +312,7 @@ function module.is_os(s)
|
||||
or s == 'bsd') then
|
||||
error('unknown platform: '..tostring(s))
|
||||
end
|
||||
return ((s == 'win' and module.sysname():find('windows'))
|
||||
return not not ((s == 'win' and module.sysname():find('windows'))
|
||||
or (s == 'mac' and module.sysname() == 'darwin')
|
||||
or (s == 'freebsd' and module.sysname() == 'freebsd')
|
||||
or (s == 'openbsd' and module.sysname() == 'openbsd')
|
||||
|
||||
Reference in New Issue
Block a user