diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2023-02-27 16:31:05 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2023-02-27 19:50:59 +0100 |
commit | ce597235a26839826de88ecd8b949ec54c310fbd (patch) | |
tree | 145d03f0f47afef4fa7df2c6d1976de9c97049c3 /test/helpers.lua | |
parent | 7f424e2b65779c59fc0cac3cc7508ba2ec07f200 (diff) | |
download | rneovim-ce597235a26839826de88ecd8b949ec54c310fbd.tar.gz rneovim-ce597235a26839826de88ecd8b949ec54c310fbd.tar.bz2 rneovim-ce597235a26839826de88ecd8b949ec54c310fbd.zip |
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.
https://github.com/vimpostor/vim-tpipeline/commit/95a6ccbe9f33bc42dd4cee45731d8bc3fbcd92d1
Solution:
Use stdin_tty/stdout_tty to decide if a UI is (not) a GUI.
Diffstat (limited to 'test/helpers.lua')
-rw-r--r-- | test/helpers.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/helpers.lua b/test/helpers.lua index d45536b42b..117b6b4aaa 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -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') |