NOTE: Each bug in this file is marked with either "*", "/", or "?" character.
The "*" means the bug is still pending.  The "/" means that I believe it has
been solved.  A "?" means that I've done some work on it, and *hope* it is
solved because it seems to work better but I never really understood what
was wrong in the first place.  A "?" will become a "/" if I don't receive
more reports of that bug.

* In the "syntax" display mode, if a multi-line comment ends on the last
  character of the line just above the top of the window, and the comment
  ender string is one character long (which happens in Pascal, but not C),
  then elvis assumes that the top line of the window is a continuation of
  that comment.

* Sometimes the X11 interface refuses to give up keyboard focus.  This has
  only been reported under FVWM.

* It occurs to me that the digraph table could be used to assign a collation
  sequence to the non-ascii letters.  This would allow regular expressions
  such as /[a-z]/ to match non-ascii letters as well as ascii ones.

-------------------------------------------------------------------------------
Fixed in 2.0p-beta...

/ The :e command should try to leave named marks unchanged.

/ ":n!" sometimes writes changed files.

/ In HTML mode, any hypertext links on the first line are will not work.

/ The default address for :split (and related commands) should be the location
  of the most recent change, not the top of that buffer.

/ Add a -fork flag so that non-client elvis processes can return the shell
  prompt immediately, like the -client ones do.  -client should imply -fork.
  It also needs a -iconic flag.

/ Some variables/functions have names which are C++ keywords.

