lib/scryglass/lens_panel.rb in scryglass-1.0.1 vs lib/scryglass/lens_panel.rb in scryglass-1.1.0
- old
+ new
@@ -76,21 +76,21 @@
self.x_boundaries = 0...max_line_length
end
def current_ro_subheader
current_ro = scry_session.current_ro
- user_input = scry_session.user_input
+ last_keypress = scry_session.last_keypress
row_above_string =
current_ro.next_visible_ro_up.to_s if current_ro.next_visible_ro_up
row_below_string =
current_ro.next_visible_ro_down.to_s if current_ro.next_visible_ro_down
tree_preview_related_commands = ['A', 'B', 'C', 'D',
'@', '.', '(', '*', '|', '-']
ro_view_label =
- if tree_preview_related_commands.include?(user_input)
+ if tree_preview_related_commands.include?(last_keypress)
"\e[7mVIEWING:\e[00m" # Color reversed
else
'VIEWING:'
end
@@ -106,11 +106,11 @@
_screen_height, screen_width = $stdout.winsize
current_lens = scry_session.current_lens
current_subject_type = scry_session.current_subject_type
current_subject = scry_session.current_ro.current_subject
- user_input = scry_session.user_input
+ last_keypress = scry_session.last_keypress
lens_count = LensPanel.lenses.count
lens_id = current_lens % lens_count
lens = LensPanel.lenses[lens_id]
@@ -126,12 +126,12 @@
fit_lens_header = [
subject_type_header, subject_class_header, lens_type_header
].fit_to(screen_width)
- if user_input == 'l'
+ if last_keypress == 'l'
fit_lens_header[4] = "\e[7m#{fit_lens_header[4]}" # Format to be ended by Hexes.opacify_screen_string() (using \e[00m)
- elsif user_input == 'L'
+ elsif last_keypress == 'L'
fit_lens_header[0] = "\e[7m#{fit_lens_header[0]}\e[00m"
end
fit_lens_header.join('')
end