summaryrefslogtreecommitdiff
path: root/src/calcurse.h
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-07-07 00:53:09 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-07-07 21:27:01 +0200
commit69345edd77b3ff98a99b36de8063f9e5febad3eb (patch)
treebd2d3fc7d4db2a597d209a37f1d1500a5efbe45c /src/calcurse.h
parentdd059ca8129a97dfde79101bdcf5d3f7bcec0a90 (diff)
downloadcalcurse-69345edd77b3ff98a99b36de8063f9e5febad3eb.zip
Add support for copy/paste registers
This adds support for vim-style copy/paste registers which allows cutting and copying multiple items without having to overwrite the copy/paste buffer. Registers can be specified using the quote key ('"'). To access a register, type '"x' before a command where "x" is the name of a register. If you want to copy the currently selected item into register 1, type '"1c'. Valid registers are 0-9, a-z, "-" and "_". Note that the latter is the so-called black hole register, which works similar to the black hole register in vim. The register prefix key is currently hardcoded and cannot be configured. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/calcurse.h')
-rw-r--r--src/calcurse.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/calcurse.h b/src/calcurse.h
index 8674321..c9b0307 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -160,6 +160,9 @@
#define KEYS_LABELEN 8 /* length of command description */
#define KEYS_CMDS_PER_LINE 6 /* max number of commands per line */
+/* Register definitions. */
+#define REG_BLACK_HOLE 37
+
/* Size of the hash table the note garbage collector uses. */
#define NOTE_GC_HSIZE 1024
@@ -722,10 +725,10 @@ void interact_day_item_delete(unsigned *, unsigned *);
void interact_day_item_edit(void);
void interact_day_item_pipe(void);
void interact_day_item_repeat(void);
-void interact_day_item_cut_free();
-void interact_day_item_cut(unsigned *, unsigned *);
-void interact_day_item_copy(unsigned *, unsigned *);
-void interact_day_item_paste(unsigned *, unsigned *);
+void interact_day_item_cut_free(unsigned);
+void interact_day_item_cut(unsigned *, unsigned *, unsigned);
+void interact_day_item_copy(unsigned *, unsigned *, unsigned);
+void interact_day_item_paste(unsigned *, unsigned *, unsigned);
void interact_todo_add(void);
void interact_todo_delete(void);
void interact_todo_edit(void);
@@ -768,7 +771,7 @@ void keys_free(void);
void keys_dump_defaults(char *);
const char *keys_get_label(enum key);
enum key keys_get_action(int);
-enum key keys_getch(WINDOW * win, int *);
+enum key keys_getch(WINDOW * win, int *, int *);
int keys_assign_binding(int, enum key);
void keys_remove_binding(int, enum key);
int keys_str2int(const char *);