History log of /openbsd-current/usr.bin/mg/yank.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.16 08-Mar-2023 guenther

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.15 01-Mar-2021 lum

Put the hardcoded '\n' character which is found throughout mg into a
buffer specific variable. The diff should not produce any behavourial
changes in mg.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.14 11-Dec-2015 mmcc

Remove NULL-checks before free().


Revision tags: OPENBSD_5_8_BASE
# 1.13 19-Mar-2015 bcallah

Clean up the includes in mg.
This does the following:
Moves all POSIX headers from sysdef.h into the individual .c files so that
each file now only includes what it needs. All headers are properly sorted.
Moves the remainder of sysdef.h to other files (mostly def.h) and deletes
sysdef.h now that it's no longer contains anything.
Tweak a comment that references sysdef.h so that it no longer does that.
ok florian@


# 1.12 16-Mar-2015 bcallah

Change the internal name of the newline function to deconflict with a
function of the same name in term.h. This is the first step towards
cleaning up mg's includes. No user-visible changes.
ok florian@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE
# 1.11 20-Mar-2014 lum

Add some missing dobeeps.
ok florian@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.10 15-Jul-2011 deraadt

When killing lines using ^U <n> ^K, count the characters exactly (for
both forwards and backwards cases, though the forward case is better
tested. This is required because the actual character deleter
function (ldelete) requires an exact count. If it runs short, it will
not put the deletion into the kill buffer. This is complicated by how
mg internals consider newline's as counted characters even though they
do not occur in the buffers... and then there is the no newline at EOF
fiasco....


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.9 05-Jun-2009 kjell

emacs handles the undo of a region kill (C-w) differently than a line kill
(C-k) with respect to cursor position. The former leaves the cursor at the end,
the latter at the beginning of the region.

emacs is wacky.

Make mg undo do the same. ok deraadt


# 1.8 04-Jun-2009 kjell

Rename w_flag to w_rflag. This is not a general purpose
flag: it is for redisplay options only. I need an additional all-purpose
flag, so renaming removes the desire to wrongly overload the existing one.

Turdshine. No functional chage.


Revision tags: OPENBSD_4_5_BASE
# 1.7 15-Sep-2008 kjell

Expose the undo commands as proper mg functions.
This should have no functional change on undo, but it does facilitate
testing undo behavior.


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.6 19-Nov-2006 deraadt

spacing


# 1.5 17-Nov-2006 kjell

Fix a needless inversion of flag names; i.e. change them from the
negative to the positive. undo_boundary_enable(TRUE) makes a LOT more
sense than undo_no_boundary(FALSE).
While here, whack a global, and fix a bug noted by otto:
undoing a file insertion sometimes left stray characters around.
ok beck@, otto@


Revision tags: OPENBSD_4_0_BASE
# 1.4 25-Jul-2006 kjell

Rename the header line of a buffer to b_headp, from the remarkably
unintuitive b_linep. No binary change.


# 1.3 28-May-2006 kjell

Make Window Flags more mnemonic (and less dumb); i.e.
WFHARD -> WFFULL (Redraw full window)
WFFORCE -> WFFRAME (Reframe window).
No binary change


Revision tags: OPENBSD_3_9_BASE
# 1.2 20-Dec-2005 kjell

Clean up the ugly casted frees. In one case, this meant eliminating a nasty
struct/union/casting nightmare when building the list of names for filename
completion. In particular, be consistent about strduping and freeing
the list data.


# 1.1 22-Nov-2005 kjell

Move kill-related commands to their own file.
This will help move to a kill-ring.


# 1.15 01-Mar-2021 lum

Put the hardcoded '\n' character which is found throughout mg into a
buffer specific variable. The diff should not produce any behavourial
changes in mg.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.14 11-Dec-2015 mmcc

Remove NULL-checks before free().


Revision tags: OPENBSD_5_8_BASE
# 1.13 19-Mar-2015 bcallah

Clean up the includes in mg.
This does the following:
Moves all POSIX headers from sysdef.h into the individual .c files so that
each file now only includes what it needs. All headers are properly sorted.
Moves the remainder of sysdef.h to other files (mostly def.h) and deletes
sysdef.h now that it's no longer contains anything.
Tweak a comment that references sysdef.h so that it no longer does that.
ok florian@


# 1.12 16-Mar-2015 bcallah

Change the internal name of the newline function to deconflict with a
function of the same name in term.h. This is the first step towards
cleaning up mg's includes. No user-visible changes.
ok florian@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE
# 1.11 20-Mar-2014 lum

Add some missing dobeeps.
ok florian@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.10 15-Jul-2011 deraadt

When killing lines using ^U <n> ^K, count the characters exactly (for
both forwards and backwards cases, though the forward case is better
tested. This is required because the actual character deleter
function (ldelete) requires an exact count. If it runs short, it will
not put the deletion into the kill buffer. This is complicated by how
mg internals consider newline's as counted characters even though they
do not occur in the buffers... and then there is the no newline at EOF
fiasco....


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.9 05-Jun-2009 kjell

emacs handles the undo of a region kill (C-w) differently than a line kill
(C-k) with respect to cursor position. The former leaves the cursor at the end,
the latter at the beginning of the region.

emacs is wacky.

Make mg undo do the same. ok deraadt


# 1.8 04-Jun-2009 kjell

Rename w_flag to w_rflag. This is not a general purpose
flag: it is for redisplay options only. I need an additional all-purpose
flag, so renaming removes the desire to wrongly overload the existing one.

Turdshine. No functional chage.


Revision tags: OPENBSD_4_5_BASE
# 1.7 15-Sep-2008 kjell

Expose the undo commands as proper mg functions.
This should have no functional change on undo, but it does facilitate
testing undo behavior.


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.6 19-Nov-2006 deraadt

spacing


# 1.5 17-Nov-2006 kjell

Fix a needless inversion of flag names; i.e. change them from the
negative to the positive. undo_boundary_enable(TRUE) makes a LOT more
sense than undo_no_boundary(FALSE).
While here, whack a global, and fix a bug noted by otto:
undoing a file insertion sometimes left stray characters around.
ok beck@, otto@


Revision tags: OPENBSD_4_0_BASE
# 1.4 25-Jul-2006 kjell

Rename the header line of a buffer to b_headp, from the remarkably
unintuitive b_linep. No binary change.


# 1.3 28-May-2006 kjell

Make Window Flags more mnemonic (and less dumb); i.e.
WFHARD -> WFFULL (Redraw full window)
WFFORCE -> WFFRAME (Reframe window).
No binary change


Revision tags: OPENBSD_3_9_BASE
# 1.2 20-Dec-2005 kjell

Clean up the ugly casted frees. In one case, this meant eliminating a nasty
struct/union/casting nightmare when building the list of names for filename
completion. In particular, be consistent about strduping and freeing
the list data.


# 1.1 22-Nov-2005 kjell

Move kill-related commands to their own file.
This will help move to a kill-ring.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.14 11-Dec-2015 mmcc

Remove NULL-checks before free().


Revision tags: OPENBSD_5_8_BASE
# 1.13 19-Mar-2015 bcallah

Clean up the includes in mg.
This does the following:
Moves all POSIX headers from sysdef.h into the individual .c files so that
each file now only includes what it needs. All headers are properly sorted.
Moves the remainder of sysdef.h to other files (mostly def.h) and deletes
sysdef.h now that it's no longer contains anything.
Tweak a comment that references sysdef.h so that it no longer does that.
ok florian@


# 1.12 16-Mar-2015 bcallah

Change the internal name of the newline function to deconflict with a
function of the same name in term.h. This is the first step towards
cleaning up mg's includes. No user-visible changes.
ok florian@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE
# 1.11 20-Mar-2014 lum

Add some missing dobeeps.
ok florian@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.10 15-Jul-2011 deraadt

When killing lines using ^U <n> ^K, count the characters exactly (for
both forwards and backwards cases, though the forward case is better
tested. This is required because the actual character deleter
function (ldelete) requires an exact count. If it runs short, it will
not put the deletion into the kill buffer. This is complicated by how
mg internals consider newline's as counted characters even though they
do not occur in the buffers... and then there is the no newline at EOF
fiasco....


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.9 05-Jun-2009 kjell

emacs handles the undo of a region kill (C-w) differently than a line kill
(C-k) with respect to cursor position. The former leaves the cursor at the end,
the latter at the beginning of the region.

emacs is wacky.

Make mg undo do the same. ok deraadt


# 1.8 04-Jun-2009 kjell

Rename w_flag to w_rflag. This is not a general purpose
flag: it is for redisplay options only. I need an additional all-purpose
flag, so renaming removes the desire to wrongly overload the existing one.

Turdshine. No functional chage.


Revision tags: OPENBSD_4_5_BASE
# 1.7 15-Sep-2008 kjell

Expose the undo commands as proper mg functions.
This should have no functional change on undo, but it does facilitate
testing undo behavior.


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.6 19-Nov-2006 deraadt

spacing


# 1.5 17-Nov-2006 kjell

Fix a needless inversion of flag names; i.e. change them from the
negative to the positive. undo_boundary_enable(TRUE) makes a LOT more
sense than undo_no_boundary(FALSE).
While here, whack a global, and fix a bug noted by otto:
undoing a file insertion sometimes left stray characters around.
ok beck@, otto@


Revision tags: OPENBSD_4_0_BASE
# 1.4 25-Jul-2006 kjell

Rename the header line of a buffer to b_headp, from the remarkably
unintuitive b_linep. No binary change.


# 1.3 28-May-2006 kjell

Make Window Flags more mnemonic (and less dumb); i.e.
WFHARD -> WFFULL (Redraw full window)
WFFORCE -> WFFRAME (Reframe window).
No binary change


Revision tags: OPENBSD_3_9_BASE
# 1.2 20-Dec-2005 kjell

Clean up the ugly casted frees. In one case, this meant eliminating a nasty
struct/union/casting nightmare when building the list of names for filename
completion. In particular, be consistent about strduping and freeing
the list data.


# 1.1 22-Nov-2005 kjell

Move kill-related commands to their own file.
This will help move to a kill-ring.