# HG changeset patch # User Atul Varma # Date 1203881036 21600 # Node ID 30686583595d1c1cfdc670fcf887c4b4fbc7a417 # Parent 1517f15208b6d8667a583436870a729ceb2ff0f2 Modified the default enso configuration so that the re-posting of key events for single-key quasimode sessions is possible. diff -r 1517f15208b6 -r 30686583595d enso/config.py --- a/enso/config.py Sun Feb 24 13:16:28 2008 -0600 +++ b/enso/config.py Sun Feb 24 13:23:56 2008 -0600 @@ -21,12 +21,16 @@ # The minimum number of characters the user must type before the # auto-completion mechanism engages. -QUASIMODE_MIN_AUTOCOMPLETE_CHARS = 1 +QUASIMODE_MIN_AUTOCOMPLETE_CHARS = 2 # The message displayed when the user types some text that is not a command. BAD_COMMAND_MSG = "

%s is not a command.

"\ "%s" +# Minimum number of characters that should have been typed into the +# quasimode for a bad command message to be shown. +BAD_COMMAND_MSG_MIN_CHARS = 2 + # The captions for the above message, indicating commands that are related # to the command the user typed. ONE_SUGG_CAPTION = "Did you mean %s?" diff -r 1517f15208b6 -r 30686583595d enso/ui/quasimode/__init__.py --- a/enso/ui/quasimode/__init__.py Sun Feb 24 13:16:28 2008 -0600 +++ b/enso/ui/quasimode/__init__.py Sun Feb 24 13:23:56 2008 -0600 @@ -334,13 +334,14 @@ assert tempWindowRef() == None, "QuasimodeWindow wasn't destroyed!" activeCommand = self.__suggestionList.getActiveCommand() + userText = self.__suggestionList.getUserText() if activeCommand != None: cmdName = self.__suggestionList.getActiveCommandName() self.__executeCommand( activeCommand, cmdName ) - elif len( self.__suggestionList.getUserText() ) > 0: + elif len( userText ) > config.BAD_COMMAND_MSG_MIN_CHARS: # The user typed some text, but there was no command match - self.__showBadCommandMsg( self.__suggestionList.getUserText() ) - + self.__showBadCommandMsg( userText ) + self._inQuasimode = False self.__suggestionList.clearState()