summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-01-29 21:53:37 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-01-29 21:53:37 -0500
commit3cc173dd38e85c751bb1a9f9288ebe974e567ba4 (patch)
treefa822005135b515307c223e3154c9b03f61203d7 /command.c
parent90ffcaad047caa55e65a6bf858a7b976e062007a (diff)
ctrl+pageup/down to switch between tabs
Diffstat (limited to 'command.c')
-rw-r--r--command.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/command.c b/command.c
index 1c5f28b..5c7cfe0 100644
--- a/command.c
+++ b/command.c
@@ -145,7 +145,7 @@ void command_execute(Ted *ted, Command c, i64 argument) {
break;
case CMD_SAVE:
if (buffer) {
- if (buffer->filename && streq(buffer->filename, "Untitled")) {
+ if (buffer->filename && streq(buffer->filename, TED_UNTITLED)) {
// don't worry, this won't catch files called "Untitled"; buffer->filename is the full path.
goto save_as;
}
@@ -171,9 +171,6 @@ void command_execute(Ted *ted, Command c, i64 argument) {
if (buffer) buffer_cut(buffer);
break;
case CMD_PASTE:
- // @TEST @TODO: delete me
- ted_seterr(ted, "Very long test error the quick brown fox jumps over the lazy dog. ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz. Thank you very much. It was the best of times. It was the worst of times. It was the age of reason. It was the age of foolishness.");
-
if (buffer) buffer_paste(buffer);
break;
@@ -191,6 +188,13 @@ void command_execute(Ted *ted, Command c, i64 argument) {
ted_load_fonts(ted);
}
} break;
+
+ case CMD_TAB_NEXT:
+ node_tab_next(ted, ted->active_node, argument);
+ break;
+ case CMD_TAB_PREV:
+ node_tab_prev(ted, ted->active_node, argument);
+ break;
case CMD_ESCAPE:
if (*ted->error_shown) {