def rl_forward_word(count, key)
if (count < 0)
return (rl_backward_word(-count, key))
end
while (count>0)
return 0 if (@rl_point == @rl_end)
c = _rl_char_value(@rl_line_buffer, @rl_point)
if (!_rl_walphabetic(c))
if !@rl_byte_oriented
@rl_point = _rl_find_next_mbchar(@rl_line_buffer, @rl_point, 1, MB_FIND_NONZERO)
else
@rl_point += 1
end
while (@rl_point < @rl_end)
c = _rl_char_value(@rl_line_buffer, @rl_point)
if (_rl_walphabetic(c))
break
end
if !@rl_byte_oriented
@rl_point = _rl_find_next_mbchar(@rl_line_buffer, @rl_point, 1, MB_FIND_NONZERO)
else
@rl_point += 1
end
end
end
return 0 if (@rl_point == @rl_end)
if !@rl_byte_oriented
@rl_point = _rl_find_next_mbchar(@rl_line_buffer, @rl_point, 1, MB_FIND_NONZERO)
else
@rl_point += 1
end
while (@rl_point < @rl_end)
c = _rl_char_value(@rl_line_buffer, @rl_point)
if (!_rl_walphabetic(c))
break
end
if !@rl_byte_oriented
@rl_point = _rl_find_next_mbchar(@rl_line_buffer, @rl_point, 1, MB_FIND_NONZERO)
else
@rl_point += 1
end
end
count -= 1
end
0
end