Remove KEYCMD and KEYCMDN commands
authorDuClare <akarinotengoku@gmail.com>
Thu, 28 May 2009 13:05:28 +0000 (16:05 +0300)
committerDuClare <akarinotengoku@gmail.com>
Thu, 28 May 2009 13:05:28 +0000 (16:05 +0300)
uzbl.c
uzbl.h

diff --git a/uzbl.c b/uzbl.c
index 70b3ed7..371b40f 100644 (file)
--- a/uzbl.c
+++ b/uzbl.c
@@ -1198,8 +1198,6 @@ setup_regex() {
             G_REGEX_UNGREEDY|G_REGEX_OPTIMIZE, 0, NULL);
     uzbl.comm.act_regex = g_regex_new("^[Aa][a-zA-Z]*\\s+([^ \\n]+)\\s*([^\\n]*)?$",
             G_REGEX_OPTIMIZE, 0, NULL);
-    uzbl.comm.keycmd_regex = g_regex_new("^[Kk][a-zA-Z]*\\s+([^\\n]+)$",
-            G_REGEX_OPTIMIZE, 0, NULL);
 }
 
 static gboolean
@@ -1558,19 +1556,6 @@ parse_cmd_line(const char *ctl_line) {
             else
                 printf("Error in command: %s\n", tokens[0]);
         }
-        /* KEYCMD command */
-        else if(ctl_line[0] == 'K' || ctl_line[0] == 'k') {
-            tokens = g_regex_split(uzbl.comm.keycmd_regex, ctl_line, 0);
-            if(tokens[0][0] == 0) {
-                /* should incremental commands want each individual "keystroke"
-                   sent in a loop or the whole string in one go like now? */
-                g_string_assign(uzbl.state.keycmd, tokens[1]);
-                run_keycmd(FALSE);
-                if (g_strstr_len(ctl_line, 7, "n") || g_strstr_len(ctl_line, 7, "N"))
-                    run_keycmd(TRUE);
-                update_title();
-            }
-        }
         /* Comments */
         else if(   (ctl_line[0] == '#')
                 || (ctl_line[0] == ' ')
diff --git a/uzbl.h b/uzbl.h
index 0750e63..fe63b3c 100644 (file)
--- a/uzbl.h
+++ b/uzbl.h
@@ -96,7 +96,6 @@ typedef struct {
     /* command parsing regexes */
     GRegex         *set_regex;
     GRegex         *act_regex;
-    GRegex         *keycmd_regex;
     GRegex         *get_regex;
     GRegex         *bind_regex;
     gchar          *sync_stdout;