Fog Creek Software
Discussion Board

Text Editor and Terminal Display


I know this is probably not the best place to ask such a question, but I still thought I might have a go...

As an academic project, I'm interested in writing a custom control that replicates a simple terminal-like application. I'm in need of information about how I should design the back end buffer so as to handle character styling, highlighting and copy of rectangular regions, etc.

Is anyone familiar with the intricacies of text editors and/or terminal displays? Where is the best place to obtain information and discuss algorithms and performance issues?

Hey, this is not a homework :) I'm just curious and not interested in pre-made solutions, but rather interested in finding an appropriate place to discuss my design with people with more experiences in this field.


Maxime Labelle
Friday, April 30, 2004

I've recently written a terminal emulator for Win32, in C++. Just mail me if you'd like to talk about it.

Friday, April 30, 2004

I'd start with looking through source code of an open-source editors and terminal emulators. VIM, RXVT come to mind first, but there're plenty of others. On Windows, TeraTerm's source is available, as far as I recall.

Friday, April 30, 2004

You could also look at the "ite" device driver in NetBSD for the hp300 and amiga ports.

David Jones
Friday, April 30, 2004

Here are some references that I got from the Scintilla site:

The Craft of Text Editing which describes how EMACS works, Craig A. Finseth :

Span Tables are another data structure that can be used to represent documents in memory in a way that performs well when data is inserted and deleted, (by James Brown )

Data Structures in a Bit-Mapped Text Editor, Wilfred J. Hanson, Byte January 1987


Friday, April 30, 2004

Use the MFC CRichEdit or Edit controls!

Andrew Scott
Sunday, May 02, 2004

*  Recent Topics

*  Fog Creek Home