diff options
author | aycabta <aycabta@gmail.com> | 2020-11-08 21:56:27 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2020-12-05 02:58:58 +0900 |
commit | 9750c27afc99034960b74e8951718ca07cc353a8 (patch) | |
tree | ae96e40e00356d2c0f459e9aace599fe5be63996 /lib/reline/general_io.rb | |
parent | ba8e5f77eb2562cc0605f1414426a34c7e844964 (diff) | |
download | ruby-9750c27afc99034960b74e8951718ca07cc353a8.tar.gz |
[ruby/reline] Call process_insert when the end of pasting plural fullwidth chars
https://github.com/ruby/reline/commit/594484d9f9
Diffstat (limited to 'lib/reline/general_io.rb')
-rw-r--r-- | lib/reline/general_io.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/reline/general_io.rb b/lib/reline/general_io.rb index 3b40888bed..01a592e038 100644 --- a/lib/reline/general_io.rb +++ b/lib/reline/general_io.rb @@ -1,6 +1,10 @@ require 'timeout' class Reline::GeneralIO + def self.reset + @@pasting = false + end + def self.encoding RUBY_PLATFORM =~ /mswin|mingw/ ? Encoding::UTF_8 : Encoding::default_external end @@ -67,8 +71,18 @@ class Reline::GeneralIO def self.set_winch_handler(&handler) end + @@pasting = false + def self.in_pasting? - false + @@pasting + end + + def self.start_pasting + @@pasting = true + end + + def self.finish_pasting + @@pasting = false end def self.prep |