paging.rb: try to be more accurate by removing ansi sequences