/ It would be nice if the "syntax" display mode allowed different quote
  characters at each end of a string: `string' or (string), for example.
  Similarly, it would be nice if (* comment *) was supported.

/ It would be nice if whitespace was allowed before the preprocessor
  character in "syntax" mode.

/ The { command refuses to move backward over a line that starts with '{'.

/ In the "normal" and "syntax" modes, printing a ^L should cause a page break.
  When editing, it should be displayed as ^L.

/ Autoindent problems: blank lines contain indent chars, and "r<Enter>"
  doesn't do autoindent.

/ The >> command is affecting blank lines; it shouldn't.

/ The ^D and ^U commands should adjust the cursor's buffer offset, so the
  cursor on the same line of the window after the scroll.

/ if -client fails because the existing elvis process has died, then the 
  -client flag should be ignored; the new elvis process should edit the files
  itself.  Currently Xlib bombs.

? For IRIX, configure adds a "-L" flag with no directory name.

/ The "sync" option doesn't do anything.

/ "maze" macro package causes core dump?

/ On a blank line, c$ or C deletes that line; it should act like an insert
  command, instead.  This is messing up the "maze" macros.  (Actually, a
  similar problem seems to exist for all operators.)

/ The command sequence $yl fails.  It should yank the last char of the line.
  This bug prevents the Towers of Hanoi macros from working.

/ The command sequence yl/^$^Mp (i.e., doing a character-mode paste onto a
  blank line) pastes after the newline character; it should paste before it.
  This bug prevents the "bouncing ball" macros from working.

/ The "wrapped" message should probably be a MSG_STATUS message, instead of
  MSG_INFO.  Big macro packages work better that way.

/ Under X11, a triple-click acts like two double-clicks.  The third click
  should be ignored; treating it as a second double-click pops you too far
  out of the stack, and treating it as a single-click before the screen has
  been updated may cause the cursor to be moved back to the popping point.
  But if there is a fourth click, it should be treated as a double-click so
  you can pop out quickly.

/ Add \@ (current word) in to the ex command line, at least for :!

/ A ":e" or ":e%" command should not affect the previousfileline or
  previousfile options.  It should, however, recheck the readonly option.

/ In input mode ^P should be implemented (insert a copy of the anonymous
  cut buffer, stay in input mode).

/ Core dump if LC_MESSAGES (etc.) is set, and the corresponding message file
  doesn't exist.

/ Extremely long lines (50% larger than screen?) have been reported to cause
  core dumps.  Apparently there is a bug in slop-scrolling.  This doesn't
  appear on non-ELF Linux.  See [Smith 0517] and [rpeer 0522] for clues.

/ Autowrite doesn't work with ":e#".  See [Nishi 0516].

/ In osunix/osdir.c, MAX_NAME is too small.

/ The '' mark isn't always set when it should be.  For example, After "G1G",
  I should be able to bounce between the top and bottom of the file via ''.

/ < and > aren't recognized as buffer names by the EX command parser.

/ In the "man" display mode, the .TP command should ignore any arguments
  given on its command line.

/ The session files should be stored in /var/tmp if possible, instead of
  the home directory.  This is because /var/tmp is often *MUCH* faster
  than the home directory, since the home directory might be mounted via
  NFS.  When elvis starts up, if it sees an already-existing session
  file that is writable, it should give a warning.  When started via
  "elvis -r" it should ignore unwritable session files.
  
/ There should be a :window command...

	:window                 - list all windows & their buffers
	:window +               - switch to next window, like ^Wk
	:window -               - switch to previous window, like ^Kj
	:window number          - switch to window "number"
	:window name            - switch to a window showing the named file

/ Elvis can't parse SGI's compiler output.

/ If filename expansion finds a directory, it should append '/' or '\'
  instead of Tab.  Also desirable: if multiple matches are found and no
  new characters are added, it should list all matches and then redisplay
  the input line.

/ Cursor motion on ex command lines is wrong -- it seems to depend on the
  display mode.  Also, the right arrow always jumps to the end of the line.

/ Abbreviations are implemented incorrectly.  They should push keystrokes
  back onto the type-ahead queue, so that you can do things like...

	:ab for@ for (;;)^[hhi

/ Need to add an optional GUI function for showing "ruler" and "showmode"
  information.  Tentatively, it should look like this:

    (*gui->status)(
        long line,      /* line number */
        lone column,    /* column number */
        _CHAR_ learn,   /* letter if learning, '*' if modified, else ',' */
        CHAR *mode)     /* name of the current command mode */

	The learn argument is the character which normally appears between
	the row and column numbers.  If elvis is in "learn" mode, then the
	learn argument is a letter indicating which cut buffer is recording
	the keystrokes.  If not in "learn" mode, then the character is either
	an asterisk for modified buffers, or a comma.

/ Add "lppaper" option.  This is a string which affects PostScript output.
  Elvis should define an ElvisPaper word with its value, before including
  the lib/elvis.ps file.  The lib/elvis.ps file should be modified to adjust
  its functions accordingly.

/ The X11 GUI is sensitive to too many modifier keys.  Nothing works if
  NumLock is enabled, and it is also messing up German keyboards.  Also,
  it must ignore the XK_Mode_switch key (which apparently isn't detected
  by the IsModifier() macro).

/ Switching a window's main buffer should cause wantcol to be reset.

/ The Shift-B command doesn't work near the top of the buffer.

/ ex-mode searches (:/foo) and reading/writing/printing should call guipoll().

/ If an HTML document contains an <img> tag which is too long to fit on any
  line, then elvis gets stuck in an endless loop.

/ The "configure" script should look for gcc in $PATH, not the hardcoded
  search path.  Perhaps XLIBPATH should be set from LD_LIBRARY_PATH as well.

/ It would be nice if the .TP command allowed .IR and similar two-font
  commands to be used in the tag line.  Currently it only allows plain text
  or one-font commands.

/ Under UNIX, the [a-z] wildcard doesn't work.

/ The "x11" gui won't allow you to set the cursor color in your .exrc file.

/ Somehow the built-in calculator lost the ability to handle hex constants.
  ":calc 0x423" fails.

/ [Sort of fixed] Something should be done about the interaction of :cd
  with multiple windows.  Possibly multiple buffers, too.  The problem is
  that :cd is global to all windows and buffers, but most buffers only
  have a relative path name.  So doing a :cd changes the file that they
  correspond to.  The original vi also has this problem, but since it
  only has one window and one buffer, it is easy for the user to
  understand the consequences there.  For elvis, it might not be so
  easy.  Ronald Peer has some code that might help.  [Ronald Peer, 5/12]
  At the very least, :cd should turn off the "edited" flag for all
  buffers.

? There are still a lot of problems compiling elvis under Solaris.  One
  person reported a system crash while trying to link (not run) elvis.
  Another reported a core dump immediately upon running.
	/ Type u_short undeclared while processing sys/stream.h from prgopen.c
	  I believe this means that sys/types.h should be included before
	  sys/stream.h
	/ osprg.c needs to #include <string.h> to gain a declaration for
	  strdup().
	? Shrinking ttybuf[] to 1000 characters was too severe.  The termcap
	  library demands at least 1024 characters.  Is 1500 reliable?
	/ If gcc isn't installed, the default compiler can't compile elvis.

/ The beautify/bf option should be added.  Also, the mesg option should be
  added at least as a dummy.

/ X11 font names should be excluded from ":set all" because they make the
  columns too wide.  If the user cares about X11 options, he can do ":se x11?"

/ For QNX, loose the -DQNX and add -D_POSIX_SOURCE.

/ The scrollbar buttons sometimes stutter, moving you farther than you really
  meant to go.  See [Lee Johnson, 5/14a]

/ Also, if you allow the buttons to autorepeat and then move the mouse off
  the buffer into the main text area, then any movements suddenly become
  text-selection dragging, and the scrollbar repeats even after you release
  the mouse button.

/ The "instman.sh" script should be changed to...
	/ Use nroff in preference to elvis
	/ Ensure that elvis is run with a consistent configuration, by
	  explicitly setting ELVISPATH and EXINIT.

/ The second name for the "modelines" option should be "modeline" (singular).

/ A little Stop sign would be nice in the "x11" interface.  Gray normally,
  or red if clicking it would abort a time-consuming command such as /re

/ Can't the :p command be faster in exrefresh mode?

/ The "report" option isn't fully supported.

-------------------------------------------------------------------------------
The following bugs will probably not be fixed in release 2.0...

* In normal mode, you can't edit text that occurs after the last newline.
  The vertical movement function for "normal" display mode won't let you
  move the cursor past the last newline, even if there are other characters
  after it.

* The "configure" script uses "[ -f file ]" to test for the existence of
  "file".  But for some versions of UNIX, "-f file" requires "file" to
  exist AND BE A REGULAR FILE.   So it fails for symlinks.  I should probably
  either use "-e file" to test for existence, or add a "-o -L file" to test
  for symlinks in addition to regular files.  Since not all implementations
  support the "-e" and "-L" flags, this may be tricky.

* The htmlescape() function in dmmarkup.c is reported to cause core dumps
  on an RS6000 running AIX, when compiled with optimization enabled.  If
  compiled for debugging, it doesn't dump core so specifics are hard to
  come by on this one.

* An expose event causes the scrollbar to be redrawn, even if it should really
  be blanked out (because the cursor is on the bottom row).

* Ex command-line history is very weird.  If you recall an earlier command
  and edit it, you're actually editing the historic version.  I would prefer
  to have a new copy of that line created at the end of the history buffer,
  and have the editing take place on that new copy.

  The same thing happens with regular-expression history, and filter-program
  history.

* Regexp searches under MS-DOS are too slow.

	This was reported under DOS 7.  I tried it under DOS 6.2 and it
	was reasonably fast -- about 10 times faster than the DOS 7 user
	reported.  Perhaps elvis was compiled with debugging enabled?

* Problems in the markup modes ("man" and "html" modes)
      / Sometimes moving the cursor will cause linebreaks to be adjusted,
	which can cause strange transient display problems.  In "html"
	mode this can happen when the cursor is moved onto a character
	escape such as &nbsp;.  For "man" mode, many of the commands can
	cause it to happen.  I need to distinguish between a token's
	logical width (used for computing line breaks) and its physical
	width (how it is displayed).
      / The position of the cursor when the mode is first entered is
	significant in the same way; it shouldn't be.
      * Resizing the window should cause the whole buffer to be adjusted.
      /	The .TP macro should be supported at least a little better.  It is
	used fairly often in other people's man pages.
      ? When the cursor is on a command which adjusts indentation, the
	visible indentation doesn't seem to affect the command itself.
	It should; otherwise, the linebreaks happen in funny places.
	For example, try changing a ".P" to ".IP"

* The :& command doesn't seem to be working correctly in all circumstances.
  After doing a ":%s/.$" on one buffer, and then switching to another buffer,
  the command ":%&" did not work.

	This is because the "elvis.arf" file uses a :s command to locate and
	execute modelines.  There is no easy way to fix this, unless you think
	":set nomodelines" is an acceptable solution.

-------------------------------------------------------------------------------
Fixed in 2.0o-beta...

? The MS-DOS version beeps *TWICE* for each '\007' character.

	I was unable to reproduce this.  I do recall experiencing it
	before, but it seems to have magically cleared up.

/ After a :split, the :next and :previous commands don't work.

/ The "ref" command doesn't display structs very well.  Try "ref OPTDESC".

/ The termcap user interface should probably use :mh=: (half-bright) to
  display italic characters, by default.

/ The "ctags" program lacks the -x flag.  Also, I should incorporate
  Dirk Verworner's patches for "-i" and function pointer parsing.

/ Here's an interesting suggestion: allow "elvis -client files..." to inform
  an existing elvis process to load the files, instead of initializing a new
  elvis process.

/ The j/k movement commands don't stay on the same column after a d$ command.

/ In a new file, "8iabcdefg<Esc>" inserts 7 copies on line 1, and on copy
  on line 2.  They should all be on line 1.

/ The Win32 interface treats a double-click as click/double-click/click
  instead of click/double-click.  This means that after using double-click
  to do tag lookup, the cursor is located at the mouse pointer instead of
  on the tag line.

? When used with different code pages under Win32, elvis doesn't support the
  non-English keys on the keyboard.  This may be a problem with Win32 and/or
  MSVC++, because vim and vile have the same problem.

	I added a "codepage" option, and an explicit SetConsoleCP() call
	to force the input codepage to be the same as the output code page.
	I'm not sure what the original problem was, but maybe this will help.

/ Can "italic" be a synonym for "italics" ?  This already works for setting
  option values, but the :color command doesn't allow it.

/ In the "syntax" display mode, if the first character on the screen is a
  string quote character, it isn't recognized as one.

/ The configure script should support --help

/ In guix11.c, the "XSelectInput(display, fromwin..." call is reported to
  crash occasionally.	I should probably forget about receiving events from
  the xterm window, and just use XSetErrorHandler() to ignore errors from
  the "warpto" exit code.

/ The :q! command doesn't quit if there are "more files".

/ At the end of the file, } should move past the last character when used
  as the target of an operator; else things like d} don't work right.

? The SCO console driver only allows three arguments to a \E[...m escape
  sequence.  The guitcap.c file needs to work around that limitation.

? SCO Xenix requires -lx and also needs an explicit definition of IS_SREG
  in osunix/osdir.c

/ Can't set the colors for "emphasized" and "fixed" fonts in .exrc file.

/ The manual entry for :lpr is missing the word "command".  Also, the
  discussion of the lpout option could benefit from some rewriting.

/ A :source with no filename dumps core.

/ The "e2" script fails under SunOS because their /bin/sh is *ANCIENT*

? Some UNIX systems don't have <sys/wait.h>.  The "configure" script should
  work around that.

/ The osunix/osprg.c file should do something with SIGPIPE!  Otherwise
  writing to a faulty filter could cause sudden death!

/ Add ".cpp" as a possible name for C++ code.  Hey, here's an idea: add
  a knownsyntax(file) function which returns true if the file's extension
  is listed anywhere in the elvis.syn file, or false otherwise.

/ In msg(), the va_arg(ap, CHAR) call should be va_arg(ap, _CHAR_) to avoid
  problems with argument type promotion.  Similarly, char->_char_.

/ Under UNIX, make the POSIX terminal configuration file be the default;
  only use the others if USE_TERMIO or USE_SGTTY are defined.

  Also, in tcapsysv.h, change "tio" to "t" and make VSTART/VSTOP conditional.

/ When lplines=0, the <h1> tag shouldn't cause a formfeed.

/ The "syntax" display mode needs to allow some way to specify which
  punctuation characters are allowed in words.  For example, standard C
  allows _ and some C compilers allow $.  Perl allows ' in words.  Also,
  words should be allowed to start with digits; otherwise 0xff looks funny.

/ The "syntax" display mode can dump core if the top two lines of the file
  are part of a single /* ... */ comment.

/ The Win32 termcap port should handle window resizing differently.
  Instead of always forcing the window to be the same size as the normal
  buffer, perhaps it could create a new buffer the same size as the window,
  and make the window use that new buffer while elvis runs.  The old buffer
  could then be restored when elvis exits.  The advantages of this are:

	- The user could have a large buffer and a small window.  Some users
	  like large buffers so they can scroll back and look at previous
	  output.
	- The previous output won't be clobbered by elvis' screen data.
	- While elvis is running, it can respond to changes of the buffer size
	  exactly as it does now.

  Also, we want to preserve the current color attributes.

/ The markup display modes should start adjusting on the line *BEFORE* the
  line where the change took place.  This is due to situations like when you
  insert a short word at the start of a line, before a longer word.  The short
  word might fit on the previous line.

/ After changing a buffer's filename via the :file command, writing it via
  :w should cause the "edited" option to be set.

/ When marking lines via the mouse under X11, one too many lines are copied
  into the X cut buffer.

/ The x11 interface may think it is available if DISPLAY is set, even if
  the X server is really being used by someone else.

/ Until I get the history working the way I want it to -- with altered lines
  being copied to the end of the buffer -- I should at least make it so that
  when the cursor moves outside of the edit bounds, the bounds are reset to
  the entire line that the cursor is on, and the cursor should be moved to
  the end of the line.

--------------------------------------------------------------------------------
Fixed in 2.0n-beta...

? :0 doesn't work right under Solaris, but does under Linux.

	Unable to reproduce this.

/ The termcap interface doesn't always handle colored underlined text very
  well.  This was reported under Linux.

	This only happens on the console of a Linux system.  Apparently
	the underline escape sequence temporarily disables color control.
	Probably the linux console driver should be changed.  Until that
	happens, a "ttyunderline" option would be nice.

/ Can't map ^Z to :susp successfully?  This was reported while using the
  termcap interface under Irix, with any shell.  The :susp command does
  work, though.  I can't reproduce this problem under Linux.

/ Change the help files' extension from ".hlp" to ".html".  ".hlp" confuses
  users and some application programs.

/ The visual ! operator only affects a single line.  Other operators,
  (including =) work correctly though.

/ It would be nice if we could back out of a history line.  

/ The "configure" script doesn't quite handle modern BSD.  It needs to add
  -D_POSIX_SOURCE and -lipc.  If there is a compiler named shlicc2 then it
  should be used because the standard compiler doesn't use shared libraries.

/ The :insert and :append commands should work in input mode if the new text
  is supplied on the command line.

/ Can I make the "x11" scrollbar autorepeat?

/ The "stagger" option in guix11.c doesn't work with the -a flag.  It does
  work for :split later on, though.

/ The "c" display mode may handle multi-line string literals better, but
  it apparently handles comments worse.  As the following lines scroll off
  the top of the screen, it goes italic.

	//* single line comment beginning with slash-slash and an asterisk
	not_a_comment()

/ Can I make the Win32 termcap interface use the mouse?

/ The Win32 termcap port isn't handling ^C correctly.

/ Blank lines in .exrc scripts should be ignored.

/ Problems using the "warpback" feature on some systems.  This appears to be
  because I'm trying to test for an error flag from XGetInputFocus(), but
  that function apparently doesn't return an error flag so I'm really testing
  for God-knows-what.  Also, elvis is warping the mouse even if the user has
  just manually positioned the newly created window.  If the window's position
  isn't chosen automatically, then the pointer shouldn't warp.

/ The values of options aren't saved in the "Elvis custom initialization"
  buffer, the way maps, abbreviations, and digraphs are.  This is only
  significant if you restart an edit session.

--------------------------------------------------------------------------------
Fixed in 2.0m-beta...

/ The Window Manager's "close" request shouldn't destroy the last window,
  because that could cause information to be lost.

/ That messages-after-destroying-a-window thing that I did for the "x11"
  GUI is also required for the "termcap" GUI.  Perhaps it should be implemented
  in a shared piece of code.

/ ":set foo?" doesn't complain about "foo" being an unknown option.

/ The "vi.exe", etc., from 1.8 need to be added to 2.0 for MS-DOS's benefit.

/ The termcap interface never seems to reset the ^C flag.  After you've
  done a ^C once, things keep getting interupted.  Also, the Win32 version
  never checks for ^C at all.

/ Using the termcap interface, sometimes the status line is not cleared.
  This definitely happens under MS-DOS; need to check for systems.

/ Under MS-DOS appending via ":w >>filename" doesn't work.

/ The "e2" script isn't being included in the distribution.

/ When a buffer is renamed using the :file command, the buffer's name doesn't
  contain the directory name; it only contains the basename and extension.

/ The "html" display mode should display the ALT= text from <IMG> tags.

/ It would be nice if the Microsoft versions allows forward slashes to be
  used in filenames, in place of backslashes.

/ For whole-line cut buffers, the p and P commands leave the cursor in the
  wrong place.  They should leave the cursor at the start of the inserted
  text, but they're leaving it at the start of the last line instead.

/ If a visible selection is active, and the user enters an ex command which
  doesn't use addresses but doesn't affect store an "undo" version either,
  then elvis should act as though there was no selection.  Currently it gives
  an error message.

/ Sometimes the "x11" user interface clears lines to black instead of the
  real background color.  This seems to happen immediately after switching
  files or display modes.  E.g., switching from "Bugs" to "lib/elvis.man"
  causes a black line at the top of the screen.

/ The "configure" program should use "hp-ux" as the name of the HP-UX
  operating system.  Also, HP-UX seems to require a definition of the
  "ospeed" variable; it isn't in the termcap library.

/ The words "public" and "private" are missing from the "c" display mode's
  list of reserved words.  Also, the word "protected" is longer than the
  code expects any reserved word to be, and that prevents it from being
  recognized.  It would also be nice if it highlighted the preprocessor
  directives.

/ The X11 GUI of version 2.0l can get stuck.  Some people have reported that
  it is always stuck; others that it becomes stuck after it has been started
  from an xterm, if the xterm is then iconified.

/ On the last line of a buffer, the command d$ acts like dd  (This may have
  been added between 2.0l and 2.0m.)

/ The command "elvis +make" doesn't show anything until the compile is
  complete.  Perhaps we could make drawextext() output its text to stdout
  prior to the first input event?  Also, error messages which occur during
  initialization seem to be lost.

/ Need to check for more args before quitting last window.

/ Under Win32, it sure would be nice if the "elvispath" option's default
  value included all of the directories in the execution path, in addition
  to ~/lib.  Or maybe search through that path for "elvis.exe" and only
  use the one directory where it is found.

/ Under Win32, the name "\foo" is mangled into "foo".  However, both "C:\foo"
  and "\dir\foo" work correctly.

/ If a rectangular cut includes line 1 of a buffer, elvis can get stuck in an
  infinite loop.

/ The Win32 version of "tcaphelp.c" can't show graphic characters.

/ It'd be nice if there was a way to completely hide markups.

/ :$|$d leaves the cursor in a goofy place.

/ :help doesn't work when editing a file with a full pathname.  It expects
  the help files to reside in the same directory as the file you're editing.

/ :%s/foo/bar/g reports the total number of lines, not the number of changed
  lines.

/ Need to control which non-ascii characters are visible.  Ideally, there
  should be a new option which accepts the following values:

	all	all non-ascii characters are printable
	most	non-ascii chars 0xa0-oxff are printable, but not 0x80-ox9f
	none	no non-ascii characters are printable
	strip	convert 0xa0-0xfe to ASCII; others aren't printable.

  The default should be "most" since that's how Latin-1 is arranged.
  unprintable characters should be displayed as a '.' character.

/ The = operator can't be used on a character selection to evaluate an
  expression.  This used to work, but now it seems like it is trying to
  evaluate the whole line.

/ Need to add ".DLL" to the list of binary file name extensions in elvis.brf

/ Auto indent doesn't work quite right.  An <i><enter> doesn't adjust the
  indentation as it should.

/ After ":set noopt", the current window should be redrawn after every
  command has been executed.  This should enable those tricky animation
  macros to work, or (more likely) let you see where they don't work.

-------------------------------------------------------------------------------
The following have been fixed (I think)

/ The :make and :cc commands have some problems:
      / They don't seem to pass arguments to the programs correctly.
      / The :cc command doesn't work unless the current edit buffer has
	a filename.
      / The make and cc programs are never executed under DOS/Win32 because
	prggo() is never called.
      / Under Win32, the command line is subjected to calculate() twice.
	Normally this would be harmless, but calculate() returns a pointer
	to a static buffer, so for the second call its output overwrites
	its input.

/ The dirpath() function should be extended so that if the filename argument
  happens to be a full pathname, it is returned unchanged.  This will fix a
  bug in the :tag command, when a tags file contains full pathnames of files.

/ There are some major glitches in screen updating, when the "termcap"
  user interface is used.  These show up most acutely in Win32, but the
  problems appear to be in generic code.

/ Two problems in file names: A file name such as "~$1elvis.rc" is converted
  to "~.rc", because the $1elvis is being interpretted as the name of an
  environment variable, and that variable has no value.  Under Microsoft,
  a file name such as "oswin32\*.c" becomes "oswin32*.c" because the \ is
  being treated as quoting the '*'; Unix needs to use \ to quote *, but
  Microsoft can't do that.

/ The "lpescape" family of printer drivers all force the printer into PC-8
  symbol set mode, which works great for graphic characters but messes up
  non-ASCII characters.

/ The . command and autoindent don't interact as they should.  They *both*
  provide indentation, but only one (ideally the autoindent) should.

	Note: I fixed this by making the the . command skip the autoindent.
	This was a lot easier to implement, especially for the case where
	multiple lines are inserted.  I didn't want to reinput and reindent
	each line separately; I just wanted to paste in a copy of the previous
	text.

/ "make install" sets file permissions incorrectly.  It marks the "lib" files
  as being executable.

/ Under Win32, using a bogus command line such as "se makeprg='this is wrong'"
  apparently causes the equivelent of a core dump.  I believe this happens in
  the msg() function.

/ Something seems to be out of sync in the keystroke mapper.  If a mapped
  sequence starts in input mode, switches to command mode, and invokes another
  map, that map will be looked up as though elvis was still in input mode.
  For example, after...

	:map! ;a ^[3;bj
	:map  ;b h
	:map!;b l

  If you go into input mode and type ;a, elvis will do "^[3lj" when it really
  should do "^[2hj".

/ Switching buffers should cause the window to discard previous top/bottom
  clues.  Keeping them messes up screen positioning.

/ In a .exrc file, "set wrapmargin=..." bombs because there is no window yet.
  Specifically, I think that what's happening is o_columns is 0, so the
  requested wrapmargin is considered illegal, and msg() dumps core.

/ The "x11" GUI needs to handle <Alt> better.  If the input focus is changed
  while <Alt> is pressed, then elvis never sees the KeyRelease event.

/ The command line for ":map" is parsed incorrectly.  It can't depend on the
  usual lhs/rhs parsing because that doesn't handle ^V^I or ^Vspace.

/ The --x-libraries and --x-includes values aren't incorporated into the
  Makefile.  Also, a --libs=... flag is needed.

/ The "cw" and "cW" commands don't work correctly when the cursor is starts
  one whitespace.  Those commands are supposed to act like "s" in that
  situation.

/ The command ":s/./\~/g doesn't work correctly.  It deletes every character,
  instead of replacing every character with a tilde.

/ When elvis exits, can it warp the pointer and give keyboard focus to
  whatever window had it before elvis was invoked?

/ The :make command never calls prggo().

/ Under Win32, the ELVISPATH environment variable is ignored?

/ Appending to a named cut buffer doesn't work. ("Ayy)

/ Sometimes in a command line, the % character isn't replaced by the name of
  the current file.

/ If the last line is deleted, sometimes undoing that change will leave the
  cursor past the end of the buffer.  For example, ":$d" sets this up.

/ The visual n command doesn't always seem to start searching from the
  cursor position.  Sometimes it starts searching from where the previous
  search ended.  Specifically, this is known to happen when the search is
  anchored at the start of the line.

/ The command ":%!program" doesn't work, even though ":1,$!program" does.
  This appears to be a parsing problem.

/ Under Win32, if you use the ! command to run an MS-DOS (16-bit) program,
  then the console's size may change.  Elvis doesn't detect this change.

/ Under Win32, the Control-2 and Control-6 keys don't send the correct
  characters.

/ Under Win32, running an external filter program causes elvis to lock up

/ The string version of the >> C-like operator doesn't pad correctly.

/ A character-mode cut which happens to grab whole lines should be treated
  as a line-mode cut.  For example, if the `a mark is at the start of line 5
  and the cursor is at the start of line 7, then the command y`a should yank
  *LINES* 5 and 6, and the command pa should paste those *LINES* after line 7.

/ The ":help :exname" form of the :help command doesn't work.  It always looks
  up the :append command.

/ Sometimes simple text searches fail when then shouldn't.  Example: In vi.c,
  a search for / l / will find the "l" in the SPACE line, but not the one in
  the "l" line.

/ Ideally, a rectangular selection which happens to contain only a single
  line should be treated as a character selection.  This is mostly so that
  the Windows port, which has only two buttons, can use the primary button
  for selecting either a rectangle or chars (depending on the value of some
  option) and if you happen to be selecting text from a single line (which
  is likely to be the most common case) then it doesn't really matter what
  that option is set to.

/ Some command-line options have the wrong values, or aren't supported at all.
  In particular, -s should be "safer" not "session", and -i should be "input".

/ Can't paste successive cut buffers via "1p . . . .

/ The usage message is so large that the top of it scrolls off the screen.
  Need to split normal options and GUI options into separate messages.

/ "make install" should install the man pages.

/ Add in the other programs: ctags, ref, fmt

/ The ":n!" command doesn't work?

/ The % command causes a core dump if used on a buffer which doesn't end with
  a newline, and no % is found.

/ Sometimes the session file isn't being deleted.

/ When the <space> character is used as the target of an operator, it includes
  one too many characters.

/ If a buffer is altered while in "html" display mode, it may be displayed
  incorrectly.  I prefer to do the actual editing in "normal" mode, and
  flip back to "html" mode just to preview it.  If you prefer to edit in
  "html" mode, then you'll need to flip to some other mode and back again
  to force the HTML tags to be reprocessed.  The easiest way to do this
  is by mapping a function key:

	:map #1 ^Wd^Wd

  This bug seems to depend on the position of the cursor.

/ The "number" option doesn't work well when sidescrolling is enabled.  If you
  ever sidescroll, then you can never scroll back far enough to see the #'s.
  
/ The "number" option also interferes with "man" and "html" display modes.
  Paragraphs and other line-breaks don't get line numbers.

/ When using the "open" user interface, a newline must be written at the end
  of each command line, before any output lines.  Currently, if you do a ":se"
  you see something like ":seautoindent..."  This happens only when using the
  ':' command from open command mode; after a 'Q' command it works normally.

/ The "man" display mode's token parser has a hard time dealing with
  a backslash-space combination.  It can cause a core dump.

/ The "man" and "html" display modes don't work well on buffers which
  don't contain any displayable tokens.  They should probably output at least
  a newline character in that case.  (To reproduce this bug, start with a
  totally empty buffer and switch it to "html" mode.  Then hit <i> to create
  a blank line, and BLAMMO!)

/ The = operator should be line oriented, even when the movement command
  used to specify the effected text is a character-oriented command.

/ The "edited" option should be set anytime the "newfile" option is set.
  I.e., when you're creating a new file, ^G shouldn't say [NOT EDITED].

/ The :sall command doesn't work.

/ The DOS and NT versions don't find ~/elvis.rc.  Changing the / to \ (in the
  elvis.ini file) causes the equivelent of a core dump.

/ Scrolling problems in the NT and DOS ports, when using the "console" or
  "pcbios" terminal types, respectively.

/ In DOS, the search commands (/, ?, n, N) fail on long searches.

/ Memory leak in the handling of "undo" versions of a buffer. (buffer.c:985)

/ The NT port should change the console size to match its buffer size.

/ The "~" character isn't converted to the home directory name under non-UNIX
  systems.  Also, the use of "/" instead of "\" in the "elvis.ini" file seems
  to be causing some problems.

/ In the MS-DOS and WIN32 ports, when an external program is run the program's
  output is appended to the bottom line of the screen; it would look better if
  the screen scrolled up first.
  
/ When using BIOS calls for screen updates, the first line of an external
  program is clobbed when run via :!prog
  
/ In ex mode, only the first command line gets a ':' prompt.

/ After a :cd command, the session file won't be deleted because it resides
  in the current directory, and we only store the relative pathname.  Also,
  you can't start elvis in a directory where you can't create files.  Both
  of these problems could be solved by storing the temp file in the home
  directory instead of the current directory.

/ If you append text to the end of the buffer, the screen will scroll up,
  causing more and more tilde lines to be visible.

/ The "termcap" user interface doesn't catch any signals.  This makes ^C
  very dangerous.

/ The "x11" user interface uses the old "cut buffer" style of data exchange,
  instead of the newer "selection" style.  You can transfer data from elvis
  to an xterm only if no "selection" has ever been made.  You can't transfer
  text to rxvt at all.

/ The "-v" argument isn't verbose, it is version.  Need to change main.c
  so -V (uppercase) is verbose.

/ The :split command doesn't load a file.

/ If you use the <x> command to delete the only character of a one-char line,
  then the cursor is moved back to the newline of the preceding line.

/ The <w> command doesn't move over newlines.

/ You're allowed to switch away from a modified buffer, even if it doesn't
  have its "retain" option set.

/ You're allowed to exit the last window, even if some hidden user buffers
  need to be saved.

/ The tag stack doesn't seem to work right in HTML mode.  Or maybe it is just
  when showing :help.
  
/ The ^Wn command does a "next" instead of a "new".

/ The Shift-D command leaves the cursor on a newline char.

/ The s command doesn't work on the last character of a line.  In fact, 
  none of the change commands look right if their extent ends where a line
  ends.

/ The cw command, on a one-letter word, leaves the "$" marker in the wrong
  place.  I think this is because cw is treated like ce, but should be
  slightly different; the difference becomes apparent when the cursor starts
  on the last character of a word.

/ The cW command doesn't work right on the last word of a line; it clobbers
  the newline character after the word.

/ After inserting 0 characters (eg, O^[ to create a blank line), the . command
  complains because the "Elvis previous input" buffer is empty.

/ The character search commands (fFtT;,) had a memory leak; they weren't doing
  a scanfree().
  
/ Problems with termcap interface under SunOS.  On PSU's system I get a ton
  of warnings, but it works.  Others have reported no warnings, but it doesn't
  work (doesn't go into "raw" mode).

/ The x11 GUI doesn't translate keysyms well.  It tries to convert single
  characters into KEYSYMS ("g" becomes XK_g, with the raw code "^K0067"), and
  it doesn't accept the #1 - #10 notation for function keys.

/ Maps were being applied even for the arguments of commands; they should
  only be applied at the start of a command.

/ Writing out a file seems to clobber the "previousfile" option.  This is
  correct only if the file is written to a different name (in which case
  the "previousfile" should be set to the new name).

/ Some people have reported core dumps while switching files via ":e otherfile"
  or similar commands.

/ On at least one occasion, elvis became hung when switching files.

/ The ":r !cmd" and ":w !cmd" commands don't work.

/ The ":r" command bombs if you don't supply any filename.

/ The "termcap" interface sometimes gets confused about what color it is
  supposed to be displaying.

	NOTE: The termcap color bug has been fixed (at least for foreground
	colors) and it works well on every type of terminal I could test it
	on, except for color_xterm.  (It works on an rxvt.)  The color_xterm
	program seems to have a bug  - when it erases the cursor, it always
	draws the underlying character in black.

/ In input mode, excess text should be cleaned up before inserting a newline.

/ When printing HTML text, if the text begins with a <h1> tag
  then a blank page is ejected.

/ There seems to be a bug in the lowdelete() function; it is writing past
  the end of a buffer.

/ :vi rereads the file; it shouldn't read unless a name is given explicitly.
  :e also rereads the file, which is okay except when the current buffer has
  been modified and no ! has been given.

/ Trouble with more than one filename argument.  Wildcard expansion works
  well; you just can't give more than one explicit filename.

/ Occasional core dumps when upon entering an ex command line, after
  visibly marking some text and then unmarking it.

/ An unrecognized single-character ex command name generates a goofy-looking
  error message; apparently the reported command name isn't NUL-terminated.

/ In an address range, the first address can't be omitted.  This should be
  allowed; an omitted address should default to the current line.  The command
  which revealed this error was ":,+p" which should print the current line and
  the following line.  That command failed, but ":.,+p" worked.

/ The ^W commands don't work on an empty buffer.

/ After visibly selecting text and using the "c" operator on it, you should
  be able to visibly select other text and use "." to repeat the change,
  but this doesn't work.  Makes autoselect rather useless.

/ Multiple messages should make the screen scroll.  The buggy behavior is:
  First line doesn't scroll or force us out of visual mode, which is nice.
  Second line should scroll before and after, but is only scrolling after
  which means that it overwrites the first message.  Any later messages
  should scroll after (but not before) and seem to work okay.

/ Moving the cursor while in input mode causes big chunks of new text
  to disappear.

/ The WIN32 port occasionally forgets which colors it should be using.

/ Can't use <d><w> on the last word in a file.

/ Can't paste after the last line of a buffer (i.e., yyGp doesn't work)

/ In the termcap interface, the TI and KS strings shouldn't be written
  until after the "Hit <Enter> to continue" prompt.  The way it does this
  now, it switches back to the edit screen before you have a chance to
  read the program screen (after a !program command)

/ The termcap interface can sometimes forget to turn off standout mode?
  This only seems to happen when no colors have been set.

/ Sometimes "cw" (or any command which places a '$' at the end of text
  to be changed) will insert text instead of overtyping, so the old text
  and the '$' remain even when you hit <Esc>.  This seems to happen when
  the "cw" is the first change made after loading a buffer.  If that's so,
  then perhaps the range's offsets are being changed to track the cursor
  offset, but the buffer pointers are not?

/ After a search command (/ or ?) either dw or cw will dump core.  This was
  reported under Solaris.
  
/ If the "number" option is enabled, then rectangular selections don't
  work right.  The selected area will be 8 characters to the left of the
  cursor because of the inserted line numbers.

/ The "number" option also prevents the cursor from being displayed correctly
  when it is positioned on the first character of the file.  ":set noopt"
  avoid this problem.
  
/ When an external program is run under MS-DOS after colors have been set,
  the colors are apparently reset to black-on-black while the program runs,
  so you can't see its output.

/ The "previousfile" option isn't being set when ":e filename" fails.  It
  should be set to the given filename.

/ Multiple undo levels are confusing.  Modify to resemble VIM's undo/redo.

/ Elvis dumps core if you do a tag lookup (e.g., ":help") from a buffer which
  has no filename.  I think this might be related to the problems with HTML
  mode and the tag stack.

/ Problems have been reported with placing :map commands in the elvis.ini file,
  or even finding the ~/.exrc file.

/ The = operator fails when the last line is included in the affected region.

/ If the current screen is only partially filled, the M and L commands don't
  work as expected.  L should move to the last line of the file, and M should
  move to the middle of the displayed lines (ignoring the ~ lines).

/ Linking problems with the stop() function?  Also, in the termcap interface
  resuming after the ^Z key leaves the terminal in cooked mode; it should be
  in raw mode (reported under SunOS).

/ The buffer names should be identical to the file pathnames, not just their
  basename.  Using just the basename limits which combinations of files you
  can edit.

/ If the "a cut buffer is in learn mode, then @a should terminate it just like
  ]a does.  Otherwise the buffer's contents will be appended to it endlessly.

/ In HTML mode, zz doesn't work.  This also affects scrolling via the scrollbar
  in the X11 port.

/ The storage classes for guix11.c:loadcolor, guix11.c:stop, guitcap.c:stop,
  and guitcap.c:ttyprgopen all cause compiler warnings, or worse.  Also, some
  systems (HP/UX) still need ospeed defined somewhere.

/ An Apollo/DomainOS system failed to compile guix11.c, claiming that 0 and 1
  were being used instead of True and False for some field of the guix11
  struct.  The source code realy does use True and False as it should... but
  perhaps some header file has #define'd those symbols to plain old numbers?
  If so, then it must be an X11 header that is doing this, because the other
  files apparently compile without problems.

/ Apparently SA_NOMASK isn't offical POSIX?  AIX and Ultrix can't handle the
  osunix/tcaposix.h file, because it uses SA_NOMASK and some other dubious
  features.  For the benefit of AIX and Ultrix, the tcaposix.h file should
  fall back on signal() if SA_NOMASK is undefined.

/ The "x11" interface doesn't change the icon name when it changes the window
  title.  It should!  In fact, it should probably change the icon name to be
  the basename of the window title, to conserve space.
  
/ The new feature that changes the cursor's color to indicate whether elvis
  owns the selection DOESN'T QUITE WORK!  It needs to erase the old cursor
  before drawing the new one.

/ The "x11" interface's scrollbar doesn't take the sizeof of the up-arrow
  button into consideration when figuring out which part of the thumb the user
  has started dragging.  Consequently, as soon as the user starts to drag the
  thumb, it immediately jumps downward by the height of the button.

/ ULTRIX is POSIX-compliant, but lacks a <termcap.h> file.

/ "e2 -gtermcap -b 0" generates an error message (and it should!)  but then
  leaves the terminal in raw mode.
  
/ Most ANSI-plus-extensions compilers don't define __STDC__.  To support
  this, nearly every dependence on __STDC__ should be rewritten to check
  the value of a new USE_PROTOTYPES macro (the default value of which
  can still be derived from __STDC__).
 
/ Under MS-DOS, rereading a buffer would cause its buflines value to get
  scrambled.

/ Backslashes are disappearing from filenames under DOS.

/ Can't use a Q or ^G command on an empty buffer.

/ Under DOS, the home environment variable isn't being set to the program's
  directory, as it should be.

/ Under MS-DOS, error bells mess up the cursor position.

/ ":se noeb" doesn't silence all error bells; it only silences some of them.

/ Colors in the termcap interface have become unstable again.

/ Attempts to move up from first line, or down from last line, should fail
  but don't.

/ The command ":0" should go to the top of the file, elvis 2.0 just gives
  an error message

/ ^U doesn't scroll correctly.

/ The .B and .I commands should insert a space between argument words.
  This is different than the two-font commands such as .BI, which don't
  put whitespace between argument words.

/ Can't change "cfont" and other c display mode options in the elvis.ini
  script.  Perhaps those options should be made global?

/ Abbreviations aren't handled at all!

/ The R command can't be repeated via the . command.  It just inserts
  instead of replacing.

/ While running an external program, if that program prompts for input then
  elvis waits.  The changes are in the queue to be shown, but don't show until
  the next keystroke is read, and the next keystroke won't be read until the
  program exits.  Nasty.  We need to make stdin be closed or something.  This
  only affects the "x11" interface, because the other ones all run in a
  terminal anyway.

/ Add XK_Mode_switch to the list of modifier keys in guix11.c.  Also, need
  to do something about the Meta/Alt keys soon!

/ :!! fails if no previous ! command was given.

/ !G fails

/ !<move><enter> should do nothing, but elvis dumps core.

/ Word-wrap needs to be implemented.

/ When a file is written out, any special file permission flags are lost.
  The "elvis.bwf" script should use `cp' instead of `mv'

/ There is no :close command.  There should be!  It is like :quit except that
  it is willing to close a window which is showing a modified buffer (unless
  that window is the only window, and the session is temporary).

/ With lplines=0, the VTAB character *always* causes a linefeed; we want it
  to *never* cause a line feed in that situation, because setting lplines=0 
  is supposed to mean pages are infinitely long.
  
/ The :s command misbehaves on the last line of the buffer.

/ The ]] command doesn't skip past troff section commands as it should.

/ :undo doesn't work correctly unless you explicitly state the desired level.

/ Various other memory management problems, report by Purify.

/ Name conflict in MSVC 2.2: Need to change CURSORSHAPE to ELVCURSOR

/ Searching backwards for the end of a line ("?$") doesn't work.
  Interestingly, this doesn't work in elvis 1.8 either.

/ In HTML mode, it is sometimes impossible to move upward through a <pre>
  tag, using just a (k) keystroke.  (2)(k) seems to work though.
