summaryrefslogtreecommitdiff
path: root/poezio/windows/inputs.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/windows/inputs.py')
-rw-r--r--poezio/windows/inputs.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/poezio/windows/inputs.py b/poezio/windows/inputs.py
index 51b9f4ea..d1716914 100644
--- a/poezio/windows/inputs.py
+++ b/poezio/windows/inputs.py
@@ -11,8 +11,7 @@ import string
from poezio import keyboard
from poezio import common
from poezio import poopt
-from poezio.windows import Win
-from poezio.windows.base_wins import format_chars
+from poezio.windows.base_wins import Win, format_chars
from poezio.windows.funcs import find_first_format_char
from poezio.config import config
from poezio.theming import to_curses_attr
@@ -239,7 +238,7 @@ class Input(Win):
"""
self.reset_completion()
if self.pos == 0:
- return
+ return False
self.key_left()
self.key_dc()
return True
@@ -457,7 +456,7 @@ class Input(Win):
"""
return self.text
- def addstr_colored_lite(self, text, y=None, x=None):
+ def _addstr_colored_lite(self, text, y=None, x=None):
"""
Just like addstr_colored, with the single-char attributes
(\x0E to \x19 instead of \x19 + attr). We do not use any }
@@ -491,7 +490,7 @@ class Input(Win):
"""
Refresh the line onscreen, but first, always adjust the
view_pos. Also, each FORMAT_CHAR+attr_char count only take
- one screen column (this is done in addstr_colored_lite), we
+ one screen column (this is done in _addstr_colored_lite), we
have to do some special calculations to find the correct
length of text to display, and the position of the cursor.
"""
@@ -502,7 +501,7 @@ class Input(Win):
self._win.attron(to_curses_attr(self.color))
displayed_text = text[self.view_pos:self.view_pos+self.width-1].replace('\t', '\x18')
self._win.attrset(0)
- self.addstr_colored_lite(displayed_text)
+ self._addstr_colored_lite(displayed_text)
# Fill the rest of the line with the input color
if self.color:
(_, x) = self._win.getyx()
@@ -705,8 +704,8 @@ class CommandInput(HistoryInput):
self.key_func["M-B"] = self.key_down
self.histo_pos = -1
- def do_command(self, key, refresh=True, raw=False):
- res = Input.do_command(self, key, refresh, raw)
+ def do_command(self, key, reset=True, raw=False):
+ res = Input.do_command(self, key, reset=reset, raw=raw)
if self.on_input:
self.on_input(self.get_text())
return res