Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added Readline::point call

Tested-by: Mark Somerville <mark@scottishclimbs.com> [F17, MRI 2.0.0-preview2]
[ mark@scottishclimbs.com - also defined RbReadline#rl_point as a
                            module_function ]
Signed-off-by: Mark Somerville <mark@scottishclimbs.com>
  • Loading branch information...
commit a489195d575b5763979a5a3c2cd8857de1b1c540 1 parent 9f8da56
@davelnewton davelnewton authored Spakman committed
Showing with 8 additions and 2 deletions.
  1. +2 −2 lib/rbreadline.rb
  2. +6 −0 lib/readline.rb
View
4 lib/rbreadline.rb
@@ -1103,7 +1103,7 @@ module RbReadline
:rl_basic_word_break_characters,:rl_completer_quote_characters,
:rl_completer_word_break_characters,:rl_completion_append_character,
:rl_filename_quote_characters,:rl_instream,:rl_library_version,:rl_outstream,
- :rl_readline_name,:history_length,:history_base
+ :rl_readline_name,:history_length,:history_base,:rl_point
module_function
@@ -8893,7 +8893,7 @@ def rl_sigwinch_handler(sig)
:rl_basic_word_break_characters=,:rl_completer_quote_characters=,
:rl_completer_word_break_characters=,:rl_completion_append_character=,
:rl_filename_quote_characters=,:rl_instream=,:rl_library_version=,:rl_outstream=,
- :rl_readline_name=,:history_length,:history_base
+ :rl_readline_name=,:history_length,:history_base,:rl_point
def no_terminal?
term = ENV["TERM"]
View
6 lib/readline.rb
@@ -305,6 +305,12 @@ def self.filename_quote_characters()
end
end
+ # Returns the current offset in the current input line.
+ #
+ def self.point()
+ RbReadline.rl_point
+ end
+
# The History class encapsulates a history of all commands entered by
# users at the prompt, providing an interface for inspection and retrieval
# of all commands.
Please sign in to comment.
Something went wrong with that request. Please try again.