Project

General

Profile

Actions

Feature #2666

closed

ext/curses: improved structure for view2

Added by hgs (Hugh Sasse) over 14 years ago. Updated about 13 years ago.

Status:
Closed
Target version:
-
[ruby-core:27894]

Description

=begin
Looking at bits of stdlib that ruby-doc.org considers insufficiently commented, I explored
ext/curses, and found some scroll methods in view2.rb. Examining this, it is an example program of how to use curses. However, it uses global variables, and puts methods (for scrolling) outside of a specific class. I've wrapped this in a class, and also added vi-like keybindings to the scrolling code. I'm calling it view3.rb for now, but maybe it would be an adequate replacement for view2.rb?

It was constructed from code in trunk, and tested on cygwin
(ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin])
and seems to be working.
=end


Files

view3.rb (3.11 KB) view3.rb hgs (Hugh Sasse), 01/27/2010 09:42 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0