Actions
Feature #8675
closedAdd Readline.point=(pos)
Description
r42146 でのテスト修正で \A を入力しているのですが、rl_point を直接いじった方が正しい気がするので。
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 714b08c..03ab724 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -808,6 +808,12 @@ readline_s_get_point(VALUE self)
{
return INT2NUM(rl_point);
}
+static VALUE
+readline_s_set_point(VALUE self, VALUE pos)
+{
- rl_point = NUM2INT(pos);
- return pos;
+}
#else
#define readline_s_get_point rb_f_notimplement
#endif
@@ -1761,6 +1767,8 @@ Init_readline()
readline_s_get_line_buffer, 0);
rb_define_singleton_method(mReadline, "point",
readline_s_get_point, 0); - rb_define_singleton_method(mReadline, "point=",
-
rb_define_singleton_method(mReadline, "set_screen_size",readline_s_set_point, 1);
readline_s_set_screen_size, 2);
rb_define_singleton_method(mReadline, "get_screen_size",
Actions
Like0
Like0Like0Like0Like0