diff options
author | David Walter Seikel | 2014-01-30 14:04:08 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-01-30 14:04:08 +1000 |
commit | f0d5e1c210682f5a4ba36b5d49051558859ef81d (patch) | |
tree | 2b91a685111ca2d220d03e7f79a0bb8f135fb1f6 | |
parent | Rename a bunch of stuff. (diff) | |
download | boxes-f0d5e1c210682f5a4ba36b5d49051558859ef81d.zip boxes-f0d5e1c210682f5a4ba36b5d49051558859ef81d.tar.gz boxes-f0d5e1c210682f5a4ba36b5d49051558859ef81d.tar.bz2 boxes-f0d5e1c210682f5a4ba36b5d49051558859ef81d.tar.xz |
Move the "shortest unique string" comments to where they will do the most good.
-rw-r--r-- | boxes.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -1091,6 +1091,9 @@ void doCommand(view *view, char *command) | |||
1091 | struct function *functions = view->content->context->commands; | 1091 | struct function *functions = view->content->context->commands; |
1092 | int i; | 1092 | int i; |
1093 | 1093 | ||
1094 | // TODO - Some editors have a shortcut command concept. The smallest unique first part of each command will match, as well as anything longer. | ||
1095 | // A further complication is if we are not implementing some commands that might change what is "shortest unique prefix". | ||
1096 | |||
1094 | for (i = 0; functions[i].name; i++) | 1097 | for (i = 0; functions[i].name; i++) |
1095 | { | 1098 | { |
1096 | if (strcmp(functions[i].name, command) == 0) | 1099 | if (strcmp(functions[i].name, command) == 0) |
@@ -1855,12 +1858,8 @@ struct CSI CSI_terminators[] = | |||
1855 | 1858 | ||
1856 | // Basically this is the main loop. | 1859 | // Basically this is the main loop. |
1857 | 1860 | ||
1858 | /* Unhandled complications - | 1861 | // TODO - Unhandled complications - |
1859 | Less and more have the "ZZ" command, but nothing else seems to have multi ordinary character commands. | 1862 | // Less and more have the "ZZ" command, but nothing else seems to have multi ordinary character commands. |
1860 | |||
1861 | Some editors have a shortcut command concept. The smallest unique first part of each command will match, as well as anything longer. | ||
1862 | A further complication is if we are not implementing some commands that might change what is "shortest unique prefix". | ||
1863 | */ | ||
1864 | 1863 | ||
1865 | void handle_keys(long extra, void (*lineChar)(long extra, char *buffer), struct keyCommand * (*lineCommand)(long extra, char *sequence)) | 1864 | void handle_keys(long extra, void (*lineChar)(long extra, char *buffer), struct keyCommand * (*lineCommand)(long extra, char *sequence)) |
1866 | { | 1865 | { |
@@ -2656,7 +2655,6 @@ void viStartOfNextLine(view *view) | |||
2656 | downLine(view); | 2655 | downLine(view); |
2657 | } | 2656 | } |
2658 | 2657 | ||
2659 | // TODO - ex uses "shortest unique string" to match commands, should implement that, and do it for the other contexts to. | ||
2660 | struct function simpleViCommands[] = | 2658 | struct function simpleViCommands[] = |
2661 | { | 2659 | { |
2662 | // These are actual ex commands. | 2660 | // These are actual ex commands. |