From da792400448d1aa7d6e618346a2fd1d582846e33 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 13 May 2026 16:32:37 -0400 Subject: [PATCH] e: use tab drop instead of tabedit to avoid new tabs for already-open files --- e | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e b/e index 85c14ee..2906d12 100755 --- a/e +++ b/e @@ -39,12 +39,12 @@ else if socket_name socket_path = "#{run_dir}/e-#{socket_name}.sock" if File.exist?(socket_path) - tabedits = ARGV.map do |path| + opencmds = ARGV.map do |path| path = File.expand_path(path).gsub(" ", "\\ ") - %[:tabe #{path}] + %[:tab drop #{path}] end.join - puts tabedits - exec("nvim", "--headless", "--server", socket_path, "--remote-send", "#{tabedits}:call GuiForeground()") + puts opencmds + exec("nvim", "--headless", "--server", socket_path, "--remote-send", "#{opencmds}:call GuiForeground()") else exec(EDITOR, "--", "--listen", socket_path, "--cmd", "let g:project_name = '#{pretty_name}'", "-p", *ARGV) end