Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Atto is based on the public domain code of Anthony Howe's editor (commonly known
C-W Kill Region (Cut)
C-X CTRL-X command prefix
C-Y Yank (Paste)
C-Y Suspend the Atto process (Run 'fg' at the shell to resume it)

M-< Start of file
M-> End of file
Expand Down
2 changes: 2 additions & 0 deletions command.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,3 +354,5 @@ void showpos()
curbp->b_point, ((curbp->b_ebuf - curbp->b_buf) - (curbp->b_egap - curbp->b_gap)));
}
}

void suspend() { raise(SIGTSTP); }
2 changes: 2 additions & 0 deletions header.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <string.h>
#include <unistd.h>
#include <wchar.h>
#include <signal.h>
int mkstemp(char *);

#define VERSION "Atto 1.22, Public Domain, Dec 2020, by Hugh Barney, No warranty."
Expand Down Expand Up @@ -155,6 +156,7 @@ extern void left(void);
extern void lnbegin(void);
extern void lnend(void);
extern void paste(void);
extern void suspend(void);
extern void pgdown(void);
extern void pgup(void);
extern void quit(void);
Expand Down
1 change: 1 addition & 0 deletions key.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ keymap_t keymap[] = {
{"C-v forward-page ", "\x16", pgdown },
{"C-w kill-region ", "\x17", cut},
{"C-y yank ", "\x19", paste},
{"C-z suspend ", "\x1A", suspend},
{"C-space set-mark ", "\x00", iblock }, /* ctrl-space */
{"C-x 1 delete-other-window", "\x18\x31", delete_other_windows },
{"C-x 2 split-window ", "\x18\x32", split_window },
Expand Down