Make paste() a little bit smarter
This commit is contained in:
parent
de7e32b9e8
commit
bdfb0e2221
10
src/kuroko.c
10
src/kuroko.c
@ -46,13 +46,9 @@ KRK_Function(exit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
KRK_Function(paste) {
|
KRK_Function(paste) {
|
||||||
FUNCTION_TAKES_AT_MOST(1);
|
int enabled = !pasteEnabled;
|
||||||
if (argc) {
|
if (!krk_parseArgs("|p",(const char*[]){"enabled"},&enabled)) return NONE_VAL();
|
||||||
CHECK_ARG(0,bool,int,enabled);
|
pasteEnabled = enabled;
|
||||||
pasteEnabled = enabled;
|
|
||||||
} else {
|
|
||||||
pasteEnabled = !pasteEnabled;
|
|
||||||
}
|
|
||||||
fprintf(stderr, "Pasting is %s.\n", pasteEnabled ? "enabled" : "disabled");
|
fprintf(stderr, "Pasting is %s.\n", pasteEnabled ? "enabled" : "disabled");
|
||||||
return NONE_VAL();
|
return NONE_VAL();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user