Changeset e1b136bf for keymap.c


Ignore:
Timestamp:
May 11, 2009, 9:50:58 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
70110286, dfaa47d
Parents:
fa8f439
Message:
Fix handling of C-SPACE, etc.

Instead of storing key sequences NULL-terminated, store an explicit
length everywhere, so that we can handle C-SPACE (which is a 0).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • keymap.c

    r428834d re1b136bf  
    213213  }
    214214
    215   /* temporarily disallow C-`/C-SPACE until we fix associated bugs */
    216   if (j.ch == ERR || j.ch == 0) {
    217         return(-1);
    218   }
    219 
    220   /*
    221     owl_function_debugmsg("processkey: got key %d, active keymap %s, stack at %d",
    222     j, kh->active->name, kh->kpstackpos);
    223   */
    224 
    225215  /* deal with ESC prefixing */
    226216  if (!kh->in_esc && j.ch == 27) {
     
    253243    for (i=owl_list_get_size(&km->bindings)-1; i>=0; i--) {
    254244      kb = (owl_keybinding*)owl_list_get_element(&km->bindings, i);
    255       match = owl_keybinding_match(kb, kh->kpstack);
     245      match = owl_keybinding_match(kb, kh);
    256246      if (match == 1) {         /* subset match */
    257247
     
    290280{
    291281    char kbbuff[500];
    292     owl_keybinding_stack_tostring(kh->kpstack, kbbuff, 500);
     282    owl_keybinding_stack_tostring(kh->kpstack, kh->kpstackpos+1, kbbuff, 500);
    293283    owl_function_makemsg("'%s' is not a valid key in this context.", kbbuff);
    294284    owl_keyhandler_reset(kh);
Note: See TracChangeset for help on using the changeset viewer.