mirror of https://github.com/tildeclub/ex-vi.git
* Fixed an old vi bug: If a vi command that yanked or deleted part of a line
was followed by an ex command that also yanked or deleted some text, a following 'p' vi command pasted the text affected by the former vi command. It now pastes the text of the last yank or delete even if that was an ex command.
This commit is contained in:
parent
34bb648726
commit
6b5d023516
5
Changes
5
Changes
|
@ -4,6 +4,11 @@ Release ...
|
||||||
other than xterm.
|
other than xterm.
|
||||||
* Handle character case conversions with the '~' vi command correctly if the
|
* Handle character case conversions with the '~' vi command correctly if the
|
||||||
length of the converted multibyte sequence is smaller than the original one.
|
length of the converted multibyte sequence is smaller than the original one.
|
||||||
|
* Fixed an old vi bug: If a vi command that yanked or deleted part of a line
|
||||||
|
was followed by an ex command that also yanked or deleted some text, a
|
||||||
|
following 'p' vi command pasted the text affected by the former vi command.
|
||||||
|
It now pastes the text of the last yank or delete even if that was an ex
|
||||||
|
command.
|
||||||
|
|
||||||
Release 12/2/04
|
Release 12/2/04
|
||||||
* Support for multibyte character locales was added.
|
* Support for multibyte character locales was added.
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#ifdef DOSCCS
|
#ifdef DOSCCS
|
||||||
static char sccsid[] = "@(#)ex_cmds.c 1.17 (gritter) 11/27/04";
|
static char sccsid[] = "@(#)ex_cmds.c 1.18 (gritter) 1/2/05";
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -330,6 +330,7 @@ changdir:
|
||||||
YANKreg(c);
|
YANKreg(c);
|
||||||
delete(0);
|
delete(0);
|
||||||
appendnone();
|
appendnone();
|
||||||
|
vkillDEL();
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* edit */
|
/* edit */
|
||||||
|
@ -817,6 +818,7 @@ wq:
|
||||||
YANKreg(c);
|
YANKreg(c);
|
||||||
else
|
else
|
||||||
yank(0);
|
yank(0);
|
||||||
|
vkillDEL();
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* z */
|
/* z */
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
* @(#)ex_proto.h 1.24 (gritter) 12/1/04
|
* @(#)ex_proto.h 1.25 (gritter) 1/2/05
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -475,6 +475,7 @@ extern void vshift(int);
|
||||||
extern void vrep(register int);
|
extern void vrep(register int);
|
||||||
extern void vyankit(int);
|
extern void vyankit(int);
|
||||||
extern void setpk(void);
|
extern void setpk(void);
|
||||||
|
extern void vkillDEL(void);
|
||||||
/* ex_vops2.c */
|
/* ex_vops2.c */
|
||||||
extern void bleep(register int, char *);
|
extern void bleep(register int, char *);
|
||||||
extern int vdcMID(void);
|
extern int vdcMID(void);
|
||||||
|
|
11
ex_re.c
11
ex_re.c
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#ifdef DOSCCS
|
#ifdef DOSCCS
|
||||||
static char sccsid[] = "@(#)ex_re.c 1.42 (gritter) 12/1/04";
|
static char sccsid[] = "@(#)ex_re.c 1.43 (gritter) 1/2/05";
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -517,15 +517,8 @@ confirmed(line *a)
|
||||||
return (1);
|
return (1);
|
||||||
pofix();
|
pofix();
|
||||||
pline(lineno(a));
|
pline(lineno(a));
|
||||||
if (inopen) {
|
if (inopen)
|
||||||
#ifndef BIT8
|
|
||||||
putchar('\n' | QUOTE);
|
putchar('\n' | QUOTE);
|
||||||
#else
|
|
||||||
if (Putchar == listchar)
|
|
||||||
putchar('$');
|
|
||||||
putchar('\n');
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
c = column(loc1 - 1);
|
c = column(loc1 - 1);
|
||||||
ugo(c - 1 + (inopen ? 1 : 0), ' ');
|
ugo(c - 1 + (inopen ? 1 : 0), ' ');
|
||||||
ugo(column(loc2 - 1) - c, '^');
|
ugo(column(loc2 - 1) - c, '^');
|
||||||
|
|
12
ex_vops.c
12
ex_vops.c
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#ifdef DOSCCS
|
#ifdef DOSCCS
|
||||||
static char sccsid[] = "@(#)ex_vops.c 1.21 (gritter) 11/29/04";
|
static char sccsid[] = "@(#)ex_vops.c 1.22 (gritter) 1/2/05";
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1051,3 +1051,13 @@ setpk(void)
|
||||||
pkill[1] = wcursor;
|
pkill[1] = wcursor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Kill the last deleted part of a line so that "p" does not put it back.
|
||||||
|
* This is to be called from ex commands that delete some text.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
vkillDEL(void)
|
||||||
|
{
|
||||||
|
DEL[0] = 0;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue