summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Luis Leal Cardoso Junior <andrehjr@gmail.com>2022-03-06 17:27:45 -0300
committerAndré Luis Leal Cardoso Junior <andrehjr@gmail.com>2022-03-06 17:27:45 -0300
commit04da44f731d20d166643f51003e8ae06c19ba184 (patch)
treeea276570748bbb8284a966836a939209d07f948c
parent454990b83436a714e1396d3dfb96fd684804f829 (diff)
downloadpry-04da44f731d20d166643f51003e8ae06c19ba184.tar.gz
Configure `code` as a supported editor on Pry::Editor
-rw-r--r--lib/pry/editor.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pry/editor.rb b/lib/pry/editor.rb
index c9d92b1a..d6d72a0d 100644
--- a/lib/pry/editor.rb
+++ b/lib/pry/editor.rb
@@ -105,7 +105,7 @@ class Pry
'--nofork' if blocking
when /^jedit/
'-wait' if blocking
- when /^mate/, /^subl/, /^redcar/
+ when /^mate/, /^subl/, /^redcar/, /^code/
'-w' if blocking
end
end
@@ -121,6 +121,8 @@ class Pry
"+#{line_number} #{file_name}"
when /^mate/, /^geany/
"-l #{line_number} #{file_name}"
+ when /^code/
+ "-g #{file_name}:#{line_number}"
when /^subl/
"#{file_name}:#{line_number}"
when /^uedit32/