summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-05-11 12:11:44 -0400
committerpommicket <pommicket@gmail.com>2023-05-11 12:11:54 -0400
commit8f23762128bebda1e8e07058f905363954ac9c61 (patch)
treed1e78fa4020de61b34cf4600bebcf40dc0cc7322 /command.c
parentba8d08d0eef98e1950f8c96c12fe8de3f0f059ae (diff)
:matching-bracket, fix matching bracket highlighting in some cases
Diffstat (limited to 'command.c')
-rw-r--r--command.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/command.c b/command.c
index 5b3411b..fd75189 100644
--- a/command.c
+++ b/command.c
@@ -37,6 +37,7 @@ static CommandName command_names[] = {
{"select-all", CMD_SELECT_ALL},
{"select-up-blank-line", CMD_SELECT_UP_BLANK_LINE},
{"select-down-blank-line", CMD_SELECT_DOWN_BLANK_LINE},
+ {"matching-bracket", CMD_MATCHING_BRACKET},
{"clear-selection", CMD_CLEAR_SELECTION},
{"page-up", CMD_PAGE_UP},
{"page-down", CMD_PAGE_DOWN},
@@ -292,7 +293,10 @@ void command_execute_ex(Ted *ted, Command c, CommandArgument full_argument, Comm
if (buffer)
buffer_cursor_move_to_prev_pos(buffer);
break;
-
+ case CMD_MATCHING_BRACKET:
+ if (buffer)
+ buffer_cursor_move_to_matching_bracket(buffer);
+ break;
case CMD_INSERT_TEXT: {
const char *str = argument_str;
if (str && buffer) {