summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'command.c')
-rw-r--r--command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/command.c b/command.c
index 8db46f9..0153c64 100644
--- a/command.c
+++ b/command.c
@@ -245,6 +245,10 @@ void command_execute(Ted *ted, Command c, i64 argument) {
}
} break;
+ case CMD_VIEW_ONLY:
+ if (buffer) buffer->view_only = !buffer->view_only;
+ break;
+
case CMD_TAB_CLOSE: {
if (ted->menu) {
menu_close(ted);