1 CL: In single-line screens, have to press 'q' twice when quitting out
2 of a ":set all" display.
4 COMMON: There's a serious problem with error returns -- we need to separate
5 command failure from fatal error, consistently, over the entire source
8 We need to rework all of vi to have three return values:
14 Right now we don't recognize fatal errors for what they are.
16 VI: Change the screen scrolling to not eat user characters... i.e.
17 g/pattern/foo should not eat already entered chars.
19 COMMON: It's known that it's possible to sync the backing files in the
20 wrong manner, leaving backup files that aren't recoverable. This
21 is going to be left alone until we have a logging version of DB,
22 which will hopefully fix this (or at least make it possible to
25 COMMON: The complete list of POSIX.1 calls that can return EINTR are:
27 wait, waitpid, sleep, dup2, close, read, write,
28 fcntl(SETLCKW) tcsetattr, tcdrain
30 The problem is that technically, any system/library call can
31 return EINTR, so, while nvi blocks (most of?) the obvious ones,
32 someone may have to do a complete pass and block signals
35 COMMON: The vi main command loop should use the general-purpose overflow
36 and underflow routines. In addition, the vi command loop uses
37 unsigned longs -- should probably be fixed as a 32-bit unsigned
38 type, and then check to make sure it's never used as as variable
41 DB: When nvi edits files that don't have trailing newlines, it appends
42 one, regardless. This is required, by default, from POSIX.2.
44 COMMON: Open mode is not yet implemented.
46 COMMON: ^C isn't passed to the shell in the script windows as an interrupt
51 hardtabs, lisp, optimize, redraw, slowopen
53 are recognized, but not implemented. These options are unlikely
54 to be implemented, so if you want them you might want to say
55 something! I will implement lisp if anyone ever documents how it
58 COMMON: If you run out of space in the recovery directory, the recovery
59 file is left in place.
61 COMMON: Should "view" set a lock on the file?
63 COMMON: Field editing shouldn't be hard to add to nvi:
65 Field editing file template:
68 field # row/column start row/column stop
69 label field # Label string
70 re field # Matching re string.
71 field # row/column start row/column stop
72 label field # Label string
73 re field # Matching re string.
75 <tab> moves to the next field
76 <bs> in column 0 moves to the previous field
78 COMMON: Let's rethink using an IPC mechanism:
80 Two way channel, with events passing in both directions.
82 Load into the same address space (else, how do file permissions) forks
83 in v_init -- screens get events from vi, vi gets events queued up from
87 E_CHARACTER, /* Input character: e_c set. */
88 E_EOF, /* End of input (NOT ^D). */
89 E_ERR, /* Input error. */
90 E_INTERRUPT, /* Interrupt. */
91 E_REPAINT, /* Repaint: e_flno, e_tlno set. */
92 E_RESIZE, /* SIGWINCH: e_lno, e_cno set. */
93 E_SIGCONT, /* SIGCONT arrived. */
94 E_SIGFATAL, /* fatal signal arrived.
95 E_START, /* Start ex/vi. */
96 E_STOP, /* Stop ex/vi. */
97 E_STRING, /* Input string: e_csp, e_len set. */
100 E_ADDSTR /* Add a string to the screen. */
101 E_ATTRIBUTE /* Screen attribute. */
102 E_BELL /* Beep/bell/flash the terminal. */
103 E_BUSY /* Display a busy message. */
104 E_CANONICAL /* Enter tty canonical mode. */
105 E_CLRTOEOL /* Clear to the end of the line. */
106 E_CURSOR /* Return the cursor location. */
107 E_DELETELN /* Delete a line. */
108 E_DISCARD /* Discard a screen. */
109 E_EXADJUST /* Ex: screen adjustment routine. */
110 E_FMAP /* Set a function key. */
111 E_GETKEY /* Get a key event. */
112 E_INSERTLN /* Insert a line. */
113 E_MOVE /* Move the cursor. */
114 E_MESSAGE /* Message or ex output. */
115 E_REFRESH /* Refresh the screen. */
116 E_RESIZE /* Resize two screens. */
117 E_SPLIT /* Split the screen. */
118 E_SUSPEND /* Suspend the editor. */
120 EX: It would be nice to inverse video the replaced text during
121 interactive substitute.
123 EX: The :args command should put the current file name out in reverse
124 video. This isn't going to be easy, currently only full lines can
125 be in reverse video, not just parts.
127 TK: We currently permit the user to change the lines, columns and term
128 edit options. Shouldn't that be illegal in tknvi?
130 VI: The strings found by searches should be highlighted until the next
131 character is entered.
133 VI: Display a split vi screen for the :help command.
135 VI: When getting a key for a continue screen, we should always read from
136 the terminal, not from a mapped key.
138 VI: The sentence, paragraph and section movement commands don't match
139 historic practice in some boundary cases. This should be left
140 alone until POSIX 1003.2 makes up its mind.
142 VI: The vs_sm_fill routine should scroll if possible, not always redraw.
144 VI: Think about setting a dirty/inuse bits on the lines of the SMAP
145 structure. That way the message routines could steal lines and
146 refresh would continue to work, because it would know not to touch
147 the lines that were in use.