Changeset 1831

Show
Ignore:
Timestamp:
10/17/06 15:31:43 (2 years ago)
Author:
jstenar
Message:

pyreadline: Fix of ticket #94.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pyreadline/trunk/doc/ChangeLog

    r1459 r1831  
     12006-10-19 Jörgen Stenarson  <jorgen.stenarson -at- bostream.nu> 
     2    * Fix of ticket #94. Ignore escape sequences when binding keys using readline syntax. 
     3 
    142006-07-20 Jörgen Stenarson  <jorgen.stenarson -at- bostream.nu> 
    25    * Fix for cursor position when tab is inserted 
  • pyreadline/trunk/pyreadline/keysyms.py

    r1287 r1831  
    77#  the file COPYING, distributed as part of this software. 
    88#***************************************************************************** 
     9 
     10# Codepage information 
     11# 437 USA  
     12# 850  (Latin I)  
     13# 852 Slavic (Latin II)  
     14# 855 Kyrilliska (Ryska)  
     15# 857 Turkiska  
     16# 860 Portugisiska  
     17# 861 Islandic 
     18# 863 Fransk-kanadensiska  
     19# 865 Nordiska  
     20# 866 Ryska  
     21# 869 Modern grekiska  
     22 
     23 
     24 
    925import winconstants as c32 
    1026from ctypes import windll 
     
    165181            keyseq = keyseq[3:] 
    166182        elif keyseq.startswith('\\e'): 
    167             res.append(char_to_keyinfo('\033', control, meta, shift)) 
    168             control = meta = shift = False 
    169             keyseq = keyseq[2:] 
     183            return None  #escape sequences are not possible so ignore 
     184#            res.append(char_to_keyinfo('\033', control, meta, shift)) 
     185#            control = meta = shift = False 
     186#            keyseq = keyseq[2:] 
    170187        elif len(keyseq) >= 1: 
    171188            res.append(char_to_keyinfo(keyseq[0], control, meta, shift)) 
  • pyreadline/trunk/pyreadline/rlmain.py

    r1459 r1831  
    8686 
    8787 
    88     def rl_settings_to_string(self): 
     88    def rl_settings_to_string(self,e=None): 
    8989        out=["%-20s: %s"%("show all if ambigous",self.show_all_if_ambiguous)] 
    9090        out.append("%-20s: %s"%("mark_directories",self.mark_directories)) 
     
    9797        for key in bindings: 
    9898            out.append("%7s %7s %7s %7d %7s %7s"%(key)) 
     99        log("\n".join(out)) 
    99100        return out 
    100101     
     
    11071108        formatted in such a way that it can be made part of an inputrc 
    11081109        file. This command is unbound by default.''' 
    1109         pass 
     1110        print 
     1111        txt="\n".join(self.rl_settings_to_string()) 
     1112        print txt 
     1113        self._print_prompt() 
    11101114 
    11111115    def dump_variables(self, e): # () 
     
    11291133        '''setup the mapping from key to call the function.''' 
    11301134        keyinfo = key_text_to_keyinfo(key) 
    1131 #        print key,keyinfo,func.__name__ 
    1132         self.key_dispatch[keyinfo] = func 
    1133  
     1135        if keyinfo is not None: 
     1136            log("bindkey>>%s %s<<"%(keyinfo,func.__name__)) 
     1137            self.key_dispatch[keyinfo] = func 
     1138             
    11341139    def _bind_exit_key(self, key): 
    11351140        '''setup the mapping from key to call the function.'''