summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-21 04:31:41 +0100
committerhut <hut@lavabit.com>2010-03-21 04:31:41 +0100
commita1cd4fdc2326d4b15266b708b87a6aab9ec172ed (patch)
tree249f3976ae87c396e39db263b013993cc2ea258e
parentc776804d9db1f0ae837aaafe8ed27eb47bb369f5 (diff)
downloadranger-a1cd4fdc2326d4b15266b708b87a6aab9ec172ed.tar.gz
widgets.console: allow unicode input. (if flushinput == False)
-rw-r--r--ranger/gui/widgets/console.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index feb54a3d..20a75c4e 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -130,9 +130,13 @@ class Console(Widget):
 	def press(self, key):
 		from curses.ascii import ctrl, ESC
 
+		keytuple = self.env.keybuffer.tuple_with_numbers()
 		try:
-			cmd = self.commandlist[self.env.keybuffer.tuple_with_numbers()]
+			cmd = self.commandlist[keytuple]
 		except KeyError:
+			# An unclean hack to allow unicode input.
+			# This whole part should be replaced.
+			self.type_key(chr(keytuple[0]))
 			self.env.key_clear()
 			return
 
Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
name: PEP8 and tests

on:
  push:
    paths:
      - '.github/workflows/python.yml'
      - '**.py'
  pull_request:
    paths:
      - '.github/workflows/python.yml'
      - '**.py'

jobs:
  test_py:
    runs-on: ubuntu-latest
    strategy:
      max-parallel: 4
      matrix:
        python-version: [2.7, 3.5, 3.x]
    env:
      TERM: dumb
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        # We need to ignore PyLint because we can't install the one we need for
        # Python 2.7 and 3.5
        pip install -r <(grep -v pylint requirements.txt)
    - name: Flake8 and test
      run: |
        make test_flake8 test_doctest test_other