mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
special casing start_line_syntax() when line number <=1 (instead of <= 0)
This commit is contained in:
parent
d5182d8abd
commit
89c6fe580d
1 changed files with 4 additions and 2 deletions
|
@ -396,11 +396,13 @@ class Pry
|
|||
end
|
||||
end
|
||||
|
||||
# Return the syntax for a given editor for starting the editor
|
||||
# and moving to a particular line within that file
|
||||
def start_line_syntax_for_editor(file_name, line_number)
|
||||
file_name = file_name.gsub(/\//, '\\') if RUBY_PLATFORM =~ /mswin|mingw/
|
||||
|
||||
# special case 0th line
|
||||
return file_name if line_number <= 0
|
||||
# special case for 1st line
|
||||
return file_name if line_number <= 1
|
||||
|
||||
case Pry.config.editor
|
||||
when /^[gm]?vi/, /^emacs/, /^nano/, /^pico/, /^gedit/, /^kate/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue