Class: Kward::NativeShell::ViTerminal
- Inherits:
-
LineTerminal
- Object
- LineTerminal
- Kward::NativeShell::ViTerminal
- Defined in:
- lib/kward/shell/native_vi_terminal.rb
Constant Summary
Constants inherited from LineTerminal
LineTerminal::GET_ATTRIBUTES, LineTerminal::MAX_ESCAPE_BYTES, LineTerminal::MAX_PASTE_BYTES, LineTerminal::META_KEYS
Instance Method Summary collapse
-
#initialize(runtime) ⇒ ViTerminal
constructor
A new instance of ViTerminal.
- #read(source, **options) ⇒ Object
Constructor Details
#initialize(runtime) ⇒ ViTerminal
Returns a new instance of ViTerminal.
7 8 9 |
# File 'lib/kward/shell/native_vi_terminal.rb', line 7 def initialize(runtime) super(runtime, ViEditor.new(runtime)) end |
Instance Method Details
#read(source, **options) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/kward/shell/native_vi_terminal.rb', line 11 def read(source, **) super rescue ExecutionError, SystemCallError, IOError => e @runtime.vi_input_error(e, error: .fetch(:error)) ViEditor::Result.new(text: "") end |