summaryrefslogtreecommitdiff
path: root/poezio/windows/text_win.py
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-03-31 18:43:01 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-06-11 20:49:46 +0100
commitbfe7a3100e8ad1b0e0132efc2ec554da5f455ba4 (patch)
treea652bc98720d646177901a6ed3b8c46dadcdd89d /poezio/windows/text_win.py
parent275128963b6f6d0e9506fbff5f946510c5bf62a5 (diff)
downloadpoezio-bfe7a3100e8ad1b0e0132efc2ec554da5f455ba4.tar.gz
poezio-bfe7a3100e8ad1b0e0132efc2ec554da5f455ba4.tar.bz2
poezio-bfe7a3100e8ad1b0e0132efc2ec554da5f455ba4.tar.xz
poezio-bfe7a3100e8ad1b0e0132efc2ec554da5f455ba4.zip
Move Line where it should be.
Diffstat (limited to 'poezio/windows/text_win.py')
-rw-r--r--poezio/windows/text_win.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/poezio/windows/text_win.py b/poezio/windows/text_win.py
index fd1fe546..5c644c46 100644
--- a/poezio/windows/text_win.py
+++ b/poezio/windows/text_win.py
@@ -10,7 +10,7 @@ import curses
from math import ceil, log10
from . import Win
-from . base_wins import FORMAT_CHAR, Line
+from . base_wins import FORMAT_CHAR
from . funcs import truncate_nick, parse_attrs
import poopt
@@ -18,6 +18,17 @@ from config import config
from theming import to_curses_attr, get_theme, dump_tuple
+# msg is a reference to the corresponding Message object. text_start and
+# text_end are the position delimiting the text in this line.
+class Line:
+ __slots__ = ('msg', 'start_pos', 'end_pos', 'prepend')
+ def __init__(self, msg, start_pos, end_pos, prepend):
+ self.msg = msg
+ self.start_pos = start_pos
+ self.end_pos = end_pos
+ self.prepend = prepend
+
+
class BaseTextWin(Win):
def __init__(self, lines_nb_limit=None):
if lines_nb_limit is None: