vi eats control-Ds in sourced files
Chris Torek
chris at mimsy.UUCP
Sun Mar 27 14:44:58 AEST 1988
Index: ucb/ex/ex_get.c 4.3BSD Fix
Description:
When vi (ex) reads .exrc files or other sourced files, it
discards control-D. This makes it difficult to map something
to a string that includes a control-D, or to remap ^D itself.
Repeat-By:
Create a .exrc file with the line
map! ^D foo
(that is, map control-D anything). Run vi; note `missing rhs'
error.
Fix:
This seems to be what is required. In any case it accounts
for the fact that newline-to-control-D mapping is done only
when `intty' is set.
RCS file: RCS/ex_get.c,v
retrieving revision 1.1
diff -c2 -r1.1 ex_get.c
*** /tmp/,RCSt1003257 Sat Mar 26 22:51:12 1988
--- ex_get.c Sat Mar 26 22:50:55 1988
***************
*** 31,35 ****
do
c = getcd();
! while (!globp && c == CTRL(d));
return (c);
}
--- 31,35 ----
do
c = getcd();
! while (!globp && intty && c == CTRL(d));
return (c);
}
***************
*** 45,49 ****
c &= TRIM;
if (!inopen)
! if (!globp && c == CTRL(d))
setlastchar('\n');
else if (junk(c)) {
--- 45,49 ----
c &= TRIM;
if (!inopen)
! if (!globp && intty && c == CTRL(d))
setlastchar('\n');
else if (junk(c)) {
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list