Skip to content

Commit 3a709da

Browse files
authored
fix a deprecated use of contains in edit (#25001)
1 parent 6a4dc3b commit 3a709da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/interactiveutil.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ function edit(path::AbstractString, line::Integer=0)
4141
line_unsupported = false
4242
if startswith(name, "vim.") || name == "vi" || name == "vim" || name == "nvim" ||
4343
name == "mvim" || name == "nano" ||
44-
name == "emacs" && contains(in, command, ["-nw", "--no-window-system" ]) ||
45-
name == "emacsclient" && contains(in, command, ["-nw", "-t", "-tty"])
44+
name == "emacs" && any(c -> c in ["-nw", "--no-window-system" ], command) ||
45+
name == "emacsclient" && any(c -> c in ["-nw", "-t", "-tty"], command)
4646
cmd = line != 0 ? `$command +$line $path` : `$command $path`
4747
background = false
4848
elseif startswith(name, "emacs") || name == "gedit" || startswith(name, "gvim")

0 commit comments

Comments
 (0)