-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v1.1] emacs: accept numeric parameter for ^Y
As of this commit, the ^Y (yank, a.k.a. paste) command accepts a numeric parameter that will be taken as a repeat count. This can be quite handy if you want to repeat text. Delete what you want to repeat, then do ESC 10 ^Y to re-insert the deleted text 10 times. src/cmd/ksh93/edit/emacs.c: ed_emacsread(): case cntl('Y'): - Remove extra indentation due to unnecessary braces. - Handle the numeric parameter 'count', already provided: - Multiply the length of the kill stack by count to check bounds and to shift the text under and to the right of the cursor. - Reinsert the contents of the kill stack count times.
- Loading branch information
Showing
5 changed files
with
23 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters