aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2012-12-16 19:27:24 +0100
committerAdam Vogt <vogt.adam@gmail.com>2012-12-16 19:27:24 +0100
commitafbbafc1e2c87d070ae07634bfca121d825ea37b (patch)
treeb2f4065e1387b9f818d001032da7efdb20507e92 /XMonad
parentdd91454668c24ef2c633ffa30e76fc842e615aad (diff)
downloadXMonadContrib-afbbafc1e2c87d070ae07634bfca121d825ea37b.tar.gz
XMonadContrib-afbbafc1e2c87d070ae07634bfca121d825ea37b.tar.xz
XMonadContrib-afbbafc1e2c87d070ae07634bfca121d825ea37b.zip
Record polachok's fix for issue 507
Ignore-this: 13743d035e50f642de017c3304f914e darcs-hash:20121216182724-1499c-0ca6203c00560a5a405d540d83ffd5c2753a6ee6.gz
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Prompt.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs
index 90509d5..87d4498 100644
--- a/XMonad/Prompt.hs
+++ b/XMonad/Prompt.hs
@@ -75,7 +75,7 @@ import XMonad.Util.Font
import XMonad.Util.Types
import XMonad.Util.XSelection (getSelection)
-import Codec.Binary.UTF8.String (decodeString)
+import Codec.Binary.UTF8.String (decodeString,isUTF8Encoded)
import Control.Applicative ((<$>))
import Control.Arrow (first, (&&&), (***))
import Control.Concurrent (threadDelay)
@@ -662,7 +662,10 @@ keyPressHandle m (ks,str) = do
Nothing -> case str of
"" -> eventLoop handle
_ -> when (kmask .&. controlMask == 0) $ do
- insertString (decodeString str)
+ let str' = if isUTF8Encoded str
+ then decodeString str
+ else str
+ insertString str'
updateWindows
updateHighlightedCompl
completed <- tryAutoComplete