From f0d5e1c210682f5a4ba36b5d49051558859ef81d Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 30 Jan 2014 14:04:08 +1000 Subject: Move the "shortest unique string" comments to where they will do the most good. --- boxes.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/boxes.c b/boxes.c index 0c9efc4..7329469 100644 --- a/boxes.c +++ b/boxes.c @@ -1091,6 +1091,9 @@ void doCommand(view *view, char *command) struct function *functions = view->content->context->commands; int i; +// TODO - Some editors have a shortcut command concept. The smallest unique first part of each command will match, as well as anything longer. +// A further complication is if we are not implementing some commands that might change what is "shortest unique prefix". + for (i = 0; functions[i].name; i++) { if (strcmp(functions[i].name, command) == 0) @@ -1855,12 +1858,8 @@ struct CSI CSI_terminators[] = // Basically this is the main loop. -/* Unhandled complications - -Less and more have the "ZZ" command, but nothing else seems to have multi ordinary character commands. - -Some editors have a shortcut command concept. The smallest unique first part of each command will match, as well as anything longer. - A further complication is if we are not implementing some commands that might change what is "shortest unique prefix". -*/ +// TODO - Unhandled complications - +// Less and more have the "ZZ" command, but nothing else seems to have multi ordinary character commands. void handle_keys(long extra, void (*lineChar)(long extra, char *buffer), struct keyCommand * (*lineCommand)(long extra, char *sequence)) { @@ -2656,7 +2655,6 @@ void viStartOfNextLine(view *view) downLine(view); } -// TODO - ex uses "shortest unique string" to match commands, should implement that, and do it for the other contexts to. struct function simpleViCommands[] = { // These are actual ex commands. -- cgit v1.1