This repository was archived by the owner on Mar 12, 2023. It is now read-only.
Commit 4ad96ec 1 parent 0625e28 commit 4ad96ec Copy full SHA for 4ad96ec
File tree 2 files changed +14
-11
lines changed
2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -75,11 +75,7 @@ def stop
75
75
end
76
76
77
77
def dispatch_command ( command )
78
- if interceptable?
79
- @input_writer . write ( "#{ RubyJard ::ReplManager ::COMMAND_ESCAPE_SEQUENCE } #{ command } \n " )
80
- else
81
- RubyJard ::ControlFlow . dispatch ( command . to_sym )
82
- end
78
+ @input_writer . write ( "#{ RubyJard ::ReplManager ::COMMAND_ESCAPE_SEQUENCE } #{ command } \n " )
83
79
end
84
80
85
81
def feed_output ( content )
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def repl(current_binding)
30
30
set_console_raw!
31
31
unless @interceptor . interceptable?
32
32
@console . output . puts '*Warning*: Key bindings are disabled! ' \
33
- 'There maybe a gem or a module touching Readline whose Jard depends on. '
33
+ 'There maybe something touching Jard\'s Readline depedency '
34
34
end
35
35
36
36
pry_proxy . repl ( current_binding )
@@ -58,7 +58,7 @@ def pry_proxy
58
58
after_handle_line : proc {
59
59
set_console_raw!
60
60
@state . ready!
61
- @interceptor . dispatch_command ( 'list' ) if @resizing && !@resizing_dispatched
61
+ dispatch_resize! if @resizing && !@resizing_dispatched
62
62
} ,
63
63
before_pager : proc {
64
64
@state . processing!
@@ -79,12 +79,19 @@ def start_resizing
79
79
80
80
@resizing = true
81
81
@resizing_output_mark = @console . stdout_storage . length
82
- if @state . processing?
83
- @resizing_dispatched = false
84
- else
82
+ @resizing_dispatched = false
83
+ unless @state . processing?
85
84
@resizing_readline_buffer = @pry_proxy &.line_buffer
85
+ dispatch_resize!
86
+ end
87
+ end
88
+
89
+ def dispatch_resize!
90
+ @resizing_dispatched = true
91
+ if @interceptor . interceptable?
86
92
@interceptor . dispatch_command ( 'list' )
87
- @resizing_dispatched = true
93
+ else
94
+ RubyJard ::ControlFlow . dispatch ( :list )
88
95
end
89
96
end
90
97
You can’t perform that action at this time.
0 commit comments