Skip to content

Commit

Permalink
some clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
LevelbossMike committed Apr 28, 2011
1 parent 1908442 commit 92c9676
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions lib/terminitor/cores/iterm_core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,10 @@ def run_in_window(window_name, window_content, options = {})
set_delayed_options
end

# handle panes
#
def handle_panes(tab_content)
panes = tab_content[:panes]
tab_commands = tab_content[:commands]
first_pane_level_split(panes, tab_commands)
@session_counter = 0
second_pane_level_split(panes, tab_commands)
end

Expand Down Expand Up @@ -190,19 +187,16 @@ def second_pane_level_split(panes, tab_commands)
end

def handle_subpanes(subpanes, tab_commands)
split_h_count = 0
subpanes.keys.sort.each do |subpane_key|
subpane_commands = subpanes[subpane_key][:commands]
split_h
split_h_count += 1
execute_pane_commands(subpane_commands, tab_commands, active_window)
execute_pane_commands(subpane_commands, tab_commands)
end
split_h_count.times { select_pane_above }
end

def execute_pane_commands(pane_commands, tab_commands, session = last_session)
def execute_pane_commands(pane_commands, tab_commands)
pane_commands = tab_commands + pane_commands
pane_commands.each { |cmd| execute_command cmd, :in => session }
pane_commands.each { |cmd| execute_command cmd}
end


Expand Down Expand Up @@ -263,10 +257,6 @@ def select_pane(direction)
end
end

def select_pane_above
select_pane('Above')
end

def select_left_pane
select_pane('Left')
end
Expand Down

0 comments on commit 92c9676

Please sign in to comment.